Paramtools

Latest version: v0.18.3

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 8

0.11.0

- Add a warnings distinction to validators. By default, validators throw errors, but you may specify that they emit warnings instead (86):
json
"range": {"min": 0, "max": 10, "level": "warn"}


- Adds a new `when` validator, that allows you to specify complex conditional validation logic. Here's an example using [Tax-Cruncher's](https://github.com/PSLmodels/Tax-Cruncher) social security parameter (#81):

json
{
"when": {
"param": "spouse_age",
"is": {"less_than": 65},
"then": {
"when": {
"param": "primary_age",
"is": {"less_than": 65},
"then": { "range": {"min": 0, "max": 0} },
"otherwise": { "range": {"min": 0, "max": 9e99} }
}
},
"otherwise": { "range": {"min": 0, "max": 9e99} }
}
}

- A bug fix for the `sort_values` method and its usage in `dump`. (87)

0.10.3

- Add a `sort_values` method for to re-order value objects that may get shuffled after operations like `extend` or `adjust`. The `dump` method now ensures that the results are sorted by default. (84, 85)

0.10.2

- Rename "actions" to "operators". (83)
- Fix handling of scalar parameters when `array_first` is true. (80)

0.10.1

- Fix bug where array parameters could not be adjusted when `array_first` is `True`. (76)
- Add `to_dict` method that returns a `Parameters` instance as a Python dictionary. (76)

0.10.0

- The "schema" object in `defaults` now undergoes comprehensive validation. (72)
- A new "operators" member is added to the "schema" object in `defaults`. Operators are variables like `label_to_extend` or `array_first` which tell ParamTools how a `defaults` object should be loaded. This makes it easier to dump the data for a Parameters instance in one place and load it in another. (73)
- A new approach to doing searches and updates brings performance improvements. (74)
- The `Parameters` class supports iteration similar to Python dictionaries. (75)

0.9.0

- Make it easier to customize the `adjust` method. This allows projects to use custom adjustment formats or apply custom logic. Checkout the [custom adjustment docs](https://paramtools.org/api/custom-adjust/) to learn more. (#70)
- Enhancements and bug fixes for the `extend` method. (71)

Page 4 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.