Skip to content

Commit

Permalink
Update dates and how optional deps are specified and tested (#1230)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
rly and pre-commit-ci[bot] authored Jan 17, 2025
1 parent a7a5507 commit dc51890
Show file tree
Hide file tree
Showing 31 changed files with 378 additions and 394 deletions.
10 changes: 1 addition & 9 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ body:
- Linux
validations:
required: true
- type: dropdown
id: executable
attributes:
label: Python Executable
options:
- Conda
- Python
validations:
required: true
- type: dropdown
id: python_version
attributes:
Expand All @@ -65,6 +56,7 @@ body:
- "3.11"
- "3.10"
- "3.9"
- "newer"
validations:
required: true
- type: textarea
Expand Down
11 changes: 4 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ Prepare for release of HDMF [version]

### Before merging:
- [ ] Make sure all PRs to be included in this release have been merged to `dev`.
- [ ] Major and minor releases: Update package versions in `requirements.txt`, `requirements-dev.txt`,
`requirements-doc.txt`, `requirements-opt.txt`, and `environment-ros3.yml` to the latest versions,
and update dependency ranges in `pyproject.toml` and minimums in `requirements-min.txt` as needed.
Run `pip install pur && pur -r requirements-dev.txt -r requirements.txt -r requirements-opt.txt`
and manually update `environment-ros3.yml`.
- [ ] Major and minor releases: Update dependency ranges in `pyproject.toml` and minimums in
`requirements-min.txt` as needed.
- [ ] Check legal file dates and information in `Legal.txt`, `license.txt`, `README.rst`, `docs/source/conf.py`,
and any other locations as needed
- [ ] Update `pyproject.toml` as needed
Expand Down Expand Up @@ -34,5 +31,5 @@ Prepare for release of HDMF [version]
4. Either monitor [conda-forge/hdmf-feedstock](https://github.com/conda-forge/hdmf-feedstock) for the
regro-cf-autotick-bot bot to create a PR updating the version of HDMF to the latest PyPI release, usually within
24 hours of release, or manually create a PR updating `recipe/meta.yaml` with the latest version number
and SHA256 retrieved from PyPI > HDMF > Download Files > View hashes for the `.tar.gz` file. Re-render and update
dependencies as needed.
and SHA256 retrieved from PyPI > HDMF > Download Files > View hashes for the `.tar.gz` file. Re-render and
update the dependencies as needed.
5 changes: 2 additions & 3 deletions .github/workflows/check_sphinx_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12
python-version: '3.12' # TODO: Update to 3.13 when linkml and its deps support 3.13

- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-doc.txt -r requirements-opt.txt
python -m pip install .
python -m pip install ".[all]"
- name: Check Sphinx internal and external links
run: sphinx-build -W -b linkcheck ./docs/source ./test_build
4 changes: 2 additions & 2 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install build dependencies
run: |
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Run tox tests
run: |
tox -e py312-upgraded
tox -e py313-upgraded
- name: Build wheel and source distribution
run: |
Expand Down
131 changes: 31 additions & 100 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,27 @@ jobs:
fail-fast: false
matrix:
include:
- { name: linux-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.13 , test-tox-env: pytest-py313-pinned , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-prerelease , test-tox-env: pytest-py313-prerelease , python-ver: "3.13", os: ubuntu-latest }
- { name: windows-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.13 , test-tox-env: pytest-py313-pinned , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-prerelease , test-tox-env: pytest-py313-prerelease , python-ver: "3.13", os: windows-latest }
- { name: macos-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.13 , test-tox-env: pytest-py313-pinned , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-prerelease , test-tox-env: pytest-py313-prerelease , python-ver: "3.13", os: macos-latest }
- { name: linux-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10-upgraded , test-tox-env: pytest-py310-upgraded , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-upgraded-optional , test-tox-env: pytest-py313-upgraded-optional , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-prerelease-optional , test-tox-env: pytest-py313-prerelease-optional , python-ver: "3.13", os: ubuntu-latest }
- { name: windows-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10-upgraded , test-tox-env: pytest-py310-upgraded , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-upgraded-optional , test-tox-env: pytest-py313-upgraded-optional , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-prerelease-optional , test-tox-env: pytest-py313-prerelease-optional , python-ver: "3.13", os: windows-latest }
- { name: macos-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-python3.10-upgraded , test-tox-env: pytest-py310-upgraded , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-upgraded-optional , test-tox-env: pytest-py313-upgraded-optional , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-prerelease-optional , test-tox-env: pytest-py313-prerelease-optional , python-ver: "3.13", os: macos-latest }
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
Expand Down Expand Up @@ -97,18 +94,16 @@ jobs:
fail-fast: false
matrix:
include:
- { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-gallery-python3.13-prerelease , test-tox-env: gallery-py313-prerelease , python-ver: "3.13", os: ubuntu-latest }
- { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: windows-latest }
- { name: windows-gallery-python3.13-prerelease, test-tox-env: gallery-py313-prerelease , python-ver: "3.13", os: windows-latest }
- { name: macos-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-gallery-python3.13-prerelease , test-tox-env: gallery-py313-prerelease , python-ver: "3.13", os: macos-latest }
# TODO: Update to 3.13 when linkml and its deps support 3.13
- { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-gallery-python3.12-upgraded-optional , test-tox-env: gallery-py312-upgraded-optional , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-gallery-python3.12-prerelease-optional , test-tox-env: gallery-py312-prerelease-optional , python-ver: "3.12", os: ubuntu-latest }
- { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-gallery-python3.12-upgraded-optional , test-tox-env: gallery-py312-upgraded-optional , python-ver: "3.12", os: windows-latest }
- { name: windows-gallery-python3.12-prerelease-optional , test-tox-env: gallery-py312-prerelease-optional , python-ver: "3.12", os: windows-latest }
- { name: macos-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-gallery-python3.12-upgraded-optional , test-tox-env: gallery-py312-upgraded-optional , python-ver: "3.12", os: macos-latest }
- { name: macos-gallery-python3.12-prerelease-optional , test-tox-env: gallery-py312-prerelease-optional , python-ver: "3.12", os: macos-latest }
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
Expand All @@ -131,70 +126,6 @@ jobs:
run: |
tox -e ${{ matrix.test-tox-env }}
run-all-tests-on-conda:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # needed for conda environment to work
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: conda-linux-python3.9-minimum , test-tox-env: pytest-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: conda-linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: conda-linux-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: conda-linux-python3.13 , test-tox-env: pytest-py313-pinned , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.13-upgraded , test-tox-env: pytest-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.13-prerelease , test-tox-env: pytest-py313-prerelease , python-ver: "3.13", os: ubuntu-latest }
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required to determine the version

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-ver }}
channels: conda-forge

- name: Install build dependencies
run: |
conda config --set always_yes yes --set changeps1 no
conda info
conda install -c conda-forge "tox>=4"
- name: Conda reporting
run: |
conda info
conda config --show-sources
conda list --show-channel-urls
# NOTE tox installs packages from PyPI not conda-forge...
- name: Run tox tests
run: |
tox -e ${{ matrix.test-tox-env }}
- name: Build wheel and source distribution
run: |
tox -e build
ls -1 dist
- name: Test installation from a wheel
run: |
tox -e wheelinstall --installpkg dist/*-none-any.whl
- name: Test installation from a source distribution
run: |
tox -e wheelinstall --installpkg dist/*.tar.gz
run-ros3-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- { os: macos-latest , opt_req: false }
env: # used by codecov-action
OS: ${{ matrix.os }}
PYTHON: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12
PYTHON: '3.12' # TODO: Update to 3.13 when linkml and its deps support 3.13
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
Expand All @@ -44,24 +44,26 @@ jobs:
with:
python-version: ${{ env.PYTHON }}

- name: Install dependencies
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt -r requirements.txt
- name: Install optional dependencies
if: ${{ matrix.opt_req }}
run: python -m pip install -r requirements-opt.txt
- name: Install package
if: ${{ ! matrix.opt_req }}
run: |
python -m pip install .
python -m pip list
python -m pip install ".[test]"
- name: Install package with optional dependencies
if: ${{ matrix.opt_req }}
run: |
python -m pip install ".[test,tqdm,zarr,termset]"
- name: Run tests and generate coverage report
run: |
# coverage is configured in pyproject.toml
pytest --cov --cov-report=xml --cov-report=term # codecov uploader requires xml format
# codecov uploader requires xml format
python -m pip list
pytest --cov --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_hdmf_zarr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python -m pip list
git clone https://github.com/hdmf-dev/hdmf-zarr.git
cd hdmf-zarr
python -m pip install .[test] # this will install a different version of hdmf from the current one
python -m pip install ".[test]" # this will install a different version of hdmf from the current one
cd ..
python -m pip uninstall -y hdmf # uninstall the other version of hdmf
python -m pip install . # reinstall current branch of hdmf
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_pynwb_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Update pip
run: python -m pip install --upgrade pip
Expand Down
Loading

0 comments on commit dc51890

Please sign in to comment.