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

New internal implementation of data lists (Mmif.media, Mmif.views, View.annotations) #60

Merged
merged 27 commits into from
Aug 13, 2020

Conversation

angus-lherrou
Copy link
Contributor

@angus-lherrou angus-lherrou commented Aug 3, 2020

I have implemented __getitem__ for Mmif and View and implemented the Mmif.media, Mmif.views, and View.annotations lists internally as MmifObject::DataList objects that hide the implementation of these lists.

For now, I have implemented DataLists as dicts that serialize into lists. We can continue discussing the pros and cons of using dicts vs lists here or in #40.

@angus-lherrou angus-lherrou marked this pull request as draft August 3, 2020 16:06
@angus-lherrou angus-lherrou changed the title 40 dicts keyed by Draft: New internal implementation of data lists (Mmif.media, Mmif.views, View.annotations) Aug 3, 2020
@angus-lherrou
Copy link
Contributor Author

Creating this draft PR to resolve conflicts with develop and discuss code changes

@angus-lherrou
Copy link
Contributor Author

Rebased off of new develop branch

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2020

Codecov Report

Merging #60 into develop will decrease coverage by 0.51%.
The diff coverage is 96.26%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #60      +/-   ##
===========================================
- Coverage    96.56%   96.04%   -0.52%     
===========================================
  Files            7        7              
  Lines          349      430      +81     
===========================================
+ Hits           337      413      +76     
- Misses          12       17       +5     
Flag Coverage Δ
#unittests 96.04% <96.26%> (-0.52%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmif-python/mmif/serialize/mmif.py 94.39% <93.54%> (-2.83%) ⬇️
mmif-python/mmif/serialize/model.py 94.62% <97.43%> (+1.40%) ⬆️
mmif-python/mmif/serialize/annotation.py 97.87% <100.00%> (+0.19%) ⬆️
mmif-python/mmif/serialize/medium.py 94.62% <100.00%> (ø)
mmif-python/mmif/serialize/view.py 100.00% <100.00%> (ø)

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 026a14c...b69979a. Read the comment docs.

angus-lherrou added a commit that referenced this pull request Aug 6, 2020
Adding some tests written during work on #60
@angus-lherrou
Copy link
Contributor Author

Rebased again

@angus-lherrou angus-lherrou marked this pull request as ready for review August 12, 2020 18:55
@angus-lherrou angus-lherrou changed the title Draft: New internal implementation of data lists (Mmif.media, Mmif.views, View.annotations) New internal implementation of data lists (Mmif.media, Mmif.views, View.annotations) Aug 12, 2020
@angus-lherrou
Copy link
Contributor Author

Fixed merge conflicts

Copy link
Member

@keighrim keighrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test fails and seems that there's a bug in the DataList class. Can you take a look at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

re-implement views, media, annotations as dict keyed by ID
3 participants