Dctap

Latest version: v0.4.4

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

Scan your dependencies

Page 1 of 3

0.4.4

- Csvreader now looks for prefixes used in value constraints.
- Added unit tests.

0.4.3

- Make `csvreader._get_rows` more robust by testing for edge cases.

0.4.2

- Function dctap.csvreader now can also take a CSV string as input (not just an open file object).

0.4.1

- Change imports from relative to absolute, `from .exceptions...` to `from dctap.exceptions`.
- Pylint, black.
- Added unit tests.

0.4.0

For this release, unit tests (and their docstrings) were updated. The command-line utility was slightly simplified. Function parameters, variables, and error messages were changed for the sake of consistency and clarity and to facilitate the reconfiguration of classes and functions in this package with different defaults when imported into other packages.

Added

- `dctap.utils.load_yaml_to_dict`, reads a YAML string or file and returns a Python dictionary.

Removed

- Removed from the command-line utility the option `dctap init --hidden`, which had generated `.dctaprc`. Users who want to have a "hidden" config file can rename `dctap.yaml` by hand and point to it with `dctap read --config PATH` or with `get_config(nondefault_configfile_name=PATH)`.
- Removed from `dctap.inspect.pprint_tapshapes` the parameters `shape_class` and `state_class`, no longer needed.
- Removed the utility `dctap.utils.strip_enclosing_angle_brackets`, not used (ie, no evidence that anyone records URIs in a TAP enclosed with angle brackets).

Changed

- Changed arguments of `dctap.config.get_config`:
- 0.3.15: One optional parameter `configfile_name`. Three to which (overridable) defaults are passed: `config_yamldoc`, `shape_class`, `state_class`.
- 0.4.0: Two optional parameters: `nondefault_configyaml_str`, `nondefault_configfile_name`. Four to which (overridable) defaults are passed: `default_configyaml_str`, `default_configfile_name`, `default_shape_class`, `default_state_class`.
- Why: Clarity of intention. Facilitates configuration with other defaults when imported by other packages downstream. Passing a non-default YAML string is useful for unit tests and possibly also for advanced users.
- Changed arguments of `dctap.config.write_configfile`:
- 0.3.15: Two parameters to which (overridable) defaults are passed: `configfile_name`, `config_yamldoc`.
- 0.4.0: One optional parameter `nondefault_configyaml_str`. Two to which (overridable) defaults are passed: `default_configfile_name`, `default_configyaml_str`.
- Changed `dctap.config.get_stems` and `dctap.config.get_shems` into "private" functions `_get_stems` and `_get_shems`, which are called by only one function, `dctap.config.get_config`.
- Changed parameters of various other internal, "private" functions called by `get_config`.
- Simplified `dctap.utils.is_uri_or_prefixed_uri` and renamed to `dctap.utils.looks_like_uri_or_curie`.

0.3.15

- Improve efficiency/readability of normalization functions, eg for Boolean values.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.