Skip to content

Commit 129540e

Browse files
Add alpha releases of Parcels to prefix.dev (#2202)
1 parent 92a3b75 commit 129540e

File tree

5 files changed

+121
-1
lines changed

5 files changed

+121
-1
lines changed

.github/ci/recipe.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Recipe for https://github.com/prefix-dev/rattler-build used for nightly releases of Parcels
2+
# during version 4 alpha development
3+
#
4+
# Adapted from the conda forge recipe
5+
context:
6+
name: parcels
7+
version: 4.0.0alpha0 # The last number here needs to be bumped for each new alpha release
8+
9+
package:
10+
name: ${{ name|lower }}
11+
version: ${{ version }}
12+
13+
source:
14+
path: ../..
15+
16+
build:
17+
number: 0
18+
noarch: python
19+
script:
20+
- python -m pip install . -vv --no-deps --no-build-isolation
21+
22+
requirements:
23+
host:
24+
- python 3.11.*
25+
- pip
26+
- setuptools
27+
- setuptools_scm
28+
- setuptools_scm_git_archive
29+
- wheel
30+
run:
31+
- python >=3.11
32+
- cftime
33+
- dask
34+
- matplotlib-base >=2.0.2
35+
- netcdf4 >=1.1.9
36+
- numpy >=1.11
37+
- platformdirs
38+
- psutil
39+
- pymbolic
40+
- pytest
41+
- scipy >=0.16.0
42+
- trajan
43+
- tqdm
44+
- xarray >=0.10.8
45+
- zarr >=2.11.0,!=2.18.0,<3
46+
- uxarray>=2025.3.0
47+
- pyogrio # needed for geopandas (uxarray -> geoviews -> geopandas -> pyogrio, but for some reason conda doesn't pick it up automatically)
48+
- pooch
49+
50+
tests:
51+
- python:
52+
imports:
53+
- parcels
54+
55+
about:
56+
homepage: https://github.com/OceanParcels/parcels
57+
license: MIT
58+
license_file: LICENSE.md
59+
summary: Probably A Really Computationally Efficient Lagrangian Simulator
60+
description: |
61+
Parcels (Probably A Really Computationally Efficient Lagrangian Simulator)
62+
is a set of Python classes and methods to create customisable particle
63+
tracking simulations using output from Ocean Circulation models.
64+
Parcels can be used to track passive and active particulates such as
65+
water, nutrients, plankton, plastic and fish.
66+
documentation: https://oceanparcels.org/
67+
repository: https://github.com/OceanParcels/parcels
68+
69+
extra:
70+
recipe-maintainers:
71+
- VeckoTheGecko

.github/workflows/nightly.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
workflow_dispatch:
3+
4+
permissions:
5+
contents: read
6+
id-token: write
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Build conda package
14+
uses: prefix-dev/[email protected]
15+
with:
16+
recipe-path: .github/ci/recipe.yaml
17+
18+
- name: Upload all packages
19+
shell: bash
20+
run: |
21+
shopt -s nullglob
22+
EXIT_CODE=0
23+
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do
24+
if ! rattler-build upload prefix -c parcels "${pkg}"; then
25+
EXIT_CODE=1
26+
fi
27+
done
28+
exit $EXIT_CODE

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
build/*
22
docs/_build/*
33
docs/_downloads
4+
output
45

56
*.log
67
*.nc

docs/v4/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Collaboration on v4 development is happening on the [Parcels v4 Project Board](h
1717
The pages below provide further background on the development of Parcels v4. You can think of this page as a "living" document as we work towards the release of v4.
1818

1919
```{toctree}
20-
20+
installation
2121
api
2222
nojit
2323
TODO

docs/v4/installation.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Install an alpha version of Parcels v4
2+
3+
During development of Parcels v4, we are uploading versions of the package to an [index on prefix.dev](https://prefix.dev/channels/parcels/packages/parcels). This allows users to easily install an unreleased version without having to do a [development install](../installation.rst)! Give it a spin!
4+
5+
```{warning}
6+
Before installing an alpha version of Parcels, we *highly* recommend creating a new environment so that doesn't affect package versions in your current environment (which you may be using for your research).
7+
8+
You can see what your current environment is by doing `conda env list` and seeing which environment has a `*` next to it. At any point, you can use `conda activate ...` (replacing `...` with the name that had the `*` next to it) to return to your environment with version 3 of Parcels.
9+
10+
```
11+
12+
Do the following to create a new environment (called `parcels-v4-alpha`) with an alpha version of Parcels installed:
13+
14+
```sh
15+
conda create -n parcels-v4-alpha python=3.11
16+
conda activate parcels-v4-alpha
17+
conda install -c https://repo.prefix.dev/parcels parcels
18+
```
19+
20+
During the development of Parcels v4 we will be occasionally releasing these alpha package versions so that users can try them out. If you're installing Parcels normally (i.e., via Conda forge) you will receive version 3 of Parcels as usual until version 4 is officially released.

0 commit comments

Comments
 (0)