Skip to content

Commit f3f26f8

Browse files
authored
refactor: update conda package configuration and upload process (#355)
1 parent ffbcff2 commit f3f26f8

1 file changed

Lines changed: 61 additions & 13 deletions

File tree

.github/workflows/cd.yml

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
{% set version = data.get('version') %}
9797
9898
package:
99-
name: access-moppy
99+
name: access-moppy-suite
100100
version: "{{ version }}"
101101
102102
source:
@@ -105,20 +105,59 @@ jobs:
105105
build:
106106
noarch: python
107107
number: 0
108-
script: "{{ PYTHON }} -m pip install . -vv"
109108
110109
requirements:
111110
host:
112111
- python
113112
- pip
114113
- versioneer
115-
run:
116-
- python >=3.11
117-
- xarray
118-
- numpy
119-
- dask
120-
- pyyaml
121-
- cftime
114+
115+
outputs:
116+
- name: access-moppy
117+
build:
118+
noarch: python
119+
script: "{{ PYTHON }} -m pip install . -vv --no-deps"
120+
requirements:
121+
host:
122+
- python
123+
- pip
124+
- versioneer
125+
run:
126+
- python >=3.11,<3.14
127+
- numpy
128+
- pandas
129+
- xarray
130+
- netcdf4
131+
- cftime
132+
- dask
133+
- distributed >=2024.0.0
134+
- pyyaml
135+
- tqdm
136+
- requests
137+
- parsl
138+
- jinja2
139+
about:
140+
home: https://github.com/ACCESS-NRI/ACCESS-MOPPy
141+
summary: A Python package for CMORisation of ACCESS model output
142+
license: Apache-2.0
143+
license_file: LICENCE.txt
144+
doc_url: https://access-moppy.readthedocs.io/
145+
dev_url: https://github.com/ACCESS-NRI/ACCESS-MOPPy
146+
147+
- name: access-moppy-esmval
148+
build:
149+
noarch: python
150+
requirements:
151+
run:
152+
- {{ pin_subpackage('access-moppy', exact=True) }}
153+
- esmvalcore >=2.14
154+
about:
155+
home: https://github.com/ACCESS-NRI/ACCESS-MOPPy
156+
summary: ACCESS-MOPPy with ESMValTool integration support
157+
license: Apache-2.0
158+
license_file: LICENCE.txt
159+
doc_url: https://access-moppy.readthedocs.io/
160+
dev_url: https://github.com/ACCESS-NRI/ACCESS-MOPPy
122161
123162
about:
124163
home: https://github.com/ACCESS-NRI/ACCESS-MOPPy
@@ -156,10 +195,19 @@ jobs:
156195
env:
157196
ANACONDA_API_TOKEN: ${{ secrets.anaconda_token }}
158197
run: |
159-
package=$(find /tmp/conda-output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) | head -1)
160-
echo "Uploading: $package"
161-
conda run -n base anaconda upload --user accessnri --label main "$package"
162-
echo "✅ Conda package uploaded successfully"
198+
mapfile -t packages < <(find /tmp/conda-output -type f \( -name "*.conda" -o -name "*.tar.bz2" \))
199+
if [[ ${#packages[@]} -eq 0 ]]; then
200+
echo "❌ No conda packages found to upload"
201+
exit 1
202+
fi
203+
204+
echo "Uploading ${#packages[@]} package(s) to anaconda..."
205+
for package in "${packages[@]}"; do
206+
echo "Uploading: $package"
207+
conda run -n base anaconda upload --user accessnri --label main "$package"
208+
done
209+
210+
echo "✅ All conda packages uploaded successfully"
163211
echo "Version built: ${{ needs.pypi.outputs.version }}"
164212
165213
update_analysis3:

0 commit comments

Comments
 (0)