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`.