Skip to content

Commit dd92168

Browse files
Pre-release fixes (#550)
* Fix CI version getter and add pip build tests * Update dependencies
1 parent a5b83ba commit dd92168

File tree

6 files changed

+51
-17
lines changed

6 files changed

+51
-17
lines changed

.github/workflows/pr-ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,35 @@ jobs:
9494
version: ${{ steps.get-version.outputs.version }}
9595
steps:
9696
- id: get-version
97-
run: echo "version=${${{github.event.pull_request.title}}#"Release "}" >> $GITHUB_OUTPUT
97+
run: |
98+
fullname="${{github.event.pull_request.title}}"
99+
echo "version=${fullname#"Release "}" >> $GITHUB_OUTPUT
100+
101+
pip-test:
102+
runs-on: ubuntu-latest
103+
if: startsWith(github.event.pull_request.title, 'Release v')
104+
steps:
105+
- uses: actions/checkout@v4
106+
- uses: mamba-org/setup-micromamba@v1
107+
with:
108+
micromamba-version: latest
109+
environment-name: pipbuild
110+
create-args: >-
111+
python=3.11
112+
pip
113+
build
114+
post-cleanup: all
115+
cache-environment: true
116+
- name: Build package
117+
run: python -m build
118+
- name: Test package install
119+
run: |
120+
pip install dist/calliope-*.tar.gz
121+
calliope --help
98122
99123
pre-release:
100-
needs: [test, pre-release-version]
101-
if: needs.test.result == 'success' && startsWith(github.event.pull_request.title, 'Release v')
124+
needs: [test, pre-release-version, pip-test]
125+
if: needs.pip-test.result == 'success' && needs.test.result == 'success' && startsWith(github.event.pull_request.title, 'Release v')
102126
uses: arup-group/actions-city-modelling-lab/.github/workflows/pip-build.yml@main
103127
secrets:
104128
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.7.0.dev1 (dev)
1+
## 0.7.0.dev2 (dev)
22

33
v0.7 includes a major change to how Calliope internally operates.
44
Along with this, there are multiple changes to how Calliope models are defined and configured.
@@ -10,7 +10,6 @@ We group changes into those that are primarily user-facing and relevant for all
1010
This section gives a brief summary of changes.
1111
For more detail, see our migrating from v0.6 to v0.7 section in our [documentation](https://calliope.readthedocs.io/en/latest/migrating/).
1212

13-
1413
|new| Storage buffers available in all technology base classes.
1514

1615
|new| Multiple carriers and different carriers in/out available in all technology base classes.

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
!!! warning
44

55
Calliope version 0.7 is available as a pre-release with the purpose of gathering feedback from users.
6+
To install the pre-release as a user:
7+
8+
```shell
9+
mamba create -n calliope -c conda-forge/label/calliope_dev -c conda-forge calliope
10+
```
611

712
Some functionality is not yet available in 0.7, notably:
813

@@ -11,6 +16,8 @@
1116

1217
To see a full list of changes, read our [page on migrating between v0.6 and v0.7](migrating.md).
1318

19+
If you want to install the most recent _stable_ version of Calliope, see our [v0.6.10 documentation](https://calliope.readthedocs.io/en/v0.6.10/).
20+
1421
!!! note
1522

1623
This is the documentation for version {{ calliope_version }} ([version history](version_history.md)).

docs/installation.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Calliope has been tested on Linux, macOS, and Windows.
66

77
Running Calliope requires four things:
88

9-
1. The Python programming language, version {{ min_python_version }} to {{ max_python_version }}.
10-
2. A number of Python add-on modules (see [below for the complete list](#python-module-requirements)).
11-
3. A solver: Calliope has been tested with CBC, GLPK, Gurobi, and CPLEX. Any other solver that is compatible with Pyomo should also work.
12-
4. The Calliope software itself.
9+
1. The Python programming language, version {{ min_python_version }} to {{ max_python_version }}.
10+
2. A number of Python add-on modules (see [below for the complete list](#python-module-requirements)).
11+
3. A solver: Calliope has been tested with CBC, GLPK, Gurobi, and CPLEX. Any other solver that is compatible with Pyomo should also work.
12+
4. The Calliope software itself.
1313

1414
## Recommended installation method
1515

@@ -19,16 +19,20 @@ To get `mamba`, [download and install the "Mambaforge" distribution for your ope
1919

2020
With mamba installed, you can create a new environment called `calliope` with all the necessary modules, including the free and open source GLPK solver, by running the following command in a terminal or command-line window
2121

22-
```bash
23-
$ mamba create -c conda-forge -n calliope calliope
22+
```shell
23+
mamba create -n calliope -c conda-forge/label/calliope_dev -c conda-forge calliope
2424
```
2525

26+
!!! note
27+
The `conda-forge/label/calliope_dev` channel allows you to access the pre-release of Calliope v0.7, with which this version of the documentation aligns.
28+
To install the most recent _stable_ version of Calliope, see our [v0.6.10 documentation](https://calliope.readthedocs.io/en/v0.6.10/).
29+
2630
This will install calliope with Python version {{ max_python_version }}.
2731

2832
To use Calliope, you need to activate the `calliope` environment each time
2933

3034
```bash
31-
$ mamba activate calliope
35+
mamba activate calliope
3236
```
3337

3438
You are now ready to use Calliope together with the free and open source GLPK solver.
@@ -38,15 +42,16 @@ Read the next section for more information on installing alternative solvers.
3842

3943
!!! warning
4044

41-
Although possible, we do not recommend installing Calliope directly via `pip` (`pip install calliope`). Non-python binaries are not installed with `pip`, some of which are necessary for stable operation (e.g., `libnetcdf`).
45+
Although possible, we do not recommend installing Calliope directly via `pip` (`pip install calliope`).
46+
Non-python binaries are not installed with `pip`, some of which are necessary for stable operation (e.g., `libnetcdf`).
4247

4348

4449
## Updating an existing installation
4550

4651
If following the recommended installation method above, the following command, assuming the mamba environment is active, will update Calliope to the newest version
4752

4853
```bash
49-
$ mamba update -c conda-forge calliope
54+
mamba update -c conda-forge calliope
5055
```
5156

5257
## Solvers

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ maintainers = [
111111
]
112112
description = "A multi-scale energy systems modelling framework."
113113
readme = "README.md"
114-
requires-python = ">=3.9"
114+
requires-python = ">=3.10"
115115
keywords = ["energy systems", "optimisation", "mathematical programming"]
116116
license = { text = "Apache 2.0" }
117117
classifiers = [

requirements/base.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
bottleneck >= 1, < 2
22
click >= 8, < 9
33
geographiclib >= 2, < 3
4-
hdf5 < 2
54
ipdb >= 0.13, < 0.14
65
ipykernel < 7
76
jinja2 >= 3, < 4
87
jsonschema >= 4, < 5
9-
libnetcdf < 5
108
natsort >= 8, < 9
119
netcdf4 >= 1.2, < 1.7
1210
numpy >= 1, < 2
1311
pandas >= 2.1.3, < 2.2
1412
pyomo >= 6.5, < 7
1513
pyparsing >= 3.0, < 3.1
1614
ruamel.yaml >= 0.17, < 0.18
15+
typing-extensions >= 4, < 5
1716
xarray >= 2023.10, < 2024.3

0 commit comments

Comments
 (0)