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

Sync notebook github links in HTML docs to the git commit used to build them #3080

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

bmorris3
Copy link
Contributor

@bmorris3 bmorris3 commented Jul 10, 2024

Description

The HTML docs on RTD like this page point to directories on github like https://github.com/spacetelescope/jdaviz/tree/main/notebooks. We've changed the default RTD page to stable, which isn't the same as main, so the notebooks linked on RTD will be out of sync with the rest of the HTML docs whenever main != stable.

This PR gets the git commit hash at the time the docs are built, and injects that hash into the github URLs for docs links.

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)? 🐱

@github-actions github-actions bot added the documentation Explanation of code and concepts label Jul 10, 2024
@bmorris3 bmorris3 added the backport-v3.10.x on-merge: backport to v3.10.x label Jul 10, 2024
@bmorris3 bmorris3 added this to the 3.10.3 milestone Jul 10, 2024
@bmorris3
Copy link
Contributor Author

In the RTD build for this PR, you can prove to yourself that this is working by trying out the following links and comparing the commit hash to the most recent commit hash in this PR:

  • in Quickstart, click the link to ImvizExample.ipynb under the first subheading "In a Jupyter Notebook"
  • from the landing page, click "Sample Notebooks" > "Sample Jdaviz Notebooks"

@bmorris3 bmorris3 added the no-changelog-entry-needed changelog bot directive label Jul 10, 2024
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.79%. Comparing base (e65237f) to head (2201752).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3080   +/-   ##
=======================================
  Coverage   88.79%   88.79%           
=======================================
  Files         111      111           
  Lines       17236    17236           
=======================================
  Hits        15305    15305           
  Misses       1931     1931           

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

@bmorris3 bmorris3 marked this pull request as ready for review July 10, 2024 19:16
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Simpler than what I thought it would be. Seems to work and RTD is happy. Thanks!

@bmorris3 bmorris3 merged commit 3e7aade into spacetelescope:main Jul 11, 2024
33 of 36 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Jul 11, 2024
pllim added a commit that referenced this pull request Jul 11, 2024
…0-on-v3.10.x

Backport PR #3080 on branch v3.10.x (Sync notebook github links in HTML docs to the git commit used to build them)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v3.10.x on-merge: backport to v3.10.x documentation Explanation of code and concepts no-changelog-entry-needed changelog bot directive Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants