-
Notifications
You must be signed in to change notification settings - Fork 12
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
TestWrite.test_missing_entries()
#533
base: master
Are you sure you want to change the base?
Conversation
ef955af
to
97d9ab1
Compare
# TODO: Determine assertions that should pass | ||
# TODO: Fix failing assertions that should pass | ||
# TODO: before merging, remove pass/fail comments at end of assertion lines | ||
def test_missing_entries(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get assertions to pass
- 1. Determine assertions that should pass @matentzn
- 2. Fix failing assertions that should pass
- 3. before merging, remove pass/fail comments at end of assertion lines
# TODO: Determine assertions that should pass | ||
# TODO: Fix failing assertions that should pass | ||
# TODO: before merging, remove pass/fail comments at end of assertion lines | ||
def test_missing_entries(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which assertions are appropriate?
- @matentzn review
Can you look at the assertions I've made and determine which ones you think should be expected to pass, and which should not?
I've left temporary comments next to each assertion showing their current pass/fail status.
"mapping_provider": "https://www.orpha.net/", | ||
} | ||
|
||
# When passing Converter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: 2 different setups
I have a set of assertions for 2 cases of MappingSetDataFrame
instantiation:
- with inclusion of a
Converter
- with no inclusion of a
Converter
001557e
to
43fa8f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very good test! Thank you!
with open(tmp_file, "w") as f: | ||
write_table(msdf, f) | ||
msdf2 = parse_sssom_table(tmp_file) | ||
self.assertIn("curie_map", msdf2.metadata) # fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behaviour is expected for now, because curie_map
sort if lives outside the metadata. however, it will soon be solved: mapping-commons/sssom#349
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I'm surprised it wasn't part of the data model.
From an implementation standpoint, I was thinking that maybe msdf.prefix_map
and msdf.metadata['curie_map']
could point to the same Python dictionary object. Right now they are different objects and, as these assertions show, can get out of sync.
43fa8f5
to
c82302d
Compare
addresses #534
Changes