calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
287 stars 93 forks source link

Add PyPI upload CI and release checklist #542

Closed brynpickering closed 8 months ago

brynpickering commented 8 months ago

Automates the release to PyPI, including a safety CI to release to Test-PyPI in a release PR before uploading to PyPI when a release is tagged and then published.

Summary of changes in this pull request:

Reviewer checklist:

brynpickering commented 8 months ago

I should point out that the CI may not actually work properly, but it's difficult to test until it's merged in. So we may need to iterate on the CI jobs when we see how it reacts to our alpha release PR.

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (e2bfb1a) 95.66% compared to head (241e17e) 95.70%. Report is 3 commits behind head on main.

:exclamation: Current head 241e17e differs from pull request most recent head bfeb9c3. Consider uploading reports for the commit bfeb9c3 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #542 +/- ## ========================================== + Coverage 95.66% 95.70% +0.04% ========================================== Files 24 24 Lines 3526 3562 +36 Branches 765 710 -55 ========================================== + Hits 3373 3409 +36 Misses 87 87 Partials 66 66 ``` | [Files](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project) | Coverage Δ | | |---|---|---| | [src/calliope/backend/backend\_model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2JhY2tlbmQvYmFja2VuZF9tb2RlbC5weQ==) | `97.84% <100.00%> (+0.10%)` | :arrow_up: | | [src/calliope/backend/pyomo\_backend\_model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2JhY2tlbmQvcHlvbW9fYmFja2VuZF9tb2RlbC5weQ==) | `94.94% <100.00%> (+0.35%)` | :arrow_up: | | [src/calliope/cli.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2NsaS5weQ==) | `81.67% <100.00%> (ø)` | | | [src/calliope/examples.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2V4YW1wbGVzLnB5) | `100.00% <100.00%> (ø)` | | | [src/calliope/model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL21vZGVsLnB5) | `93.65% <ø> (ø)` | | | [src/calliope/preprocess/model\_data.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3ByZXByb2Nlc3MvbW9kZWxfZGF0YS5weQ==) | `100.00% <ø> (ø)` | | | [src/calliope/util/logging.py](https://app.codecov.io/gh/calliope-project/calliope/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3V0aWwvbG9nZ2luZy5weQ==) | `93.87% <ø> (ø)` | |