Skip to content
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

Release 0.8.0 #79

Merged
merged 46 commits into from
Jun 12, 2023
Merged

Release 0.8.0 #79

merged 46 commits into from
Jun 12, 2023

Conversation

ajnelson-nist
Copy link
Member

@ajnelson-nist ajnelson-nist commented Jun 12, 2023

Coordination

  • CI passes.

ajnelson-nist and others added 30 commits November 10, 2022 19:41
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Regenerating due to a local tool update.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This also updates the submodules to catch their updated `case-utils`
adoption status.

This patch also incorporates packages required for testing by making a
`testing` feature for `case_prov`, that only depends on `case_utils`'
`testing` feature, without a version description.  This was confirmed to
respect the version restrictions in `install_requires` by trying this
configuration and seeing it fail to find the `testing` feature
introduced in `case-utils 0.11.0`:

```
[options]
install_requires =
    case_utils >=0.10.0,< 0.11.0
[options.extras_require]
testing=
    case_utils[testing]
```

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files.

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

This patch uses the inherence UUID functions from `case-utils` PR 112 to
replace the blank nodes generated with SPARQL Construct queries.  As
side effects of this migration, some bugs were fixed with generating
some associations, and inherence modeling assumptions are now specified
in code comments.

This patch also adds `prov:Start` and `prov:End` nodes to reify
`prov:Activity` (and `case-investigation:InvestigativeAction`) time
boundaries.  This will be a significant assistance in OWL-Time-based
visualization under development for `case-prov` PR 54.  Creating the
`prov:Start` and `prov:End` nodes as IRI-identified is also necessary
because of a bug observed in `rdf-toolkit`; see their Issue 52.

Since `case_prov_rdf` will now be able to generate non-blank nodes, it
has picked up two behaviors used in other projects importing
`case-utils`:

* The `--use-deterministic-uuids` flag has been added.
* The `CASE_DEMO_NONRANDOM_UUID_BASE` environment variable can now be
  used to make non-inherent deterministic UUIDs.

A follow-on patch will regenerate Make-managed files.

References:
* #54
* casework/CASE-Utilities-Python#112
* edmcouncil/rdf-toolkit#52

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Use inherent IDs to infer qualified Influence and InstantaneousEvent nodes
This patch fixes a bug based on an implementation pattern.  Currently,
SPARQL queries that can potentially return multiple results (e.g. due to
multiple RDFS Comments) only build the PyDot Node label based on the
last query result returned.  This leads to dropped annotations as well
as potentially non-deterministic behavior (especially from the lack of
sorting).

This patch's implementation is mainly code motion.  It also starts
moving the RDF logistics more towards RDF types rather than collapsing
types into strings.  (RDFLib type review support was in a much earlier
implementation state when this code was first written.)

This patch will induce slight lateral motion in Activity nodes, due to a
leading whitespace character on the time-interval line being removed.

A follow-on patch will regenerate Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch adapts the forward-porting pattern done for
`case-investigation:exhibitNumber`, carrying forward `uco-core:name` and
`uco-core:description` in the generated PROV-O triples.  In cases where
the triples are folded back into the input graph, the changes to the
`CONSTRUCT` queries will have no effect.

With `name` and `description` brought forward, instead of being
collapsed into `rdfs:comment`s, their order (as groups of annotations)
can be controlled in rendered node labels.  The general order is now:

* Name
* Label(s)
* Description(s)
* Comment(s)

A follow-on patch will regenerate Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch is code motion, moving some function calls to their needed
time of calling at the end of the rendering process.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch is code motion, moving some function calls to their needed
time of calling at the end of the rendering process.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch revises `case_prov_dot` to make use of updates in code review
practice and upstream typing support since the script was originally
written.

The original version of `case_prov_dot` relied on many conversions of
RDFLib types to strings.  This induced some reinvention of logical
organization of concepts into IRI strings vs. quickly-instantiated and
-discarded `rdflib.URIRef` objects.  Some usage of `URIRef`s as strings
was covered by `URIRef`s being implemented in RDFLib as subclasses of
string.

As work progressed on adding TIME concept support (see PR 54), it became
unnecessarily burdensome to handle some work with managing untyped
strings under specialized consideration, versus constructing sets of
`rdflib.URIRef`s to designate nodes.  Managing potential blank nodes
also became a challenge with casts to strings.

This patch revises the base work in `case_prov_dot` to be oriented on
analyzing sets of `rdflib.term.IdentifiedNode`s (encompassing `URIRef`s
and `BNode`s).  A roadmap/codemap is also added in inline documentation
to describe sections of code behavior.

Revision of the code flow also settled some design issues that were
previously unnecessarily isolating the various chains from one another,
especially where some chains needed to be handled as a mutual union, and
another needed to be handled as an intersection, when various subsets of
the provenance graph are requested.  So this patch also adds the various
pairs of chains as demonstrations under the Urgent Evidence example.

A follow-on patch will regenerate Make-managed files.

References:
* #54

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This merge re-applied changes done for `case_prov_dot.py`, with some
fixes applied for issues reported by `mypy`.

No effects were observed on Make-managed files.
No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This figure shows only two of the Allen interval-relations are handled
by the ordering logic now.  However, the figure does show time flowing
"downward" by seeing the before & after `*-i` intervals are above the
`*-j` intervals.

A follow-on patch will regenerate Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
ajnelson-nist and others added 16 commits June 5, 2023 09:53
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch enables `pytest`'s doctest mode and adds a first doctest to
ensure `pytest` doesn't fail due to finding no tests to run.

Follow-on patches will add new functions with more demanding doctests.

No effects were observed on Make-managed files.

References:
* https://docs.pytest.org/en/7.1.x/how-to/doctest.html
* casework/CASE-Utilities-Python#111

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This function is added independently, without usage yet, to isolate test
effects.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This function is added independently, without usage yet, to isolate test
effects.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch adds inferential analysis to define temporal interval
boundaries and apply timeline sorting, both topologically and
lexicographically.

CASE Investigative Actions are already inferred by current
`case_prov_rdf` and `case_prov_dot` practice to be PROV Activities.
This patch takes inference further to interpret PROV Activities as
OWL-Time Proper Intervals.  Further, PROV Instantaneous Events are
inferred to be OWL-Time Instants, and their relationships to Entities
and Activities are used to establish topological order according to PROV
(English) definitions.

All OWL-Time Instants, and nodes inferred to be OWL-Time Instants, are
assigned `xsd:dateTimeStamp` values in GMT (where possible) to enable a
timeline based on lexicographic sorting.

Figures' and tests' Makefiles are updated to add new graphs to display.

A follow-on patch will regenerate Make-managed files, and track new
figures.

The last planned follow-on patch will add OWL-Time documentation to the
top README.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files.

The patch afterwards will add OWL-Time documentation to the top README.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
The RDFLib issue referenced in the comment summarizes the type-safety
matter.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Use any existing TIME hints in graph to do further ordering.
This is only a refresh to the current pointer.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist ajnelson-nist added this to the 0.8.0 milestone Jun 12, 2023
@ajnelson-nist ajnelson-nist marked this pull request as ready for review June 12, 2023 16:16
@ajnelson-nist ajnelson-nist requested a review from a team as a code owner June 12, 2023 16:16
@ajnelson-nist ajnelson-nist mentioned this pull request Jun 12, 2023
2 tasks
@kchason kchason merged commit 42d0581 into main Jun 12, 2023
4 checks passed
@kchason kchason deleted the release-0.8.0 branch June 12, 2023 19:33
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.

None yet

2 participants