Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dates and how optional deps are specified and tested #1230

Merged
merged 26 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8fd61ca
Update release date and copyright year
rly Jan 10, 2025
0f4194e
Update copyright date
rly Jan 10, 2025
501d545
Change how optional deps are set up, tested
rly Jan 13, 2025
471a71b
Merge branch 'dev' into prepare_4.0
rly Jan 13, 2025
62bd18d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2025
56bb8ae
Fix doc
rly Jan 13, 2025
06e00a1
Clean up lnkml-runtime error reporting
rly Jan 14, 2025
c51ccd8
Use Python 3.12 for gallery testing
rly Jan 14, 2025
ca2037e
Use Python 3.12 in gallery testing workflows
rly Jan 14, 2025
0f27219
Merge branch 'prepare_4.0' of github.com:hdmf-dev/hdmf into prepare_4.0
rly Jan 14, 2025
18375a9
Discard changes to CHANGELOG.md
rly Jan 14, 2025
85850fa
Update make_a_release doc for reqs format
rly Jan 14, 2025
88ea800
Update changelog
rly Jan 14, 2025
6e674e9
Update copyright year in readme
rly Jan 14, 2025
fc0c38d
Remove unused gallery envs from tox env list
rly Jan 14, 2025
f5eb9de
Fix "all" dependency group
rly Jan 14, 2025
192a86a
Add script to test dependency support for py versions
rly Jan 14, 2025
700debe
Fix coverage workflow
rly Jan 14, 2025
be11e80
Use Python 3.12 for coverage testing
rly Jan 14, 2025
42aab62
Update python-dateutil in conda env
rly Jan 14, 2025
dfbe38c
Remove unnecessary testing on conda
rly Jan 14, 2025
4521e99
Update changelog
rly Jan 14, 2025
1db7cde
Update scripts/check_py_support.py
rly Jan 16, 2025
603bf8c
Update scripts/check_py_support.py
rly Jan 16, 2025
fa89739
Update bug_report.yml
rly Jan 16, 2025
977ddc2
Replace "full" opt dep group with individual ones
rly Jan 16, 2025
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
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
Loading