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

#174 - FSes that are only transitively referenced cannot be serialized #179

Merged
merged 1 commit into from
Aug 14, 2021

Conversation

jcklie
Copy link
Collaborator

@jcklie jcklie commented Aug 14, 2021

  • When serializing XMI, set XMI ids if None

@jcklie jcklie added this to the 0.6.0 milestone Aug 14, 2021
@jcklie jcklie self-assigned this Aug 14, 2021
@jcklie jcklie linked an issue Aug 14, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 14, 2021

Codecov Report

Merging #179 (56bc8ba) into main (9140380) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
+ Coverage   97.49%   97.56%   +0.07%     
==========================================
  Files           9        9              
  Lines        1873     1888      +15     
==========================================
+ Hits         1826     1842      +16     
+ Misses         47       46       -1     
Impacted Files Coverage Δ
cassis/xmi.py 96.51% <100.00%> (+0.09%) ⬆️
tests/test_xmi.py 100.00% <100.00%> (ø)
tests/fixtures.py 100.00% <0.00%> (ø)
cassis/typesystem.py 96.65% <0.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9140380...56bc8ba. Read the comment docs.

@jcklie jcklie merged commit 5e09005 into main Aug 14, 2021
@jcklie jcklie deleted the bugfix/174-unset-xmi-ids branch August 14, 2021 16:31
reckart added a commit that referenced this pull request Aug 18, 2021
#179)

- Initial fix did only work for the first fs without xmiID, but as soon as there would be two FSes with missing ids, it broke
- Extended the test
- Implemented an alternative fix that optionally sets the missing IDs while scanning the CAS for FSes thus also avoiding scanning the CAS twice during serialization
reckart added a commit that referenced this pull request Aug 18, 2021
#179)

- Only generate new ID if ID is actually missing
reckart added a commit that referenced this pull request Aug 18, 2021
#179)

- Turn on ID generation during FS scan in general because the FS scan internally uses a map in which the ID is the key and if the IDs are not uniquely generated, then the result of the method is incomplete.
- Add consistency checks fo _find_all_fs to detect e.g. duplicate FS IDs
- Fixed a test which introduced a duplicate FS ID
reckart added a commit that referenced this pull request Aug 18, 2021
reckart added a commit that referenced this pull request Aug 18, 2021
…sitively-referenced-cannot-be-serialized

#174 - FSes that are only transitively referenced cannot be serialized (#179)
reckart added a commit that referenced this pull request Aug 19, 2021
* main:
  #172 - Naming: cas.add_annotation(s) (#181)
  #175 - Set a feature if the feature name is in a variable (#180)
  #175 - Set a feature if the feature name is in a variable
  #174 - FSes that are only transitively referenced cannot be serialized (#179)
  #170 - Handling of the "uima.noNamespace" prefix (#178)
  No issue
  #173 - Rename add_feature to create_feature (#177)

# Conflicts:
#	cassis/typesystem.py
reckart added a commit that referenced this pull request Aug 19, 2021
…annot-be-serialized' into feature/168-Experimental-JSON-CAS-support

* bugfix/174-FSes-that-are-only-transitively-referenced-cannot-be-serialized:
  #174 - FSes that are only transitively referenced cannot be serialized (#179)
reckart added a commit that referenced this pull request Aug 19, 2021
…annot-be-serialized' into feature/168-Experimental-JSON-CAS-support

* bugfix/174-FSes-that-are-only-transitively-referenced-cannot-be-serialized:
  #174 - FSes that are only transitively referenced cannot be serialized (#179)
reckart added a commit that referenced this pull request Aug 19, 2021
* main:
  #174 - FSes that are only transitively referenced cannot be serialized (#179)
  #174 - FSes that are only transitively referenced cannot be serialized (#179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FSes that are only transitively referenced cannot be serialized
1 participant