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

RTD: Clear the dirty git index flag #8644

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

jhunkeler
Copy link
Collaborator

@jhunkeler jhunkeler commented Jul 13, 2024

Resolves JP-nnnn

Closes #

The last build (#8642) produced:

Version: 1.15.2.dev10+g2d15511ca.d20240712

RTD modifies indexed files in the repository prior to building the documentation. This change should prevent setuptools_scm from returning a dirty version (.dXXXXXXXX suffix).

See: https://docs.readthedocs.io/en/stable/build-customization.html#avoid-having-a-dirty-git-index

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • All comments are resolved
  • Make sure the JIRA ticket is resolved properly

Copy link

codecov bot commented Jul 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.60%. Comparing base (136f1d9) to head (eb692d3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8644      +/-   ##
==========================================
- Coverage   59.61%   59.60%   -0.01%     
==========================================
  Files         391      391              
  Lines       39287    39280       -7     
==========================================
- Hits        23419    23412       -7     
  Misses      15868    15868              

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

@braingram
Copy link
Collaborator

I'm seeing a dev version on this docs for this PR:
Screenshot 2024-07-15 at 10 11 19 AM
I think this is expected (since it's not a tagged commit). Is this expected?

@jhunkeler
Copy link
Collaborator Author

jhunkeler commented Jul 15, 2024

Yes, this is expected. This is my local test case:

  1. Make a tag
git tag -a 1.10.100 -m "test tag"
pip install -e '.[test,docs]'
(cd docs && make html)

version_ok

  1. Make it dirty
echo '#' >> docs/Makefile
git describe --long --dirty
1.10.100-0-g590ef5d27-dirty

pip install -e .
Successfully installed jwst-1.10.101.dev0+g590ef5d27.d20240715

(cd docs && make html)

version_dirty

  1. Clear the dirty flag
git update-index --assume-unchanged docs/Makefile
pip install -e .
Successfully uninstalled jwst-1.10.101.dev0+g590ef5d27.d20240715
Successfully installed jwst-1.10.100

(cd docs && make html)

version_ok_again

Note: We marked the local Makefile as "unchanged" even though it is. You can tell git to care about this file again by using --no-assume-unchanged.

git describe --long --dirty
1.10.100-0-g590ef5d27

git update-index --no-assume-unchanged docs/Makefile

git describe --long --dirty
1.10.100-0-g590ef5d27-dirty

Copy link
Collaborator

@braingram braingram left a comment

Choose a reason for hiding this comment

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

Thanks!

@nden nden merged commit 7a29796 into spacetelescope:master Jul 17, 2024
27 checks passed
@nden nden added this to the Build 11.1 milestone Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants