-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Allow provider specific examples #1429
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
+ Coverage 42.51% 46.86% +4.35%
==========================================
Files 117 120 +3
Lines 8327 8529 +202
Branches 1963 1415 -548
==========================================
+ Hits 3540 3997 +457
+ Misses 4582 4316 -266
- Partials 205 216 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
@nagutm thanks for looking into this! One thing that's important for any new schema change proposals is to add a real curation to bioregistry.json that reflects usage of the new schema element.
Specifically for this one, we want to make sure we apply the regular expression pattern to validate the ID is valid. You can use the code that checks the primary example / example extras as reference
Speaking of example extras, there should be a nice way of aggregating any possible specific examples put in the providers into the example_extras field. The question is: should we require double curation there, or should we have the function that wraps it automatically grab and aggregate them? Check usages of .example_extras
to see what might be more comfy
@cthoyt Could you clarify exactly what piece of code you are referring to here that checks the primary example/example extras? |
I added a method to the Resource class called |
There are tests that check whether example identifiers for a given entry conform to the identifier regular expression pattern definition. These tests should cover not only the default and extra examples but also the examples specific to providers so if an invalid example identifier is added, the test fails. |
I added a provider example for |
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.
besides the comments I left, this is ready to go. Thanks @nagutm
Closes #1417
It updates the web front-end to check if a provider-specific example is available and, if so, modifies the provider link in the Extra Providers sections to use the custom example ID instead of the default one.
As a test I added a custom example for
bfvd
which is a provider foruniprot
and it correctly displays the link with the custom example and is able to resolve the ID appropriately.