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

Ref links #379

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Ref links #379

merged 1 commit into from
Feb 26, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Feb 26, 2024

This PR configures sphinx-asdf to create links to other rad schemas when a tag is encountered in the schema.

For example, the current wfi_image schema contains a tag to photometry:
https://rad.readthedocs.io/en/latest/generated/schemas/wfi_image-1.0.0.html
However this link is currently invalid (pointing to asdf://stsci.edu/datamodels/roman/tags/photometry-1.0.0.html). With this PR the link now points to:
https://rad.readthedocs.io/en/latest/generated/schemas/photometry-1.0.0.html

Checklist

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.38%. Comparing base (0fb1239) to head (edc209e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #379   +/-   ##
=======================================
  Coverage   95.38%   95.38%           
=======================================
  Files           4        4           
  Lines         195      195           
=======================================
  Hits          186      186           
  Misses          9        9           

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

@nden nden added this to the Build 14 milestone Feb 26, 2024
@braingram braingram marked this pull request as ready for review February 26, 2024 17:38
@braingram braingram requested a review from a team as a code owner February 26, 2024 17:38
@nden nden added the documentation Improvements or additions to documentation label Feb 26, 2024
Copy link
Collaborator

@nden nden left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for implementing it so quickly!

@nden nden merged commit 98637d4 into spacetelescope:main Feb 26, 2024
15 of 17 checks passed
@braingram braingram deleted the ref_links branch February 26, 2024 17:40
@braingram
Copy link
Collaborator Author

Thanks for the review!

Note that the wildcard usage of external tags (like wcs-*) does not appear to be compatible with sphinx-asdf generating links. This means that similar mapping entries to asdf_schema_resource_mappings won't allow linking to gwcs, asdf-standard, etc. I'd say this is a sphinx-asdf bug but I didn't immediately see a way to fix it. I'll open an issue for sphinx-asdf to track it and once fixed rad can be updated to generate links for non-rad schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation no-changelog-entry-needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants