Skip to content

Commit 207f119

Browse files
committed
Revert all changes after commit 1085a14 (Remove 'cmor' from run dependencies)
1 parent 05a79be commit 207f119

5 files changed

Lines changed: 54 additions & 57 deletions

File tree

.conda/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ channels:
66
dependencies:
77
- anaconda-client
88
- conda-build
9+
- conda-verify

.conda/meta.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ build:
1212
noarch: python
1313
number: 0
1414
script: "{{ PYTHON }} -m pip install . -vv"
15-
skip: true # [py>=3.13]
1615

1716
requirements:
1817
host:
1918
- python
2019
- pip
21-
- setuptools
2220
- versioneer
2321
run:
24-
- python >=3.11,<3.14
22+
- python >=3.11
2523
- xarray
2624
- numpy
2725
- dask
@@ -30,7 +28,8 @@ requirements:
3028

3129
about:
3230
home: https://github.com/ACCESS-NRI/ACCESS-MOPPy
33-
license: Apache-2.0
31+
license: Apache Software
32+
license_family: APACHE
3433
summary: 'ACCESS-MOPPy post-process ACCESS raw model output using CMOR and pre-defined data standards'
3534

3635
extra:

.github/workflows/cd.yml

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,94 +7,89 @@ on:
77
workflow_dispatch:
88
inputs:
99
version:
10-
description: 'Version to publish (e.g. 2.3.0a9)'
10+
description: 'Version to update to (e.g. 2.3.0a9)'
1111
required: false
1212
type: string
1313

1414
jobs:
1515
pypi:
16-
name: Build & Deploy to PyPI
16+
name: build and deploy to PyPI
1717
runs-on: ubuntu-latest
1818
permissions:
1919
id-token: write
20-
2120
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v6.0.0
24-
25-
- name: Set up Python
21+
- name: Checkout source
22+
uses: actions/checkout@v5.0.0
23+
- name: Set up Python 3.11
2624
uses: actions/setup-python@v6
2725
with:
28-
python-version: '3.11'
29-
30-
- name: Install build tooling
31-
run: python -m pip install --upgrade pip build twine
32-
26+
python-version: 3.11
27+
- name: Install build dependencies
28+
run: python -m pip install build twine
3329
- name: Build distributions
30+
shell: bash -l {0}
3431
run: |
3532
git clean -xdf
36-
python -m build
37-
38-
- name: Publish to PyPI
33+
pyproject-build
34+
- name: Publish package to PyPI
3935
uses: pypa/gh-action-pypi-publish@release/v1
4036
with:
4137
skip-existing: true
4238

4339
conda:
44-
name: Build & Deploy to Conda
40+
name: build and deploy to conda
4541
needs: pypi
4642
runs-on: ubuntu-latest
47-
env:
48-
PACKAGE: access_moppy
49-
5043
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v6.0.0
53-
54-
- name: Derive Version
55-
id: ver
56-
run: |
57-
tag="${GITHUB_REF_NAME}"
58-
ver="${tag#moppy-}"
59-
ver="${ver#v}"
60-
echo "version=$ver" >> $GITHUB_OUTPUT
61-
62-
- name: Wait for PyPI availability (fast check)
63-
env:
64-
VER: ${{ steps.ver.outputs.version }}
44+
- name: Checkout source
45+
uses: actions/checkout@v5.0.0
46+
- name: Wait for PyPI propagation
6547
run: |
66-
echo "Checking PyPI for $PACKAGE==$VER..."
67-
for i in {1..60}; do
68-
if curl -sf https://pypi.org/pypi/$PACKAGE/$VER/json > /dev/null; then
69-
echo "🟢 Found $PACKAGE==$VER on PyPI"
70-
exit 0
48+
echo "Waiting for PyPI package to be downloadable..."
49+
PACKAGE_NAME="access_moppy"
50+
VERSION=$(python -c "import versioneer; print(versioneer.get_version())")
51+
VERSION=${VERSION#v}
52+
echo "Looking for package: ${PACKAGE_NAME}==${VERSION}"
53+
for i in {1..90}; do
54+
echo "Attempt $i/90: Trying to download wheel and sdist..."
55+
rm -rf /tmp/pypi_check_download && mkdir -p /tmp/pypi_check_download
56+
pip download --no-deps --dest /tmp/pypi_check_download ${PACKAGE_NAME}==${VERSION} >/dev/null 2>&1
57+
pip download --no-deps --no-binary=:all: --dest /tmp/pypi_check_download ${PACKAGE_NAME}==${VERSION} >/dev/null 2>&1
58+
WHEEL=$(ls /tmp/pypi_check_download/*.whl 2>/dev/null | head -1)
59+
SDIST=$(ls /tmp/pypi_check_download/*.tar.gz 2>/dev/null | head -1)
60+
if [[ -n "$WHEEL" && -n "$SDIST" ]]; then
61+
echo "✅ Both wheel and sdist for ${PACKAGE_NAME}==${VERSION} are downloadable!"
62+
break
63+
fi
64+
if [ $i -eq 90 ]; then
65+
echo "❌ Could not download both wheel and sdist after 15 minutes"
66+
echo "Available files:"
67+
ls -l /tmp/pypi_check_download || echo "No files downloaded"
68+
exit 1
7169
fi
72-
echo "Waiting... $i/60"
70+
echo "Files not yet downloadable, waiting 10 seconds..."
7371
sleep 10
7472
done
75-
echo "❌ Timeout waiting for $PACKAGE==$VER on PyPI"
76-
exit 1
77-
78-
- name: Setup conda
73+
- name: Setup conda environment
7974
uses: conda-incubator/setup-miniconda@v3
8075
with:
76+
miniconda-version: "latest"
8177
python-version: 3.11
8278
environment-file: .conda/environment.yml
8379
auto-update-conda: false
8480
auto-activate-base: false
8581
show-channel-urls: true
86-
87-
- name: Build & Upload to Conda
88-
uses: ACCESS-NRI/action-build-and-upload-conda-packages@v3.0.0
82+
- name: Build and upload the conda package
83+
uses: ACCESS-NRI/action-build-and-upload-conda-packages@d97711bc4445ba5c4de55f5a1bccbd4815286289
8984
with:
9085
meta_yaml_dir: .conda
9186
upload: true
9287
user: accessnri
9388
label: main
94-
token: ${{ secrets.ANACONDA_TOKEN }}
89+
token: ${{ secrets.anaconda_token }}
9590

9691
update_analysis3:
97-
name: Update access-moppy in Analysis3
92+
name: Update ACCESS-MOPPy on Analysis3 Conda Environment
9893
needs: conda
9994
runs-on: ubuntu-latest
10095
permissions:
@@ -106,9 +101,9 @@ jobs:
106101
FILE_PATH: environments/analysis3/environment.yml
107102
PACKAGE: access-moppy
108103
CHANNEL: accessnri
109-
GH_TOKEN: ${{ secrets.GH_ANALYSIS3_DEPLOY }}
110-
INPUT_VERSION: ${{ github.event.inputs.version }}
111104
RELEASE_TAG: ${{ github.ref_name }}
105+
INPUT_VERSION: ${{ github.event.inputs.version }}
106+
GH_TOKEN: ${{ secrets.GH_ANALYSIS3_DEPLOY }}
112107
steps:
113108
- name: Derive version string
114109
id: ver

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI
33
on:
44
pull_request:
55
branches: [main]
6+
push:
7+
branches: [main]
68
workflow_dispatch:
79
inputs:
810
test_suite:
@@ -19,7 +21,7 @@ jobs:
1921
pre-commit:
2022
runs-on: ubuntu-latest
2123
steps:
22-
- uses: actions/checkout@v6.0.0
24+
- uses: actions/checkout@v5.0.0
2325
- uses: prefix-dev/setup-pixi@v0.9.3
2426
with:
2527
pixi-version: v0.39.5
@@ -32,7 +34,7 @@ jobs:
3234

3335
steps:
3436
- name: Checkout source
35-
uses: actions/checkout@v6.0.0
37+
uses: actions/checkout@v5.0.0
3638

3739
- name: Setup pixi
3840
uses: prefix-dev/setup-pixi@v0.9.3

.github/workflows/full-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout source
25-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
25+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
2626

2727
- name: Setup pixi
2828
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.0

0 commit comments

Comments
 (0)