htjb / margarine

Code to replicate posterior probability distributions with bijectors/KDEs and perform marginal KL/bayesian dimensionality calculations.
MIT License
13 stars 8 forks source link

Add Version Increment Check Workflow #53

Closed ThomasGesseyJones closed 9 months ago

ThomasGesseyJones commented 9 months ago

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.

AdamOrmondroyd commented 9 months ago

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 commented 9 months ago

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

@AdamOrmondroyd what is lgmt hahaa?

AdamOrmondroyd commented 9 months ago

@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 commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ThomasGesseyJones commented 9 months ago

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 commented 9 months ago

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