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

Introduce UidModel subclass of HasProperties #149

Closed
wants to merge 1 commit into from
Closed

Conversation

fwkoch
Copy link
Contributor

@fwkoch fwkoch commented Mar 20, 2017

UidModel primarily exists to improve serialization. By adding a uid to all objects, they can be serialized into a flat dictionary that only contains each object once, with all references done by uid (as opposed to the nested structure of HasProperties serialization). This also allows recursive self-references to be serialized. This is based on a class written for the OMF library: https://github.com/GMSGDataExchange/omf/blob/v0.9.0/omf/base.py#L12 - see #128

HasProperties serialization:
screen shot 2017-03-20 at 3 50 40 pm

UidModel serialization:
screen shot 2017-03-20 at 3 51 09 pm

@codecov-io
Copy link

codecov-io commented Mar 20, 2017

Codecov Report

Merging #149 into master will decrease coverage by 1.17%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
- Coverage   96.64%   95.46%   -1.18%     
==========================================
  Files          14       14              
  Lines        1756     1788      +32     
==========================================
+ Hits         1697     1707      +10     
- Misses         59       81      +22
Impacted Files Coverage Δ
properties/__init__.py 80% <ø> (ø) ⬆️
properties/base/base.py 90.11% <50%> (-8.53%) ⬇️

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 d52e2d4...13ab177. Read the comment docs.

@fwkoch
Copy link
Contributor Author

fwkoch commented Apr 16, 2018

A similar but updated implementation is found in #234

@fwkoch fwkoch closed this Apr 16, 2018
@fwkoch fwkoch deleted the feat/uid_model branch July 4, 2018 02:09
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