Skip to content

Implement content negotiation for resources, registries, and collections#682

Merged
cthoyt merged 9 commits into
mainfrom
content-negotiation-redux
Dec 13, 2022
Merged

Implement content negotiation for resources, registries, and collections#682
cthoyt merged 9 commits into
mainfrom
content-negotiation-redux

Conversation

@cthoyt

@cthoyt cthoyt commented Dec 12, 2022

Copy link
Copy Markdown
Member

This PR adds content negotiation to the UI pages for resources (e.g., GO), registries (e.g., BARTOC), and collections. It's enable to serve JSON and YAML direct dumps of the internal Pydantic models OR the RDF flavor. I'm guessing I will find that the FAIR Evaluator expects some more specific things from the RDF, which we can update next.

CC @micheldumontier @vemonet

@codecov-commenter

codecov-commenter commented Dec 12, 2022

Copy link
Copy Markdown

Codecov Report

Base: 39.28% // Head: 39.40% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (fa959d5) compared to base (e92228c).
Patch coverage: 81.13% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #682      +/-   ##
==========================================
+ Coverage   39.28%   39.40%   +0.12%     
==========================================
  Files         129      129              
  Lines        7265     7298      +33     
  Branches     1654     1663       +9     
==========================================
+ Hits         2854     2876      +22     
- Misses       4240     4249       +9     
- Partials      171      173       +2     
Impacted Files Coverage Δ
src/bioregistry/app/utils.py 77.22% <73.07%> (-3.73%) ⬇️
src/bioregistry/app/api.py 55.94% <80.00%> (+0.46%) ⬆️
src/bioregistry/app/ui.py 82.29% <100.00%> (+0.97%) ⬆️
src/bioregistry/version.py 68.42% <100.00%> (ø)
src/bioregistry/utils.py 62.04% <0.00%> (-0.73%) ⬇️
src/bioregistry/schema/struct.py 87.24% <0.00%> (-0.12%) ⬇️

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.

@cthoyt cthoyt marked this pull request as ready for review December 13, 2022 11:00
@cthoyt cthoyt changed the title Content negotiation Implement content negotiation for resources, registries, and collections Dec 13, 2022
@cthoyt cthoyt merged commit 528a573 into main Dec 13, 2022
@cthoyt cthoyt deleted the content-negotiation-redux branch December 13, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants