Skip to content

Releases: casework/CASE-Utilities-Python

0.5.1

20 Dec 23:04
939775f
Compare
Choose a tag to compare
  • Backported bug fix: See cdo-local-uuid 0.5.0.
  • Testing update: This release also enables Continuous Integration testing on branches matching the name pattern support-*.

0.14.0

13 Nov 15:45
c944fa6
Compare
Choose a tag to compare
  • This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.
  • Upstream bug fix: SHACL qualified value shapes were not being triggered under certain conditions; see pySHACL Issue 213. That issue is now addressed, and with this case-utils release case_validate picks up the correction.
  • Dependencies updated: The pySHACL requirement is now >= 0.24.0, and the RDFLib requirement is now < 8.
  • Upstream API change: case_sparql_select now catches new JSON index and orientation parameter combinations.
  • case-utils now tests between Python 3.9 (unchanged since 0.13.0) and Python 3.12 (changed).
  • After testing in other CASE projects, pre-commit pinned-version review now occurs as a prerelease check.

0.13.0

29 Aug 18:54
1611e58
Compare
Choose a tag to compare
  • This release increases the required version of Python to 3.9, due to an upstream dependency doing so.
  • This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.

0.12.0

25 Aug 17:05
7e70f74
Compare
Choose a tag to compare
  • This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.
  • Behavior change: case_validate now defaults to relaxing some tests that review the "TBox" ("Theorem box") of the ontology. Due to some logistical issues with SHACL needing to copy ontology data into the data graph (needed for hierarchy information), these review shapes were known to run with significant and time-consuming redundance. The default behavior is now to not use those shapes unless the flag --review-tbox is provided.
  • New feature: The case_utils.case_validate module now provides a more modular interface to its pyshacl.validate() functionality extensions (including the Cyber Domain Ontology concept typo-checker), in the function validate().
    • Similarly, the Cyber Domain Ontology concept typo-checker is now exposed in functions, concept_is_cdo_concept() and get_invalid_cdo_concepts() in case_utils.case_validate.validate_utils.
  • Bug fix: case_validate was forwarding the inference argument's default value incorrectly to pyshacl.validate(). (A difference in effect between "none" and None was found.) This is now corrected.
  • The dependent version of RDFLib is now ceiling-pinned to be less than the next SEMVER-major release. Rationale is logged in this commit.
  • Documentation tests now run earlier in the unit testing.
  • The case_utils.local_uuid module has had its interface and documentation updated, to direct users away from a function meant to be called only within the module.
  • NIST in-file license text has been updated.

0.11.0

10 May 16:58
435d67e
Compare
Choose a tag to compare
  • This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.
  • The case-utils package now includes the testing feature to augment the base installation with dependencies used in case-utils' testing. These dependencies are installable with pip install case-utils[testing].
  • case_file now includes SHA3-256 and SHA3-512 values
  • Documentation for modules now includes doctests (inlined code samples) for functions
  • Graph-individuals generated by case-utils, e.g. the uco-observable:File nodes generated by case_file, now follow a different naming pattern. Where previously they would appear as kb:file-{some_uuid}, they now appear as kb:File-{some_uuid}; likewise, what would have been kb:content-data-facet-{some_uuid} will now be kb:ContentDataFacet-{some_uuid}. Manual adaptation was needed to determine hyphenation, and work on programmatically-generated bindings indicates it will be preferrable to use the last segment of CASE/UCO class IRIs instead.
  • A new opt-in feature lets some IRIs be determined by minimally-necessary seeding data, rather than always using random identifiers.
    • For uco-types:Hash nodes, that seed data is the value of uco-types:hashMethod and uco-types:hashValue.
    • For uco-core:Facet subclasses, that seed data is the sole asserted Facet subclass, and all or part of the IRI of the corresponding uco-core:UcoObject (all or part determined by whether the UcoObject follows the UCO identification scheme of ending with a UUID). This lets a Facet instance be determined formulaically, so multiple processes can assign properties housed in the same Facet without needing to also pass the identity of the Facet between one another (such as one tool assigning uco-observable:hash values, and another assigning uco-observable:mimeType values, both of which need the associated ContentDataFacet).
    • case_file enables this feature with the new flag --use-deterministic-uuids.
    • The case_utils.inherent_uuid module provides the new functionality.

0.10.0

31 Mar 15:23
f47bd6c
Compare
Choose a tag to compare
  • The CASE monolithic build of version 1.2.0 is now provided.
  • case_validate now validates against CASE 1.2.0 by default.
  • case-utils is no longer tested on Python 3.7.
  • Miscellaneous updates that are not necessarily user-facing have been made due to new dependency requirements.

Note that though the CASE ontology has reached 1.0.0, this repository is not yet declaring a 1.0.0 status for its own resources. Further community input is needed to determine when this repository should provide CLI and Python API stability.

0.9.0

08 Dec 22:26
102c9a0
Compare
Choose a tag to compare
  • The CDO concept "typo checker" feature in case_validate now also includes IRIs that are for SHACL shapes that aren't also OWL classes.
  • case_sparql_select has received several updates.
    • Behavior change: Output will now always end with a newline character.
    • It been refactored to expose some of its internal logic as testable and exportable functions.
    • A command-line flag has been added to shorten returned IRIs to their prefixed forms on request: --use-prefixes.
    • Comma-separated value (CSV) and tab-separated value (TSV) output are now implemented.
    • JSON output is now implemented. The forms of output depend on the value of the --json-orient flag, which follows behaviors of pandas.DataFrame.to_json, including the default value column.
    • case_sparql_select JSON output is not JSON-LD.
    • JSON output indentation can be controlled with --json-indent. The default is to do no indenting or line breaking.
    • A command-line flag has been added to omit column headers, --no-header. --header is provided for symmetry and explicitness in scripting. The default behavior remains as with the various pandas.DataFrame.to_* methods: To include headers.
    • Likewise, a command-line flag has been added to omit row index numbers, --no-index (and --index, with default behavior matching --index).
    • Some parameter combinations are not supported by Pandas, particularly around certain JSON output modes and omission of row numbers. The --help flag notes flag combinations.
    • Unit tests demonstrate all the applicable output mode and flag combinations. See tests/case_utils/case_sparql_select/.check-*.
  • pre-commit has had its repository version pointers refreshed.

Note that though the CASE ontology has reached 1.0.0, this repository is not yet declaring a 1.0.0 status for its own resources. Further community input is needed to determine when this repository should provide CLI and Python API stability.

Full Changelog: 0.8.0...0.9.0

0.8.0

23 Nov 19:45
4123bff
Compare
Choose a tag to compare
  • The CASE monolithic build of version 1.1.0 is now provided.
  • case_validate now validates against CASE 1.1.0 by default.
  • case_utils.namespace has new member NS_UCO_CONFIGURATION.
  • case_validate now has the flag --allow-info (and --allow-infos as an alternate spelling), permitting SHACL validation to report conformance when the most severe result level reported is sh.INFO. This feature is forward-ported from pyshacl.
  • case_validate now has the flag --metashacl, using the SHACL-SHACL shapes graph to review the totality of the shapes being used in validation. This feature is forward-ported from pyshacl.
  • case_validate now reviews data graph's used CDO concepts (concepts whose IRIs start with a CASE or UCO domain) for existence within the used ontology graph(s). Nonexistent concepts (e.g. due to a typo) will raise a Python warning. If --allow-warnings is not supplied, this will cause case_validate to exit in a non-success state.
  • The --built-version flag has received a documentation update in the various tools where it is used.
  • Some tools had used Python warnings with a warning class detectable by unit testing frameworks, but not by end users. They now are visible to end users.
  • case-utils is now tested on Python 3.11.

Note that though the CASE ontology has reached 1.0.0, this repository is not yet declaring a 1.0.0 status for its own resources. Further community input is needed to determine when this repository should provide CLI and Python API stability.

Full Changelog: 0.7.0...0.8.0

0.7.0

02 Sep 16:23
3daebe6
Compare
Choose a tag to compare
  • case_validate now validates against CASE 1.0.0 by default.
  • The CASE monolithc builds of versions 0.7.1 and 1.0.0 are now provided.
  • The rdflib requirement has been bumped to >= 6.2.0.
  • This repository is now reviewed with mypy --strict.
  • case_utils.namespace has new members NS_OWL, NS_RDFS, NS_CO, and NS_UCO_CONFIGURATION.
  • The utility glom_graph.py, one of the non-exported files under /tests/src/, has been removed and its usage replaced with rdfpipe.
  • The package name is now adjusted to match PyPI practice.

Note that though the CASE ontology has reached 1.0.0, this repository is not yet declaring a 1.0.0 status for its own resources. Further community input is needed to determine when this repository should provide CLI and Python API stability.

0.6.0

17 Jun 18:26
5073694
Compare
Choose a tag to compare

This release makes updates for CASE 0.7.0. case_validate will now validate using CASE 0.7.0 and UCO 0.9.0 by default, using an included monolithic case-0.7.0.ttl file. The monolithic builds for 0.5.0 and 0.6.0 remain integrated with the package.

This repository now handles Turtle normalization portions of its Continuous Integration with a version of rdf-toolkit that minimally requires Java 11.

Python code within this repository is now reviewed with flake8 and isort using pre-commit.