Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
37473a4
L1-L4 logging refactor: TeeStream, lazy log file, set_logfile()
stoiver Apr 5, 2026
efaf1f0
Add log.verbose() and verbose_to_screen flag; quiet mesh construction…
stoiver Apr 5, 2026
d251a09
Add log.file_only() context manager; capture mesh verbose output to file
stoiver Apr 5, 2026
a4a434a
Add logging documentation page and docstrings
stoiver Apr 5, 2026
246dbca
Fix pyproj DeprecationWarning in tif2point_values for single-point qu…
stoiver Apr 5, 2026
cb1f1eb
Archive CuPy/CUDA files out of anuga/shallow_water/
stoiver Apr 5, 2026
9b12820
Fix test_sww2csv_multiple_files: run in tempdir to avoid stale SWW glob
stoiver Apr 5, 2026
cd6bb21
Add performance benchmark suite (run_benchmarks.py + compare_benchmar…
stoiver Apr 7, 2026
d76cf3e
Add distribute_benchmarks.py: unified MPI distribution benchmark (4 m…
stoiver Apr 7, 2026
b01a5e6
Fix Basic_mesh.reorder() producing stale neighbours after triangle re…
stoiver Apr 7, 2026
afa74da
Bump conda-incubator/setup-miniconda in the github-actions group
dependabot[bot] Apr 27, 2026
093f92e
Merge pull request #133 from anuga-community/dependabot/github_action…
stoiver May 10, 2026
50f2843
Merge branch 'main' of github.com:anuga-community/anuga_core
stoiver May 11, 2026
5ba1c3c
fix(ci): add pip to conda create in PyPI publish workflow
stoiver May 11, 2026
a8368fa
fix(ci): use --no-isolation for wheel builds in PyPI workflow
stoiver May 11, 2026
89ededf
fix(ci): use pip wheel instead of python -m build for wheel builds
stoiver May 11, 2026
c4391e2
refactor(ci): restructure PyPI workflow — build on push, publish on r…
stoiver May 11, 2026
af933f4
fix(ci): add pkg-config and PKG_CONFIG_PATH to fix Linux wheel builds
stoiver May 11, 2026
e6aaf2a
fix(ci): drop --no-isolation for sdist build to avoid ninja dep check
stoiver May 11, 2026
b89ae4d
feat(ci): upload wheels and sdist as GitHub Release assets
stoiver May 11, 2026
6d982aa
Replace utm dependency with pyproj via epsg_to_ll/ll_to_epsg
stoiver Apr 1, 2026
e0e8e92
feat: add GitHub Codespaces devcontainer
stoiver May 12, 2026
b81523a
fix(devcontainer): register anuga_env Jupyter kernel on creation
stoiver May 13, 2026
8e32c44
docs: add GitHub Codespaces badge and section to README
stoiver May 13, 2026
a6e22a1
feat: add get_epsg/set_epsg convenience methods to Domain
stoiver May 13, 2026
7c24376
fix: fallback zone→EPSG in get_data_points when hemisphere is undefined
stoiver May 13, 2026
05fb821
fix: apply NumPy >= 2.0 scalar fix to main's epsg_to_ll/ll_to_epsg
stoiver May 13, 2026
2eae982
Fix NameError in util.get_gauges_from_file
gaoflow Jun 1, 2026
70055b7
Merge branch 'main' into ga-pr-297
stoiver Jun 3, 2026
1fd1c71
fix: strip whitespace from gauge names in gauge_get_from_file
stoiver Jun 3, 2026
fb05ffd
Merge pull request #139 from anuga-community/ga-pr-297
stoiver Jun 3, 2026
e4700a7
Repair wheels on all platforms so they are self-contained
stoiver Jun 6, 2026
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
37 changes: 37 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "ANUGA",
"image": "mcr.microsoft.com/devcontainers/miniconda:latest",

// onCreateCommand is cached by Codespaces prebuilds — slow conda install runs once.
"onCreateCommand": "conda env create -f .devcontainer/environment.yml",

// postCreateCommand runs after the source tree is available — installs ANUGA itself and registers the Jupyter kernel.
"postCreateCommand": "conda run -n anuga_env pip install --no-build-isolation -e . && conda run -n anuga_env python -m ipykernel install --user --name anuga_env --display-name 'Python (anuga_env)'",

// Activate the conda environment in every new terminal.
"postStartCommand": "conda init bash && echo 'conda activate anuga_env' >> ~/.bashrc",

"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.pylance",
"ms-toolsai.jupyter"
],
"settings": {
"python.defaultInterpreterPath": "/opt/conda/envs/anuga_env/bin/python",
"python.terminal.activateEnvironment": true,
"jupyter.kernels.filter": [
{
"path": "/opt/conda/envs/anuga_env/bin/python",
"type": "pythonEnvironment"
}
]
}
}
},

"remoteEnv": {
"CONDA_DEFAULT_ENV": "anuga_env"
}
}
39 changes: 39 additions & 0 deletions .devcontainer/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: anuga_env
channels:
- conda-forge
dependencies:
- python=3.12
- pip
# Build tools
- compilers
- cython
- meson
- meson-python=0.17
- ninja
- pybind11
- pkg-config
# Runtime dependencies
- dill
- matplotlib
- meshpy
- netcdf4
- numpy
- pyproj
- scipy
- xarray
# Optional but useful
- mpi4py
- pymetis
- rasterio
- fiona
- shapely
- pandas
- openpyxl
- cartopy
# Testing and notebooks
- pytest
- pytest-regressions
- jupyter
- ipykernel
- pip:
- pmw
2 changes: 1 addition & 1 deletion .github/workflows/conda-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # fetch full history so git describe can find tags
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest # Installs Miniforge instead of Miniconda
use-mamba: true # Recommended for faster installs
Expand Down
177 changes: 116 additions & 61 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,129 +1,184 @@
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# Build wheels on every push / PR for early feedback.
# On a GitHub Release publish, build wheels then upload to PyPI.

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Python Publish PYPI
name: Build and Publish to PyPI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
release:
types: [published]



permissions:
contents: read

jobs:
release-build:
# ---------------------------------------------------------------------------
# Build one wheel per (python-version, os) combination.
# Runs on every push/PR so broken wheels are caught before tagging.
# ---------------------------------------------------------------------------
build-wheels:
name: Build wheel (py${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
#python-version: ['3.10', '3.11']

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # fetch full history so git describe can find tags
- uses: conda-incubator/setup-miniconda@v3
fetch-depth: 0 # git describe needs full history for version

- uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest # Installs Miniforge instead of Miniconda
use-mamba: true # Recommended for faster installs
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
auto-update-conda: true # Auto-update conda or mamba
auto-update-conda: true
conda-remove-defaults: true

- name: Install Our own environment
- name: Create conda environment with build deps
shell: bash -el {0}
run: |
conda create -n anuga_env -c conda-forge python=${{matrix.python-version}}
conda create -n anuga_env -c conda-forge \
python=${{ matrix.python-version }} pip \
meson-python meson ninja cython pybind11 numpy pkg-config

- name: Install gcc compilers on Windows
- name: Install compilers (Windows)
if: runner.os == 'Windows'
shell: bash -el {0}
run: |
conda install -c conda-forge -n anuga_env libpython gcc_win-64 gxx_win-64
run: conda install -c conda-forge -n anuga_env libpython gcc_win-64 gxx_win-64

# conda install -c conda-forge -n anuga_env compilers
# The compilers package on windows which uses clang. We run into
# problems when testing anuga, so we skip it for now.

- name: Install clang with openmp compiler on macOS
- name: Install compilers (macOS)
if: runner.os == 'macOS'
shell: bash -el {0}
run: |
conda install -c conda-forge -n anuga_env compilers
run: conda install -c conda-forge -n anuga_env compilers

- name: Install gxx with openmp compiler on Linux
- name: Install compilers (Linux)
if: runner.os == 'Linux'
shell: bash -el {0}
run: |
conda install -c conda-forge -n anuga_env compilers
run: conda install -c conda-forge -n anuga_env compilers

- name: Build wheels
- name: Build wheel
shell: bash -el {0}
run: |
conda activate anuga_env
python -m pip install build
python -m build --wheel --outdir dist-wheel
export PKG_CONFIG_PATH="$CONDA_PREFIX/lib/pkgconfig:$CONDA_PREFIX/share/pkgconfig"
pip wheel --no-build-isolation --no-deps -w dist-wheel .

- name: Repair wheels
- name: Repair wheel (bundle external libs; self-contained per platform)
shell: bash -el {0}
run: |
conda activate anuga_env
python -m pip install repairwheel
repairwheel -o dist dist-wheel/*.whl
pip install repairwheel
# repairwheel dispatches per platform: auditwheel (Linux, manylinux),
# delocate (macOS), delvewheel (Windows). On macOS this copies
# libomp.dylib into the wheel and rewrites the @rpath so the wheel is
# self-contained — without it `import anuga` from the published wheel
# fails with "Library not loaded: @rpath/libomp.dylib" (the build links
# conda's libomp via an rpath into the conda env). delvewheel does the
# equivalent DLL bundling on Windows. Pass the conda lib dirs that
# exist on this OS so dependent libraries are found at repair time.
libdirs=()
for d in "$CONDA_PREFIX/lib" "$CONDA_PREFIX/Library/bin"; do
[ -d "$d" ] && libdirs+=(-l "$d")
done
repairwheel "${libdirs[@]}" -o dist dist-wheel/*.whl

- name: Upload wheel artifact
uses: actions/upload-artifact@v7
with:
name: wheel-py${{ matrix.python-version }}-${{ matrix.os }}
path: dist/*.whl

# ---------------------------------------------------------------------------
# Build the source distribution (once, on Linux / Python 3.13).
# ---------------------------------------------------------------------------
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Build source distribution
if: runner.os == 'linux' && matrix.python-version == '3.13'
- uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest
use-mamba: true
auto-update-conda: true
conda-remove-defaults: true

- name: Create conda environment
shell: bash -el {0}
run: |
conda create -n anuga_env -c conda-forge python=3.13 pip \
meson-python meson ninja cython pybind11 numpy pkg-config

- name: Build sdist
shell: bash -el {0}
run: |
conda activate anuga_env
# PKG_CONFIG_PATH is inherited by the isolated build venv so meson
# finds conda's Python headers instead of the broken system ones.
export PKG_CONFIG_PATH="$CONDA_PREFIX/lib/pkgconfig:$CONDA_PREFIX/share/pkgconfig"
pip install build
python -m build --sdist --outdir dist
- name: Upload distributions

- name: Upload sdist artifact
uses: actions/upload-artifact@v7
with:
name: release-dists-${{ matrix.python-version }}-${{ matrix.os }}
path: dist/




pypi-publish:
name: Upload release to PyPI
name: sdist
path: dist/*.tar.gz

# ---------------------------------------------------------------------------
# Publish to PyPI — only runs when a GitHub Release is published.
# Requires all wheel builds and the sdist to succeed first.
# ---------------------------------------------------------------------------
publish:
name: Publish to PyPI
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
needs:
- release-build

if: github.event_name == 'release' && github.event.action == 'published'

environment:
name: anuga
url: https://pypi.org/p/anuga

permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
id-token: write # required for trusted publishing (OIDC)
contents: write # required to upload release assets

steps:
- name: Retrieve release distributions
- name: Download all wheel artifacts
uses: actions/download-artifact@v8
with:
pattern: release-dists-*
pattern: wheel-*
path: dist
merge-multiple: true

- run: ls ./dist # All wheels from all matrix jobs are now here
- name: Download sdist artifact
uses: actions/download-artifact@v8
with:
name: sdist
path: dist

- name: List distributions to upload
run: ls -lh dist/

- name: Publish release distributions to PyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
#repository-url: https://test.pypi.org/legacy/
verify-metadata: false
verbose: true
packages-dir: dist/

- name: Upload wheels and sdist as GitHub Release assets
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} dist/* --clobber --repo ${{ github.repository }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,4 @@ doc/source/generated
###################################
anuga/__config__.py
anuga/version.py
benchmarks/results/
17 changes: 16 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
:target: https://anuga.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

|badge0| |badge1| |badge3| |badge4| |badge5| |badge6| |badge7|
.. |badge8| image:: https://github.com/codespaces/badge.svg
:target: https://codespaces.new/anuga-community/anuga_core
:alt: Open in GitHub Codespaces

|badge0| |badge1| |badge3| |badge4| |badge5| |badge6| |badge7| |badge8|



Expand Down Expand Up @@ -92,6 +96,17 @@ Once the conda-forge channel has been enabled, anuga can be installed with conda
For more installation instructions, see https://anuga.readthedocs.io/en/latest/installation.html


GitHub Codespaces
-----------------

Click the **Open in GitHub Codespaces** badge above to launch ANUGA in a fully configured
cloud environment — no local install required. The environment installs all dependencies
and compiles the C/Cython extensions automatically.

Once the Codespace is ready, open any notebook and select the **Python (anuga_env)** kernel
from the kernel picker in the top-right corner.


Documentation and Help
----------------------

Expand Down
Loading
Loading