Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .binder/environment.yml
7 changes: 3 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
libUnderworld/build
libUnderworld/config.cfg
libUnderworld/config.log
.git/objects
.git/
__pycache__
.ipynb_checkpoints/
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
version: 2
updates:
- package-ecosystem: "github-actions" # see documentation for possible values
directory: "/" # location of package manifests
schedule:
interval: "monthly"

6 changes: 4 additions & 2 deletions .github/workflows/conda-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- v2.*
pull_request:
branches:
- '**'
- "**"
workflow_dispatch:

jobs:
Expand All @@ -31,5 +31,7 @@ jobs:
- name: Build Underworld2
run: pixi run build

# disable ucx mpi comms as github runners can't run them
- name: Run tests
run: pixi run test
run: |
OMPI_MCA_pml=^ucx pixi run test
22 changes: 11 additions & 11 deletions .github/workflows/conda_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Conda Deploy

on:
on:
release:
workflow_dispatch:

Expand All @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@v4
with:
channels: conda-forge,defaults
auto-update-conda: true
Expand All @@ -27,11 +27,11 @@ jobs:
- name: Config Conda
shell: bash -el {0}
run: |
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda config --add channels conda-forge
conda config --add channels underworldcode
conda config --set anaconda_upload no
anaconda logout
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda config --add channels conda-forge
conda config --add channels underworldcode
conda config --set anaconda_upload no
anaconda logout

- name: Config Conda For Upload
if: github.event_name == 'release'
Expand All @@ -42,7 +42,7 @@ jobs:
if: github.event_name == 'release'
shell: bash -el {0}
run: |
conda info
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --channel conda-forge --user geo-down-under conda
anaconda logout
conda info
anaconda login --hostname github-actions-${{ matrix.os }}-$RANDOM --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build --channel conda-forge --user geo-down-under conda
anaconda logout
60 changes: 30 additions & 30 deletions .github/workflows/docker_build.yml.disable
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run_uw: ${{ steps.check_files.outputs.run_uw }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 2

Expand Down Expand Up @@ -84,22 +84,22 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Base Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand All @@ -116,22 +116,22 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Base Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand All @@ -149,22 +149,22 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Petsc Docker Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down Expand Up @@ -193,22 +193,22 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Lavavu Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand All @@ -225,22 +225,22 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Underworld Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
pip uninstall -y underworld

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Install Underworld
run: |
Expand All @@ -297,7 +297,7 @@ jobs:
# os: ["ubuntu-latest", "macos-latest"]
# python-version: ["3.9", "3.10"]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v6
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
Expand Down Expand Up @@ -337,9 +337,9 @@ jobs:
# os: ["ubuntu-latest", "macos-latest"]
# python-version: ["3.9", "3.10"]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v6
# - name: Set up Python
# uses: actions/setup-python@v2
# uses: actions/setup-python@v6
# with:
# python-version: ${{ matrix.python-version }}
# - name: Package for Pypi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
SEARCH_QUERY: 'repo:underworldcode/underworld2 repo:underworldcode/underworld3 is:issue created:${{ env.last_month }} -reason:"not planned"'

- name: Create issue
uses: peter-evans/create-issue-from-file@v5
uses: peter-evans/create-issue-from-file@v6
with:
title: Monthly issue metrics report
token: ${{ secrets.GH_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/kaiju.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ jobs:
SERVER: ${{ secrets.GB_SERVER }}
KAIJUPASSWD: ${{secrets.KAIJU_PASSWORD}}
KAIJUUSER: ${{secrets.KAIJU_USERNAME}}

2 changes: 1 addition & 1 deletion .github/workflows/release.yml.disable
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: 'development'
Expand Down
39 changes: 39 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# AGENTS.md — Underworld2

## Setup & build

- **Python**: >=3.9,<3.13 (conda build pins to <3.12). **numpy <2** required.
- **Env manager**: pixi (`pixi.toml` at root). Commands: `pixi install` → `pixi run build` → `pixi run test`.
- **C/C++ build** requires: PETSc (found via `pkg-config`; set `PETSC_DIR`), MPI compilers (`MPICC`, `MPICXX`, `MPIF90`), SWIG >=4.0, CMake >=4.0, Ninja, libxml2, MPI-enabled h5py (`h5py=*=mpi*`).
- **Install**: `pip install .` or `pip install . --no-build-isolation` (CI style). Pass CMake options via `python setup.py build_ext -D"FOO=BAR"`.
- **Clean**: `bash clean.sh` (removes build artifacts, compiled `.so`, `_uwid.py`, caches).

## Tests

- **Run all**: `pytest ./docs/pytests/tests.py ./docs/pytests/test_examples.py ./docs/pytests/test_user_guide.py ./docs/pytests/test_UWGeo_examples.py ./docs/pytests/test_UWGeo_tutorial11.py`
- **CI subset** (fastest check): `pytest ./docs/pytests/tests.py ./docs/pytests/test_examples.py ./docs/pytests/test_UWGeo_examples.py`
- All test runners use `subprocess` to execute `.py` or `.ipynb` files. Notebooks are run via `pytest --nbmake`.
- Test notebooks live in `docs/test/`, `docs/examples/`, `docs/user_guide/`, `docs/UWGeodynamics/examples/`, `docs/UWGeodynamics/tutorials/`.

## Package structure

| Path | Role |
|---|---|
| `src/underworld/` | Main Python package (set `package_dir={"":"src"}` in setup.py) |
| `src/underworld/libUnderworld/` | C/C++ core + SWIG wrappers, built via CMake |
| `src/underworld/UWGeodynamics/` | High-level geodynamics API |
| `src/underworld/visualisation/` | LavaVu-based viz |

## Critical quirks

1. **dlopen flags**: `__init__.py` sets `RTLD_GLOBAL` before importing `.so` modules. This must happen early — do not reorder imports.
2. **h5py first**: h5py is imported before anything else to avoid HDF5 library conflicts with PETSc.
3. **`_uwid.py`**: Auto-generated on first install if missing (random UUID for usage metrics). Safe to delete/recreate.
4. **Usage metrics**: Opt out via `UW_NO_USAGE_METRICS` env var. In MPI, only rank 0 sends data.
5. **MPI exception handling**: In multi-process runs, exceptions are caught and broadcast via barrier. Set `UW_ALL_MESSAGES` to see all ranks' tracebacks.
6. **PRs**: Target `development` branch. Must update `CHANGELOG.md` and docstrings. See `CONTRIBUTING.rst`.

## Docs

- ReadTheDocs: https://underworld2.readthedocs.io (Sphinx config at `docs/development/docs_generator/conf.py`).
- Build docs via `docs/development/docs_generator/requirements.txt` deps.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
CHANGELOG: Underworld2
=======================

Release 2.18.0 [2026-06-29]
-------------------------
New:
* `numpy 2` and `numpy 1` compatibility, default is `numpy 1`. Badlands yet to support `numpy 2` #764
* Enabling `pixi` package management #0fe4355

Changes:
* github action workflow package updates, `dependabot.yml` included for future.
* `conda/environment.yml` updated, no longer source of truth in CI testing, move to pixi instead.

Fixes:
* Fix for UWGeo losing BCs and unknown field. #762

Release 2.17.3 [2026-05-14]
---------------------------
New:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Note that it can take a while for the site to fire up and that it will time-out

| | |
|-|-|
| Try v2.18.x | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/underworldcode/underworld2/v2.18.x) |
| Try v2.17.x | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/underworldcode/underworld2/v2.17.x) |
| Try v2.16.4 | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/underworldcode/underworld2/v2.16.4) |
| Try dev | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/underworldcode/underworld2/development) |


Expand Down
Loading