Skip to content

Commit 367f7a1

Browse files
committed
Merge branch 'remove_cmor' of github.com:ACCESS-NRI/ACCESS-MOPPeR into remove_cmor
2 parents 3a16f07 + da34136 commit 367f7a1

File tree

6 files changed

+123
-2
lines changed

6 files changed

+123
-2
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches-ignore: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4.2.2
15+
- uses: actions/setup-python@v5
16+
- uses: pre-commit/action@v3.0.1
17+
18+
test:
19+
name: Test (Python ${{ matrix.python-version }})
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: true
23+
matrix:
24+
python-version: ["3.11", "3.12", "3.13"]
25+
26+
steps:
27+
- name: Checkout source
28+
uses: actions/checkout@v4.2.2
29+
30+
- name: Setup conda environment
31+
uses: conda-incubator/setup-miniconda@v3
32+
with:
33+
miniconda-version: "latest"
34+
python-version: ${{ matrix.python-version }}
35+
environment-file: ci/environment-${{ matrix.python-version }}.yml
36+
activate-environment: access-nri-intake-test
37+
auto-activate-base: false
38+
39+
- name: Install source
40+
shell: bash -l {0}
41+
run: python -m pip install .
42+
43+
- name: Create default config file
44+
shell: bash -l {0}
45+
run: |
46+
mkdir -p ~/.mopper
47+
cat <<EOF > ~/.mopper/user.yml
48+
creator_name: "CI Bot"
49+
organisation: "ACCESS-NRI"
50+
creator_email: "ci@example.com"
51+
creator_url: "https://example.com"
52+
EOF
53+
54+
- name: List installed packages
55+
shell: bash -l {0}
56+
run: conda list
57+
58+
- name: Run tests
59+
shell: bash -l {0}
60+
run: coverage run -m --source=access_nri_intake pytest tests
61+
62+
- name: Generate coverage report
63+
shell: bash -l {0}
64+
run: coverage xml
65+
66+
- name: Upload code coverage
67+
uses: codecov/codecov-action@v5
68+
with:
69+
token: ${{ secrets.codecov_token }}
70+
files: ./coverage.xml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This rewrite retains key features of the original MOPPeR while enhancing usabili
2626

2727
## Usage
2828
ACCESS-MOPPeR v2.0.0a is best suited for users interested in evaluating outputs from ACCESS-ESM1.6 development releases. Full documentation is not available yet.
29-
Please refer to the [Getting Started Notebook](https://github.com/ACCESS-NRI/ACCESS-MOPPeR/blob/v2/notebooks/Getting_started.ipynb):
29+
Please refer to the [Getting Started Notebook](https://github.com/ACCESS-NRI/ACCESS-MOPPeR/blob/v2/notebooks/Getting_started.ipynb):
3030

3131
## Future Development
3232
- **Optimized Multi-CPU Execution**: Parallel processing support will be introduced in later versions.

ci/environment-3.11.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: access-nri-mopper-test
2+
channels:
3+
- conda-forge
4+
- accessnri
5+
- defaults
6+
dependencies:
7+
- python==3.11
8+
- xarray
9+
- cmor
10+
- numpy
11+
- dask
12+
- pyyaml
13+
- cftime
14+
- pip
15+
- pip:
16+
- codecov
17+
- pytest-cov

ci/environment-3.12.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: access-nri-mopper-test
2+
channels:
3+
- conda-forge
4+
- accessnri
5+
- defaults
6+
dependencies:
7+
- python==3.12
8+
- xarray
9+
- cmor
10+
- numpy
11+
- dask
12+
- pyyaml
13+
- cftime
14+
- pip
15+
- pip:
16+
- codecov
17+
- pytest-cov

ci/environment-3.13.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: access-nri-mopper-test
2+
channels:
3+
- conda-forge
4+
- accessnri
5+
- defaults
6+
dependencies:
7+
- python==3.13
8+
- xarray
9+
- cmor
10+
- numpy
11+
- dask
12+
- pyyaml
13+
- cftime
14+
- pip
15+
- pip:
16+
- codecov
17+
- pytest-cov

src/access_mopper/ocean_supergrid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ def extract_grid(self, grid_type: str):
182182
"longitude": lon,
183183
"vertices_latitude": lat_bnds,
184184
"vertices_longitude": lon_bnds,
185-
}
185+
}

0 commit comments

Comments
 (0)