Skip to content

Release 0.3.0 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Nov 10, 2021
Merged

Release 0.3.0 #26

merged 62 commits into from
Nov 10, 2021

Conversation

ajnelson-nist
Copy link
Member

No description provided.

ajnelson-nist and others added 30 commits September 7, 2021 12:35
rdflib 6.0.1 upgraded `guess_format()` to report JSON-LD (via PRs 1403
and 1408).  With the functionality upstream, this patch moves towards
completing tech. transfer by deprecating the local implementation.

References:
* RDFLib/rdflib#1403
* RDFLib/rdflib#1408

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
rdflib 6.0.0 improved filename-based format recognition.  (Tests for
recognition were upgraded to support JSON-LD in PR 1408.)

This patch removes explicit-but-redundant functionality.

References:
* RDFLib/rdflib#1408

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch is to show what is needed to add static type checking with
`mypy`.

The brunt of the effort is adding `#type: ignore` annotations to
`rdflib`.  These can be removed once an `rdflib` release with the merged
PR 1407 is issued.

The additional package in `tests/requirements.txt` pertaining to
`dateutil` was reported by `mypy`.

DISCLAIMER:
Participation by NIST in the creation of the documentation of mentioned
software is not intended to imply a recommendation or endorsement by the
National Institute of Standards and Technology, nor is it intended to
imply that any specific software is necessarily the best available for
the purpose.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python
* RDFLib/rdflib#1407

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-211] Add static type checking to CASE-Utilities-Python
* https://www.python.org/dev/peps/pep-0561/

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
An observed behavior is that mypy will not type signature analysis until
one is added in the call path, e.g. designating `def main() -> None`.
This patch is the minimal set of effects of adding a None return type to
unit test functions.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
An observed behavior is that mypy will not type signature analysis until
one is added in the call path, e.g. designating `def main() -> None`.
This patch is the minimal set of effects of adding a None return type to
unit test functions.

No further changes needed.  One test not committed is that, before this
patch, this line could be put into a function (I chose the SPARQL
selector's main()) without mypy complaining:

    x : str = 1

After requiring that function return a type, mypy appropriately raised
an error.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Some further signature work will come to case_file.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
After adding a type signature to create_file_node(), mypy complained
that _logger was undefined.  That was correct, as I'd copied and pasted
that section from DFXML's walk_to_dfxml.py.

Another issue around a multi-value-types dictionary will require a
bigger patch before the type signature gets committed.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This uses an alternative light-class definition style more focused on
type signatures.  The example origin is cited inline.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
One more `# type: ignore` was added while awaiting rdflib PR #1407.

These were all identified by adding the `--strict` flag to mypy for a
run.  I will leave it up for future discussion whether to use that flag,
especially to wait for PR 1407 and to see if too much work would be
induced versus runtime safety improvements.

References:
* [AC-211] Add static type checking to CASE-Utilities-Python
* RDFLib/rdflib#1407

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
The type has changed from bytes() to str() since the isomorphic diff
sample file was originally written.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Update string type from graph.serialize
This addresses "Legacy mode" notices when installing local packages.

References:
* [AC-195] Use Python venv instead of virtualenv to build virtual
  environments for CI

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This lets us remove the restriction on `pyparsing`.

References:
* RDFLib/rdflib#1370

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
rdflib 6.0.0 moved us to Python >= 3.7, so the <3.7 tests are now moot.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate files that will have updated UUIDs.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
UUIDs were expected to change, as present working directory is part of
the hashed data.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Align test directories with /case_utils structure
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This applies a fix made to the CASE and UCO ontology repositories.

References:
* [UCO OC-164] (CP-71) Ontology syntax-check CI does not run with
  Java 11

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Use Java 8 for rdf-toolkit
References:
* [AC-210] Add validation command to CASE-Utilities-Python
* [ONT-445] (CP-38) rdf-toolkit base-iri flag degenerates versionIRI
  when slash IRI form is used

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Add validation command to CASE-Utilities-Python
With AC-195, macOS environments no longer need to search for other
Python 3 deployments that might have `virtualenv`.

References:
* [AC-195] Use Python venv instead of virtualenv to build virtual
  environments for CI

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [AC-210] Add validation command to CASE-Utilities-Python

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This is to prepare for a coming long-named flag specification.

References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This is to prepare for a coming function lookup of built ontology
versions to use.

References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
…bject superclass

References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References:
* [UCO OC-65] (CP-13) UCO needs subclasses of ObservableObject

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Add subclass hierarchy knowledge to case_sparql_* commands
References:
* [AC-207] Release CASE-Utilities-Python 0.3.0

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist ajnelson-nist self-assigned this Nov 10, 2021
@ajnelson-nist ajnelson-nist merged commit 0390ee7 into main Nov 10, 2021
@ajnelson-nist ajnelson-nist deleted the release-0.3.0 branch November 10, 2021 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants