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

Auto release & Improve CI #907

Merged
merged 3 commits into from
May 29, 2024
Merged

Auto release & Improve CI #907

merged 3 commits into from
May 29, 2024

Conversation

lkstrp
Copy link
Member

@lkstrp lkstrp commented May 28, 2024

Changes proposed in this Pull Request

Some changes to the CI and release workflow:

  • Moved setup.py content to pyproject.toml
  • No manual version bumping needed anymore (just use a tag)
    • Use setuptools scm for version extraction
    • CITATION.cff is manually updated via deploy action, because setuptools_scm can't handle that
  • Deploy action
    • Only runs for tagged version now (instead of starting and aborting afterwards) -> cleaner job history
    • Also creates GitHub releases
      • I added a link to the revised release notes in the documentation, we could probably drop the auto generated release notes here completely.
    • Also updates CITATION.cff, see above
  • Renamed ci action (test)
    • Since only tests are run here and all workflows are ci

Using setuptools_scm has some additional changes:

  • All commits after the release 0.28.0 do not have the version 0.28.0 anymore, but get a dev version for each commit after the release like pypsa-0.28.1.dev18+ged71d587
    • Which means there are some changes for the internal behaviour of the version for network objects and loading examples from GitHub. In linopy this was probably not noticed because there is no methodology based on the version.
    • I adjusted it so far, but this could be improved in the future

Copy link
Collaborator

@FabianHofmann FabianHofmann left a comment

Choose a reason for hiding this comment

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

Looks great! Feel free to merge :)

from pypsa import __version__ # avoid cyclic imports

return f"{url}v{__version__}/"
from pypsa import release_version # avoid cyclic imports
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense to have release version defined. The decrementing feels a bit hacky but should be okay :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I would change the decrement at some point. Either just going for the examples in the master branch, or going for examples for each version. But then they need to be updated in every version which is not happening right now.

@lkstrp lkstrp enabled auto-merge May 29, 2024 08:51
@lkstrp lkstrp merged commit cca33db into PyPSA:master May 29, 2024
16 of 17 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.

2 participants