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

Add Version Increment Check Workflow #53

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Conversation

ThomasGesseyJones
Copy link
Collaborator

Adds a GitHub workflow that automatically checks the version number has been incremented in a PR. It fails if the version has not been incremented appropriately. This PR also removes the duplicate specifications of version numbers by having setup.py read the version number from README.rst to avoid self-inconsistency issues.

This feature was requested in #52 .

Note: This PR should intentionally fail the version increment check initially as part of testing.

This is done so version number is only set in one place, README.rst, reducing the chance of self-inconsistencies
Based on that of globalemu and anesthetic.
This will intentionally fail on PR so I can check it is working.
@AdamOrmondroyd
Copy link
Collaborator

Certainly seems to work, though I've personally never been a fan of writing def main() only to call that and nothing else under if __name__ == "__main__", though that might just be trauma from Java

otherwise lgtm

@htjb
Copy link
Owner

htjb commented Dec 14, 2023

Looks good @ThomasGesseyJones! Just one query about the get_version.py script.

@AdamOrmondroyd what is lgmt hahaa?

@AdamOrmondroyd
Copy link
Collaborator

@AdamOrmondroyd what is lgmt hahaa?

Looks good to me (one I've picked up from pandas PRs), though it seems to cause no end of confusion with you lot

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6dbc685) 82.35% compared to head (6130693) 82.35%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files           5        5           
  Lines         578      578           
=======================================
  Hits          476      476           
  Misses        102      102           

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

@ThomasGesseyJones
Copy link
Collaborator Author

I have removed get_version.py as it was unused.

I mistakenly copied it over alongside check_version.py from globalemu. The get_version.py script is used as part of automatic tagging workflows. It can be restored in the future if we decide to implement automatic tagging.

@htjb
Copy link
Owner

htjb commented Dec 14, 2023

Awesome lgtm thanks @ThomasGesseyJones! Please go ahead and squash and merge

@ThomasGesseyJones ThomasGesseyJones merged commit 93471be into master Dec 14, 2023
5 checks passed
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.

4 participants