Skip to content

Commit

Permalink
Update versioneer and CI (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Nov 10, 2022
1 parent 35dab0f commit ccc5c25
Show file tree
Hide file tree
Showing 15 changed files with 1,010 additions and 560 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ jobs:
check-external-links:
runs-on: ubuntu-latest
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-doc.txt -r requirements.txt
python -m pip install -r requirements-doc.txt
python -m pip install .
- name: Check Sphinx external links
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand All @@ -43,7 +43,7 @@ jobs:
run: |
python -m pip install twine
ls -1 dist
# twine upload --repository testpypi -u ${{ secrets.BOT_PYPI_USER }} -p ${{ secrets.BOT_PYPI_PASSWORD }} --skip-existing dist/*
# twine upload --repository-url https://test.pypi.org/legacy/ -u ${{ secrets.BOT_PYPI_USER }} -p ${{ secrets.BOT_PYPI_PASSWORD }} --skip-existing dist/*
twine upload -u ${{ secrets.BOT_PYPI_USER }} -p ${{ secrets.BOT_PYPI_PASSWORD }} --skip-existing dist/*
- name: Publish wheel and source distributions as a GitHub release
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,40 @@ jobs:
matrix:
include:
- { name: linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest }
- { name: linux-python3.7 , test-tox-env: py37 , build-tox-env: build-py37 , python-ver: "3.7" , os: ubuntu-latest }
- { name: linux-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , python-ver: "3.8" , os: ubuntu-latest }
- { name: linux-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.10-prerelease , test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, python-ver: "3.10", os: ubuntu-latest }
- { name: windows-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: windows-latest }
- { name: windows-python3.7 , test-tox-env: py37 , build-tox-env: build-py37 , python-ver: "3.7" , os: windows-latest }
- { name: windows-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.10-prerelease, test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, python-ver: "3.10", os: windows-latest }
- { name: macos-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: macos-latest }
- { name: macos-python3.7 , test-tox-env: py37 , build-tox-env: build-py37 , python-ver: "3.7" , os: macos-latest }
- { name: macos-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , python-ver: "3.8" , os: macos-latest }
- { name: macos-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: macos-latest }
- { name: macos-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.10-prerelease , test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, python-ver: "3.10", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-ver }}

Expand Down Expand Up @@ -95,17 +99,19 @@ jobs:
- { name: macos-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: macos-latest }
- { name: macos-gallery-python3.10-prerelease , test-tox-env: gallery-py310-prerelease, python-ver: "3.10", os: macos-latest }
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-ver }}

Expand All @@ -130,22 +136,23 @@ jobs:
matrix:
include:
- { name: conda-linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest }
- { name: conda-linux-python3.7 , test-tox-env: py37 , build-tox-env: build-py37 , python-ver: "3.7" , os: ubuntu-latest }
- { name: conda-linux-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , python-ver: "3.8" , os: ubuntu-latest }
- { name: conda-linux-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: ubuntu-latest }
- { name: conda-linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.10-prerelease, test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, python-ver: "3.10", os: ubuntu-latest }
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ jobs:
OS: ${{ matrix.os }}
PYTHON: '3.10'
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand Down
39 changes: 20 additions & 19 deletions .github/workflows/run_flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ jobs:
run-flake8:
runs-on: ubuntu-latest
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
access_token: ${{ github.token }}
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install flake8
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip list
- name: Install flake8
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip list
- name: Run flake8
run: flake8
- name: Run flake8
run: flake8
9 changes: 5 additions & 4 deletions .github/workflows/run_pynwb_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Update pip
run: python -m pip install --upgrade pip
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
matrix:
include:
- { name: linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest }
- { name: linux-python3.7 , test-tox-env: py37 , build-tox-env: build-py37 , python-ver: "3.7" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
# NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact
- { name: linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest , upload-wheels: true }
Expand All @@ -29,8 +28,8 @@ jobs:
- { name: macos-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: macos-latest }
- { name: macos-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: macos-latest }
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}
Expand All @@ -41,7 +40,7 @@ jobs:
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-ver }}

Expand Down Expand Up @@ -86,17 +85,18 @@ jobs:
- { name: windows-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: windows-latest }
- { name: windows-gallery-python3.10-upgraded, test-tox-env: gallery-py310-upgraded, python-ver: "3.10", os: windows-latest }
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-ver }}

Expand All @@ -123,9 +123,10 @@ jobs:
- { name: conda-linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest }
- { name: conda-linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest }
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v3
Expand Down Expand Up @@ -167,9 +168,10 @@ jobs:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: Cancel any previous incomplete runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- name: Checkout repo with submodules
Expand All @@ -178,7 +180,7 @@ jobs:
submodules: 'recursive'

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## HDMF 3.4.7 (November 9, 2022)

### Minor improvements
- Update CI, versioneer, and some requirements. @rly ([#786](https://github.com/hdmf-dev/hdmf/pull/786))

### Bug fixes
- Fix an issue where not providing an optional argument to `__init__` of an auto-generated `MultiContainerInterface`
class raised an error. @rly ([#779](https://github.com/hdmf-dev/hdmf/pull/779))
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ coverage==6.4.2
flake8==5.0.4
flake8-debugger==4.1.2
flake8-print==5.0.0
importlib-metadata==4.2.0 # there may be compatibility issues with newer versions
pytest==7.1.2
pytest-cov==3.0.0
python-dateutil==2.8.2
Expand Down
11 changes: 7 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
# note that python 3.7 end of life is 27 Jun 2023
h5py==3.7.0
jsonschema==4.9.1
numpy==1.21.5 # note that numpy 1.22 dropped python 3.7 support
pandas==1.3.5 # note that pandas 1.4 dropped python 3.7 support
numpy==1.23.3;python_version>='3.8'
numpy==1.21.5;python_version<'3.8' # note that numpy 1.22 dropped python 3.7 support
pandas==1.5.0;python_version>='3.8'
pandas==1.3.5;python_version<'3.8' # note that pandas 1.4 dropped python 3.7 support
ruamel.yaml==0.17.21
scipy==1.7.3 # note that scipy 1.8 dropped python 3.7 support
setuptools==63.4.1
scipy==1.9.3;python_version>='3.8'
scipy==1.7.3;python_version<'3.8' # note that scipy 1.8 dropped python 3.7 support
setuptools==65.4.1
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
VCS = git
versionfile_source = src/hdmf/_version.py
versionfile_build = hdmf/_version.py
style = pep440-pre
tag_prefix = *.*.*
tag_prefix = ''

[flake8]
max-line-length = 120
Expand Down
5 changes: 2 additions & 3 deletions src/hdmf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ def get_region_slicer(**kwargs):
return None


from ._version import get_versions # noqa: E402
__version__ = get_versions()['version']
del get_versions
from . import _version # noqa: F401,E402
__version__ = _version.get_versions()['version']


from ._due import due, BibTeX # noqa: E402
Expand Down
Loading

0 comments on commit ccc5c25

Please sign in to comment.