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

Fix getting version #187

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Fix getting version #187

merged 4 commits into from
Dec 1, 2023

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Nov 29, 2023

Alternative to #185.

Progress of the PR

  • Use fallback_version at build time to define version when necessary version control information are missing (git archive or shallow checkout). When making a new release, the fallback_version will be updated automatically by the prepare_release.py script,
  • Use setuptools_scm at runtime only when possible,
  • Fix getting version on system wide install on debian/ubuntu
  • [n/a] update docstring (if appropriate),
  • update user guide (if appropriate),
  • add a changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting of the changelog entry (and eventual user guide changes) in the docs/readthedocs.org:rosettasciio build of this PR (link in github checks)
  • add tests (check version on CI), also tested manually from git archive,
  • ready for review.

- debian use `dist-packages` instead of `site-packages`
- dev version, opt in to use setuptools_scm when possible, for example for non shallow checkout
prepare_release.py Fixed Show fixed Hide fixed
prepare_release.py Fixed Show fixed Hide fixed
rsciio/__init__.py Fixed Show fixed Hide fixed
@ericpre ericpre force-pushed the fix_getting_version branch from 73f4e5c to 96b9fc9 Compare November 29, 2023 17:22
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (13507d4) 86.02% compared to head (136a7dc) 86.01%.
Report is 26 commits behind head on main.

Files Patch % Lines
rsciio/__init__.py 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
- Coverage   86.02%   86.01%   -0.01%     
==========================================
  Files          81       81              
  Lines       10387    10390       +3     
  Branches     2253     2254       +1     
==========================================
+ Hits         8935     8937       +2     
  Misses        931      931              
- Partials      521      522       +1     

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

@ericpre
Copy link
Member Author

ericpre commented Nov 29, 2023

@CSSFrancis, @magnunor, can you please have a look at this PR?

Copy link
Member

@CSSFrancis CSSFrancis left a comment

Choose a reason for hiding this comment

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

Looks like pretty sound logic to me. @magnunor If you want to test things to make sure that they work as intended for your case that would be good.

My suggestions are just some small documentation things to make it a bit clearer as to what is happening.

releasing_guide.md Outdated Show resolved Hide resolved
releasing_guide.md Outdated Show resolved Hide resolved
prepare_release.py Show resolved Hide resolved
@ericpre ericpre force-pushed the fix_getting_version branch from 96b9fc9 to 136a7dc Compare November 29, 2023 20:41
@ericpre
Copy link
Member Author

ericpre commented Nov 29, 2023

Thank you @CSSFrancis, this was poorly and I was a bit lazy to improve it! 😅 This should be better now!

@CSSFrancis
Copy link
Member

Thank you @CSSFrancis, this was poorly and I was a bit lazy to improve it! 😅 This should be better now!

No problem :) I think I'm much worse at that than you are. This looks good to me

@magnunor
Copy link
Contributor

magnunor commented Dec 1, 2023

Checking this now!

@magnunor
Copy link
Contributor

magnunor commented Dec 1, 2023

That fixed the issue (#184)!

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.

3 participants