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

Fix Linux compatibility without breaking ARM macOS compatibility #369

Merged
45 changes: 45 additions & 0 deletions .github/workflows/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests of conda environments on both Linux and Mac

on:
push:
branches:
- main
- develop
pull_request:

timtroendle marked this conversation as resolved.
Show resolved Hide resolved
jobs:
environments-are-installable:
timtroendle marked this conversation as resolved.
Show resolved Hide resolved
name: Environments are installable
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
- name: DAG env
run: conda env create -f ./envs/geo.yaml --dry-run
timtroendle marked this conversation as resolved.
Show resolved Hide resolved
- name: Default env
run: conda env create -f ./envs/default.yaml --dry-run
- name: Geo env
run: conda env create -f ./envs/geo.yaml --dry-run
- name: Hydro env
run: conda env create -f ./envs/hydro.yaml --dry-run
- name: Shell env
run: conda env create -f ./envs/shell.yaml --dry-run
- name: Test env
run: conda env create -f ./envs/test.yaml -n test_env --dry-run
- name: Vis env
run: conda env create -f ./envs/vis.yaml --dry-run
- name: Requirements docs env
run: conda env create -f ./requirements-docs.yaml --dry-run
- name: Requirements test env
run: conda env create -f ./requirements-test.yaml --dry-run
- name: Model usage env
run: conda env create -f ./templates/environment.yaml --dry-run
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* **ADD** ability to run on Apple silicon devices (#263).
* Updated geo packages from gdal 3.2 -> 3.3.
* **ADD** re-execution triggers based on config and env changes (#264).
* **ADD** continuous integration test of all conda environments on both ARM macOS and Linux (#369).

### Updated (models)

Expand All @@ -49,8 +50,8 @@
* **UPDATE** Snakemake to v8.10.7 (#330)
* Ensures that conda environment builds ignore default package specifications (#289).
* Fixes localrules through integration of new `localrule` directive (#368).

* **UPDATE** source of fraction of shared coast for offshore wind capacity factor distribution from a fixed shape download to an internal rule which can handle ad hoc shapes (partial #238).
* **UPDATE** dropped support for Intel macOS. The workflow may still run on Intel macOS, but we do not actively maintain support (#369).

### Fixed (models)

Expand All @@ -65,7 +66,7 @@
* **FIX** fixed optimisation tolerance of hydro power plants from xtol to xatol (#266).
* **FIX** source of Exclusive Economic Zones (EEZ) to use a cache on [zenodo](https://sandbox.zenodo.org/records/45135) so that we can keep using v11 (#332). FIXME: update to actual zenodo record before next Euro-Calliope release.
* **FIX** fixed rule `download_basins_database`, which previously failed on some linux and mac machines, by requiring a more recent curl in the environment `envs/shell.yaml` (#267).
* **FIX** pin `h5py`, `hdf5` and `libnetcdf` in all environments which rely on `xarray`, to prevent issues on linux-x86 (#357).
* **FIX** pin `h5py`, `hdf5` and `libnetcdf` in all environments which rely on `xarray`, to prevent issues on linux-x86 (#357, #369).

## 1.1.0 (2021-12-22)

Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The build process will require an internet connection, several gigabytes of avai
## Prepare

!!! Info
The workflow is developed on macOS, tested on macOS and Linux, but it cannot run natively on Windows.
The workflow is developed mostly on ARM macOS, tested on ARM macOS and Linux, but it cannot run natively on Windows.

1. Download your copy of the latest Euro-Calliope release: [![workflow DOI](https://img.shields.io/badge/workflow-10.5281/zenodo.3949793-blue)](https://doi.org/10.5281/zenodo.3949793) (or [clone any version from GitHub](https://github.com/calliope-project/euro-calliope)).

Expand Down
2 changes: 1 addition & 1 deletion envs/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- netCDF4=1.5.6
- hdf5=1.10
- h5py=3.1.0
- libnetcdf=4.7
- libnetcdf=4.8.0
- pip:
- -e ./lib
- styleframe==4.2
2 changes: 1 addition & 1 deletion envs/geo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ dependencies:
- pip=21.0.1
- hdf5=1.10
- h5py=3.1.0
- libnetcdf=4.7
- libnetcdf=4.8.0
- pip:
- -e ./lib[geo]
2 changes: 1 addition & 1 deletion envs/hydro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
- pip=21.0.1
- hdf5=1.10
- h5py=3.1.0
- libnetcdf=4.7
- libnetcdf=4.8.0
- scipy=1.9.1 # sub-dependency of atlite. Update when updating numpy.
- pip:
- -e ./lib[geo]
2 changes: 1 addition & 1 deletion envs/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ dependencies:
- pyomo=6.4.1
- hdf5=1.10
- h5py=3.1.0
- libnetcdf=4.7
- libnetcdf=4.8.0
Loading