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

Clean up URL parsing in extract_species() #1416

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Mar 1, 2024

yarl doesn't really seem like it would help with this bit, but I came up with a different way to make the code arguably cleaner.

@jwodder jwodder added internal Changes only affect the internal API code quality Nonfunctional improvements to the codebase labels Mar 1, 2024
@jwodder jwodder requested review from yarikoptic and satra March 1, 2024 17:42
@jwodder jwodder mentioned this pull request Mar 1, 2024
5 tasks
@jwodder jwodder marked this pull request as ready for review March 1, 2024 17:43
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.61%. Comparing base (2cafb50) to head (a670474).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1416      +/-   ##
==========================================
+ Coverage   88.53%   88.61%   +0.07%     
==========================================
  Files          77       77              
  Lines       10527    10528       +1     
==========================================
+ Hits         9320     9329       +9     
+ Misses       1207     1199       -8     
Flag Coverage Δ
unittests 88.61% <100.00%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

since otherwise while looking at the use not clear
what that index is.  May be later it would be even
some other level (but still the same template) than species
so best to just mention that it is NCBITAXON URL

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "git-sedi SPECIES_URI_TEMPLATE NCBITAXON_URI_TEMPLATE",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@@ -329,66 +329,68 @@ def extract_cellLine(metadata: dict) -> str | None:
return None


NCBITAXON_URI_TEMPLATE = "http://purl.obolibrary.org/obo/NCBITaxon_{}"
Copy link
Member

Choose a reason for hiding this comment

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

pushed a renaming for that template variable. If really don't like it -- revert, but I think that it is better when more specific like this

@yarikoptic yarikoptic merged commit 4a1f7a7 into master Mar 5, 2024
28 checks passed
@yarikoptic yarikoptic deleted the clean-extract-species branch March 5, 2024 01:00
Copy link

🚀 PR was released in 0.61.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Nonfunctional improvements to the codebase internal Changes only affect the internal API released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants