Skip to content

add VLType and CompoundType, commit complex compound type to file #518

add VLType and CompoundType, commit complex compound type to file

add VLType and CompoundType, commit complex compound type to file #518

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types:
- created
workflow_dispatch:
jobs:
lint:
name: lint and style checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Black style check
run: |
black --check .
- name: Lint with ruff
run: |
ruff .
build_0:
name: h5py3 tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
h5py-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: h5netcdf-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-h5py${{matrix.h5py_version}}-${{env.TODAY}}"
create-args: >-
python=${{ matrix.python-version }}
pip
pytest
wheel
h5py=${{ matrix.h5py-version }}
netCDF4
- name: Install h5netcdf
run: |
python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- name: Test with pytest
run: |
pytest -v --durations=0 h5netcdf/tests/
build_1:
name: h5py3/h5pyd tests
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: h5netcdf-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-h5pyd-${{env.TODAY}}"
create-args: >-
python=${{ matrix.python-version }}
pip
pytest
wheel
h5py
netCDF4
- name: Install h5netcdf
run: |
python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
python -m pip install git+https://github.com/HDFGroup/hsds.git@v0.8.0
python -m pip install git+https://github.com/HDFGroup/h5pyd.git
- name: Test with pytest
run: |
pytest -v --durations=0 h5netcdf/tests/
build_2:
name: netCDF4 nightly test
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: h5netcdf-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-netcdf4_nightly-${{env.TODAY}}"
create-args: >-
python=${{ matrix.python-version }}
pip
pytest
wheel
h5py
libnetcdf
cftime
- name: Install netCDF4 from GitHub
run: python -m pip install git+https://github.com/Unidata/netcdf4-python
- name: Install h5netcdf
run: |
python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- name: Test with pytest
run: |
pytest -v --durations=0 h5netcdf/tests/
build_3:
name: xarray nightly test
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
with:
repository: "pydata/xarray"
fetch-depth: 0
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: h5netcdf-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-xarray_nightly-${{env.TODAY}}"
create-args: >-
python=${{ matrix.python-version }}
dask
h5py
netCDF4
packaging
pandas
pip
pytest
wheel
- name: Install xarray
run: |
python -m pip install --no-deps .
- name: Install h5netcdf
run: |
python -m pip install --no-deps --ignore-installed --no-cache-dir -vvv \
git+https://github.com/h5netcdf/h5netcdf.git@${{ github.ref }}
- name: Test with pytest
run: |
python -m pytest -v --durations=0 -k "H5NetCDF"
sphinx_doc:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: h5netcdf-docs
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-docs-${{env.TODAY}}"
create-args: >-
python=3.11
pip
pytest
wheel
h5py
netCDF4
sphinx
sphinx-book-theme>=0.3.2
- name: Install h5netcdf
run: |
python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- name: Build HTML
run: |
cd doc
make html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-doc
path: doc/_build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# this uploads only on releases
if: github.event_name == 'release'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/html
upload-pypi:
if: github.event_name == 'release'
needs: [lint, build_0, sphinx_doc]
name: deploy to pypi
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools wheel twine
- name: Package and Upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
twine upload dist/*