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

Make all $ref absolute URI refs #527

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WilliamJamieson
Copy link
Collaborator

This PR makes all $ref uris absolute URIs (the id registered for a given schema in ASDF) rather than relative URIs. Additionally it adds tests which enforce this convention.

This is useful for two reasons:

  1. It makes all the URI usage (both tag and $ref) follow a consistent pattern.
  2. Makes processing of $ref values outside of the directory structure of rad or ASDF easier as it is much easier to look up based on the id URI rather than figuring out a $ref based on context.

Note this breaks one test in roman_datamodels, which for some reason is testing RAD schema contents rather than datamodels (it checks ref_common is included in all reference file schemas).

Tasks

  • Update or add relevant rad tests.
  • Update relevant docstrings and / or docs/ page.
  • Does this PR change any schema files?
    • Schema changes were discussed at RAD Review Board meeting.
  • Does this PR change any API used downstream? (If not, label with no-changelog-entry-needed.)
News fragment change types:
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (0fd380a) to head (d96b8da).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
+ Coverage   96.41%   96.59%   +0.18%     
==========================================
  Files           4        4              
  Lines         223      235      +12     
==========================================
+ Hits          215      227      +12     
  Misses          8        8              

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

@WilliamJamieson
Copy link
Collaborator Author

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