python-cachier / cachier

Persistent, stale-free, local and cross-machine caching for Python functions.
MIT License
534 stars 60 forks source link

automate & simplify release #180

Closed Borda closed 6 months ago

Borda commented 6 months ago

resolves #158

Actual state

ATM, the version is just appending the number of steps after the tag, which does not distinguish between branches, so it is quite useless with respect to the extensive heavy machinery of versioneer... :chipmunk:

proposed solution

it redo versions and add the workflow for automated releasing

Redo version relies on a static file instead of git, which allows installation with git archive as, for example, pip install https://github.com/python-cachier/cachier/archive/refs/heads/release-version.zip The generated package that would be uploaded to PyPI has only this static version, as expected. :rabbit: For development and using pip install -e . (which relies on the living code as -e does only symlink to the local source code), it will append actual sha so instead of the 2.2.2.post.dev25 gives v2.3.0.dev+c16f0f1 which is easier to identify what version is really used/running... :robot:

For release, the process is such:

  1. update the base version in cachier/version.info
  2. with GH release page draft and publish release

summary

codecov[bot] commented 6 months ago

Codecov Report

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

Comparison is base (c16f0f1) 97.89% compared to head (5af303a) 97.89%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/python-cachier/cachier/pull/180/graphs/tree.svg?width=650&height=150&src=pr&token=fhsTDs7HL9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier)](https://app.codecov.io/gh/python-cachier/cachier/pull/180?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier) ```diff @@ Coverage Diff @@ ## master #180 +/- ## ======================================= Coverage 97.89% 97.89% ======================================= Files 6 6 Lines 523 523 Branches 94 94 ======================================= Hits 512 512 Misses 10 10 Partials 1 1 ``` ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/python-cachier/cachier/pull/180?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/python-cachier/cachier/pull/180?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier). Last update [c16f0f1...5af303a](https://app.codecov.io/gh/python-cachier/cachier/pull/180?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-cachier).