Repository navigation
Conversation
…tion with support for fallback to other backup dicts (eph, pending)
instead, all `Annotation` objs now have pointer to their parent `View` instance, so that it can access the contains defaults from view's metadata directly
…drails on `Document`'s RO props
ditching three-dicts implementation for annotation prop "magics"
replacing pytype with mypy
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
+ Coverage 78.62% 80.13% +1.50%
==========================================
Files 27 28 +1
Lines 3416 3630 +214
==========================================
+ Hits 2686 2909 +223
+ Misses 730 721 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This release fixes how document and annotation properties are read and written, and adds a write mode for MMIF producers.
Mmif.serialize()no longer changes the object it serializes. It also replacespytypewithmypyas the test-time type checker.Additions
Mmif.set_producer(): new write mode for producers, returning aProducerContext. It keeps capitalAnnotationrecords andcontainsfactoring within the views of the current run, so earlier views stay unchanged. It also takes over empty-view pruning from clams-python (adding consistent handling of "empty" views returned from apps clams-python#307). See redesigningAnnotationandDocumentproperty handling #411 for the design discussion.Changes
Mmif.get_start(),Mmif.get_end(), video document lookup, and document properties: fixed a bug where values factored to the view level were not found when reading a MMIF file (improving shared-value property factoring #398)Mmif.serialize(): fixed bugs where it changed theMmifobject in memory, wrote document properties twice withsanitize=True, and silently dropped data when an error occurred during serialization (redesigningAnnotationandDocumentproperty handling #411)Document.add_property():location,text, andmimecan now be set only once. Only themmif sourcecommand is meant to set these values, so this adds only a preemptive check and does not change how apps should behavenew_contain(): fixed a bug where metadata was dropped when the type was already in the view. It now always returns theContainMmif.generate_capital_annotations(),Mmif.factor_out_shared_properties(),Mmif.sanitize(), and the matchingMmif.serialize()arguments, to be removed in 2.0.0. Adding properties to existing documents without a producer now issues aFutureWarningWorkflowSource: fixed a bug where common metadata given as a JSON string raised aTypeErrormypyin place ofpytype(replacing pytype with mypy #414)