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

Update parse_purlobourl() test for change to rat metadata #1227

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Feb 27, 2023

test_metadata.py::test_parseobourl[http://purl.obolibrary.org/obo/NCBITaxon_10116-value1] is currently failing because the obolibrary resource now lists "rat" rather than "Norway rat" as the first oboInOwl:hasExactSynonym entry.

@jwodder jwodder added the tests Add or improve existing tests label Feb 27, 2023
@jwodder jwodder requested a review from satra February 27, 2023 15:37
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Base: 89.20% // Head: 89.16% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (5b8fa60) compared to base (a7af085).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1227      +/-   ##
==========================================
- Coverage   89.20%   89.16%   -0.05%     
==========================================
  Files          74       74              
  Lines        9443     9444       +1     
==========================================
- Hits         8424     8421       -3     
- Misses       1019     1023       +4     
Flag Coverage Δ
unittests 89.16% <100.00%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
dandi/tests/test_metadata.py 100.00% <100.00%> (ø)
dandi/download.py 88.02% <0.00%> (-0.68%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@satra
Copy link
Member

satra commented Feb 27, 2023

while this would work, it seems that some aspect of it is not deterministic. on the webpage, rat is the last exact synonym. so this may fix this problem, but may not be stable. we may want to change the test to account for possible reordering (so using a set perhaps).

@jwodder
Copy link
Member Author

jwodder commented Feb 27, 2023

@satra When I view the actual XML (via curl), I see "rat" as the first synonym and "Norway rat" as the last. Do we know how the XML is generated?

@satra
Copy link
Member

satra commented Feb 27, 2023

we don't and it's possible that the search call in this function (https://github.com/dandi/dandi-cli/blob/master/dandi/metadata.py#L528) is non-deterministic.

@jwodder
Copy link
Member Author

jwodder commented Feb 27, 2023

@satra I've updated the test to accept all of the "rat" synonyms currently listed on the page.

@yarikoptic yarikoptic merged commit 10e1316 into master Feb 27, 2023
@yarikoptic yarikoptic deleted the no-rat branch February 27, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Add or improve existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants