Skip to content

Commit

Permalink
use one environment file per python version
Browse files Browse the repository at this point in the history
  • Loading branch information
aperrin66 committed Nov 8, 2023
1 parent 31f7f3e commit 9dc901f
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
strategy:
matrix:
version:
- {'python': '3.7', 'latest': true}
- {'python': '3.7', 'latest': false}
- {'python': '3.8', 'latest': false}
- {'python': '3.9', 'latest': false}
- {'python': '3.10', 'latest': false}
- {'python': '3.11', 'latest': true}
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ RUN apt-get update \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

COPY environment.yml /tmp/environment.yml
RUN sed -i -E "s/^(\s+- python=).*$/\1${PYTHON_VERSION}/" /tmp/environment.yml
COPY environment-${PYTHON_VERSION}.yml /tmp/environment.yml

RUN conda install python="${PYTHON_VERSION}" setuptools \
&& conda update conda \
&& conda env update -n base --file /tmp/environment.yml \
RUN conda env update -n base --file /tmp/environment.yml \
&& rm /tmp/environment.yml \
&& conda clean -a -y \
&& rm /opt/conda/pkgs/* -rf
Expand Down
27 changes: 27 additions & 0 deletions environment-3.10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: environment
channels:
- defaults
- conda-forge
dependencies:
- python=3.10.13
- conda=23.10.0

- cartopy=0.22.0
- coverage=7.2.2
- coveralls=1.7.0
- gdal=3.7.3
- ipython=8.15.0
- matplotlib=3.8.0
- mock=4.0.3
- netcdf4=1.6.5
- nose=1.3.7
- numpy=1.26.0
- pillow=10.1.0
- pip=23.3
- PyYAML=5.4.1
- scipy=1.11.3
- setuptools=68.0.0
- urllib3=2.0.3
- pip:
- pythesint==1.6.6
27 changes: 27 additions & 0 deletions environment-3.11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: environment
channels:
- defaults
- conda-forge
dependencies:
- python=3.11.5
- conda=23.10.0

- cartopy=0.22.0
- coverage=7.2.2
- coveralls=1.7.0
- gdal=3.7.3
- ipython=8.15.0
- matplotlib=3.8.0
- mock=4.0.3
- netcdf4=1.6.5
- nose=1.3.7
- numpy=1.26.0
- pillow=10.1.0
- pip=23.3
- PyYAML=5.4.1
- scipy=1.11.3
- setuptools=68.0.0
- urllib3=2.0.3
- pip:
- pythesint==1.6.6
26 changes: 26 additions & 0 deletions environment-3.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: environment
channels:
- defaults
dependencies:
- python=3.7.16
- conda=23.1.0

- cartopy=0.18.0
- coverage=6.3.2
- coveralls=1.7.0
- gdal=3.6.0
- ipython=7.31.1
- libgdal=3.6.0
- matplotlib=3.5.3
- mock=4.0.3
- netcdf4=1.6.2
- nose=1.3.7
- numpy=1.21.5
- pillow=9.4.0
- pip=22.3.1
- scipy=1.7.3
- setuptools=65.6.3
- urllib3=1.26.14
- pip:
- pythesint==1.6.6
26 changes: 26 additions & 0 deletions environment-3.8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: environment
channels:
- defaults
dependencies:
- python=3.8.18
- conda=23.9.0

- cartopy=0.18.0
- coverage=5.5
- coveralls=3.2.0
- gdal=3.6.2
- ipython=8.12.2
- matplotlib=3.7.2
- mock=4.0.3
- netcdf4=1.6.2
- nose=1.3.7
- numpy=1.24.3
- pillow=10.0.1
- pip=23.3
- PyYAML=5.4.1
- scipy=1.10.1
- setuptools=68.0.0
- urllib3=1.26.18
- pip:
- pythesint==1.6.6
27 changes: 27 additions & 0 deletions environment-3.9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: environment
channels:
- defaults
dependencies:
- python=3.9.18
- conda=23.10.0

- cartopy=0.18.0
- coverage=7.2.2
- coveralls=1.7.0
- gdal=3.6.2
- ipython=8.15.0
- matplotlib=3.8.0
- mock=4.0.3
- netcdf4=1.6.2
- nose=1.3.7
- numpy=1.26.0
- numpy-base=1.26.0
- pillow=10.0.1
- pip=23.3
- PyYAML=5.4.1
- scipy=1.11.3
- setuptools=68.0.0
- urllib3=1.26.18
- pip:
- pythesint==1.6.6
25 changes: 0 additions & 25 deletions environment.yml

This file was deleted.

0 comments on commit 9dc901f

Please sign in to comment.