Releases: casework/CASE-Utilities-Python
0.5.1
- Backported bug fix: See
cdo-local-uuid0.5.0. - Testing update: This release also enables Continuous Integration testing on branches matching the name pattern
support-*.
0.14.0
- 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-utilsreleasecase_validatepicks 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_selectnow catches new JSON index and orientation parameter combinations. case-utilsnow tests between Python 3.9 (unchanged since 0.13.0) and Python 3.12 (changed).- After testing in other CASE projects,
pre-commitpinned-version review now occurs as a prerelease check.
0.13.0
- 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
- This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.
- Behavior change:
case_validatenow 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-tboxis provided. - New feature: The
case_utils.case_validatemodule now provides a more modular interface to itspyshacl.validate()functionality extensions (including the Cyber Domain Ontology concept typo-checker), in the functionvalidate().- Similarly, the Cyber Domain Ontology concept typo-checker is now exposed in functions,
concept_is_cdo_concept()andget_invalid_cdo_concepts()incase_utils.case_validate.validate_utils.
- Similarly, the Cyber Domain Ontology concept typo-checker is now exposed in functions,
- Bug fix:
case_validatewas forwarding theinferenceargument's default value incorrectly topyshacl.validate(). (A difference in effect between"none"andNonewas 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_uuidmodule 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
- This release does not include a new ontology release. CASE 1.2.0 is still the ontology version used.
- The
case-utilspackage now includes thetestingfeature to augment the base installation with dependencies used incase-utils' testing. These dependencies are installable withpip install case-utils[testing]. case_filenow 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. theuco-observable:Filenodes generated bycase_file, now follow a different naming pattern. Where previously they would appear askb:file-{some_uuid}, they now appear askb:File-{some_uuid}; likewise, what would have beenkb:content-data-facet-{some_uuid}will now bekb: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:Hashnodes, that seed data is the value ofuco-types:hashMethodanduco-types:hashValue. - For
uco-core:Facetsubclasses, that seed data is the sole assertedFacetsubclass, and all or part of the IRI of the correspondinguco-core:UcoObject(all or part determined by whether theUcoObjectfollows the UCO identification scheme of ending with a UUID). This lets aFacetinstance be determined formulaically, so multiple processes can assign properties housed in the sameFacetwithout needing to also pass the identity of theFacetbetween one another (such as one tool assigninguco-observable:hashvalues, and another assigninguco-observable:mimeTypevalues, both of which need the associatedContentDataFacet). case_fileenables this feature with the new flag--use-deterministic-uuids.- The
case_utils.inherent_uuidmodule provides the new functionality.
- For
0.10.0
- The CASE monolithic build of version 1.2.0 is now provided.
case_validatenow validates against CASE 1.2.0 by default.case-utilsis 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
- The CDO concept "typo checker" feature in
case_validatenow also includes IRIs that are for SHACL shapes that aren't also OWL classes. case_sparql_selecthas 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-orientflag, which follows behaviors ofpandas.DataFrame.to_json, including the default valuecolumn. case_sparql_selectJSON 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.--headeris provided for symmetry and explicitness in scripting. The default behavior remains as with the variouspandas.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
--helpflag notes flag combinations. - Unit tests demonstrate all the applicable output mode and flag combinations. See
tests/case_utils/case_sparql_select/.check-*.
pre-commithas 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
- The CASE monolithic build of version 1.1.0 is now provided.
case_validatenow validates against CASE 1.1.0 by default.case_utils.namespacehas new memberNS_UCO_CONFIGURATION.case_validatenow has the flag--allow-info(and--allow-infosas an alternate spelling), permitting SHACL validation to report conformance when the most severe result level reported issh.INFO. This feature is forward-ported frompyshacl.case_validatenow 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 frompyshacl.case_validatenow 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-warningsis not supplied, this will causecase_validateto exit in a non-success state.- The
--built-versionflag 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-utilsis 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
case_validatenow 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
rdflibrequirement has been bumped to >= 6.2.0. - This repository is now reviewed with
mypy --strict. case_utils.namespacehas new membersNS_OWL,NS_RDFS,NS_CO, andNS_UCO_CONFIGURATION.- The utility
glom_graph.py, one of the non-exported files under/tests/src/, has been removed and its usage replaced withrdfpipe. - 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
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.