Skip to content

Commit 108845b

Browse files
authored
Merge pull request #679 from British-Oceanographic-Data-Centre/675_scipy_integrate_cumtrapz_update
675 scipy integrate cumtrapz update Update config files of COAsT toolbox so this tool can run with Python 3.9, 3.10, 3.11 and 3.12.
2 parents decba75 + 410ab3d commit 108845b

File tree

9 files changed

+27
-17
lines changed

9 files changed

+27
-17
lines changed

.github/workflows/build_package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [ '3.9', '3.10' ]
13+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
1414

1515
steps:
1616
- uses: actions/checkout@v4
@@ -36,6 +36,9 @@ jobs:
3636
./build.sh
3737
- name: Test Package Install
3838
run: |
39+
CONDA_BASE=$(conda info --base)
40+
source "${CONDA_BASE}/etc/profile.d/conda.sh"
41+
conda activate coast
3942
python -m pip install dist/coast-*.tar.gz
4043
- name: Generate Conda Metadata
4144
run: |

.github/workflows/unit_test_contents.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
python-version: ${{ matrix.python-version }}
1818
- name: Generate contents.
1919
run: |
20-
pip install .
20+
CONDA_BASE=$(conda info --base)
21+
source "${CONDA_BASE}/etc/profile.d/conda.sh"
22+
conda env update --prune --file environment.yml
23+
conda activate coast
24+
pip install .
2125
mkdir -p example_files
2226
sudo apt-get update
2327
sudo apt-get install -y libgeos-dev

.github/workflows/verify_package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [ '3.9', '3.10' ]
11+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -34,6 +34,7 @@ jobs:
3434
run: |
3535
CONDA_BASE=$(conda info --base)
3636
source "${CONDA_BASE}/etc/profile.d/conda.sh"
37+
conda config --set verbosity 3 --env
3738
conda env update --prune --file environment.yml
3839
conda activate coast
3940
sudo apt-get update

build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ mkdir -p build dist
77
echo "Cleaning up old versions..."
88
rm -rf ./build/* ./dist/* ./Example_Python_Package.egg-info
99
echo "Building package for distribution..."
10-
./venv/bin/python ./setup.py sdist bdist_wheel
10+
CONDA_BASE=$(conda info --base)
11+
source "${CONDA_BASE}/etc/profile.d/conda.sh"
12+
conda activate coast
13+
python ./setup.py sdist bdist_wheel
1114

12-
echo "Done!"
15+
echo "Done!"

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- nodefaults
55
dependencies:
66
- python==3.10
7-
- cython==3.1.1
7+
- cython==0.29.37
88
- cartopy==0.23.0
99
- gsw==3.6.19
1010
- xarray[complete]==2023.7.0
@@ -31,5 +31,5 @@ dependencies:
3131
- spyder==6.0.7
3232
- jupyterlab==4.4.3
3333
- aiohttp==3.11.13
34-
- PyYAML==6.0
34+
- PyYAML==5.4.1
3535
- oyaml==1.0

generate_conda_meta.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
2-
2+
CONDA_BASE=$(conda info --base)
3+
source "${CONDA_BASE}/etc/profile.d/conda.sh"
4+
conda activate coast
35
python setup.py conda

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tool.black]
22
line-length = 120
3-
target-version = ['py38', 'py39', 'py310']
3+
target-version = ['py38', 'py39', 'py310']

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"keywords": ["NEMO", "shallow water", "ocean assessment"],
3232
"project_urls": {"documentation": "https://british-oceanographic-data-centre.github.io/COAsT/"},
3333
"install_requires": [
34-
"PyYAML==6.0",
34+
"cython==0.29.37",
35+
"PyYAML==5.4.1",
3536
"oyaml==1.0",
3637
"pytest==7.1.1",
3738
"pytest-mock==3.7.0",
@@ -53,7 +54,6 @@
5354
"aiohttp==3.11.13",
5455
"tqdm==4.67.1",
5556
"pyproj==3.6.1",
56-
"cython==3.1.1",
5757
"cartopy==0.23.0",
5858
"h5py==3.6.0",
5959
"zarr==2.18.2",
@@ -63,7 +63,7 @@
6363
# "xesmf>=0.3.0", # Optional. Not part of main package
6464
# "esmpy>=8.0.0", # Optional. Not part of main package
6565
],
66-
"python_requires": ">3.8,<3.11",
66+
"python_requires": ">3.8,<3.13",
6767
"packages": ["coast", "coast.data", "coast._utils", "coast.diagnostics"],
6868
"include_package_data": True,
6969
"github": "British-Oceanographic-Data-Centre",

setup_environment.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ cd "$(dirname "$0")" # Set working directory
55

66
echo "Cleaning up any existing virtual environment..."
77
rm -rf ./venv
8-
echo "Creating new virtual environment..."
9-
python3 -m virtualenv ./venv
108
echo "Installing required packages..."
11-
./venv/bin/pip install setuptools wheel twine
129
CONDA_BASE=$(conda info --base)
1310
source "${CONDA_BASE}/etc/profile.d/conda.sh"
14-
conda env update --prune --file environment.yml
1511
conda activate coast
12+
conda install -c conda-forge cython setuptools wheel twine
1613

17-
echo "Done!"
14+
echo "Done!"

0 commit comments

Comments
 (0)