Skip to content

Add pyproject fmt

Add pyproject fmt #726

Workflow file for this run

name: Build and Test
on:
pull_request:
push:
branches: [master]
jobs:
run-serial:
runs-on: ${{ matrix.os }}
#env:
# NO_NET: 1
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [windows-latest, ubuntu-latest, macos-latest]
experimental: [false]
platform: [x64, x32]
exclude:
- os: macos-latest
platform: x32
include:
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true
platform: x64
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }}
numpy cython pip pytest hdf5 libnetcdf cftime zlib certifi
--channel conda-forge
- name: Install unstable dependencies
if: matrix.experimental == true
run: >-
micromamba install
conda-forge/label/cftime_dev::cftime
conda-forge/label/numpy_dev::numpy
--channel conda-forge --channel conda-forge
- name: Install netcdf4-python
run: |
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall
- name: Tests
run: |
cd test && python run_all.py
run-mpi:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11" ]
os: [ubuntu-latest]
platform: [x64]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }}
numpy cython pip pytest mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi
--channel conda-forge
- name: Install netcdf4-python with mpi
run: |
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
nc-config --all
python -m pip install -v -e . --no-build-isolation --no-deps --force-reinstall
- name: Tests
run: |
cd test && python run_all.py
cd ../examples
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH"
which mpirun
mpirun --version
mpirun -np 4 --oversubscribe python mpi_example.py # for openmpi
#mpirun -np 4 python mpi_example.py
if [ $? -ne 0 ] ; then
echo "hdf5 mpi test failed!"
exit 1
else
echo "hdf5 mpi test passed!"
fi