diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ca945579c..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,498 +0,0 @@ -version: 2.1 - -references: - - run-style-check: &run-style-check - name: Run Style Checks - command: | - . ../venv/bin/activate - pip install flake8 - flake8 src/pynwb - flake8 tests - flake8 --ignore E402,E501,W504 docs/gallery - - initialize-venv: &initialize-venv - name: Initialize Virtual Environment - command: | - pip install --upgrade pip - python -m virtualenv ../venv || python -m venv ../venv - . ../venv/bin/activate - - py39: &py39 - docker: - - image: circleci/python:3.9 - auth: - username: hdmf - password: $DOCKERHUB_PASSWORD - - py38: &py38 - docker: - - image: circleci/python:3.8 - auth: - username: hdmf - password: $DOCKERHUB_PASSWORD - - py37: &py37 - docker: - - image: circleci/python:3.7 - auth: - username: hdmf - password: $DOCKERHUB_PASSWORD - - conda-image: &conda-image - docker: - - image: continuumio/miniconda3:latest - auth: - username: hdmf - password: $DOCKERHUB_PASSWORD - - ci-steps: &ci-steps - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - run: - <<: *initialize-venv - - run: - name: Run the tests - command: | - . ../venv/bin/activate - pip install tox - tox -e $TEST_TOX_ENV - # Install is expected to be quick. Increase timeout in case there are some network issues. - # While pip installing tox does not output by default. Circle thinks task is dead after 10 min. - no_output_timeout: 30m - - run: - name: Build wheel and source distribution - command: | - . ../venv/bin/activate - tox -e $BUILD_TOX_ENV - - run: - name: Test installation from a wheel - command: | - . ../venv/bin/activate - tox -e $TEST_WHEELINSTALL_ENV --recreate --installpkg dist/*-none-any.whl - - run: - name: Remove distributions if UPLOAD_WHEELS != true - command: | - if [[ "${UPLOAD_WHEELS}" != "true" ]]; then - echo "Discarding distributions" - ls -1 dist - rm -rf dist/* - else - echo "Keeping distributions for upload" - ls -1 dist - fi - - persist_to_workspace: - root: ./ - paths: - - dist - - conda-steps: &conda-steps - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - run: - name: Configure conda - command: | - conda install -n base -c defaults conda=4.13.0 - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - conda create --name test python=$CONDA_PYTHON_VER --yes - conda init bash - source ~/.bashrc - conda activate test - pip install --upgrade pip - # work around incompatibilities between virtualenv & importlib-metadata - if [[ "${TEST_TOX_ENV}" == *"py37"* ]]; then - conda install "importlib-metadata=1.7" - else - conda install importlib-metadata - fi - conda install tox - conda list - pip list - - run: - name: Run the tests - command: | - source ~/.bashrc - conda activate test - tox -e $TEST_TOX_ENV - - run: - name: Build wheel and source distribution - command: | - source ~/.bashrc - conda activate test - tox -e $BUILD_TOX_ENV - - run: - name: Test installation from a wheel - command: | - source ~/.bashrc - conda activate test - tox -e $TEST_WHEELINSTALL_ENV --recreate --installpkg dist/*-none-any.whl - - gallery-steps: &gallery-steps - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - restore_cache: - keys: - - ophys-data-cache - - run: - <<: *initialize-venv - - run: - name: Run the gallery tests - command: | - . ../venv/bin/activate - pip install tox - tox -e $TEST_TOX_ENV - no_output_timeout: 30m - - save_cache: - key: ophys-data-cache - paths: ophys_experiment_data - - no_filters: &no_filters - filters: - tags: - ignore: - # exclude tags created by "ci_addons publish_github_release" - - /^latest$/ - - /^latest-tmp$/ - context: - - docker-hub-creds - -jobs: - flake8: - <<: *py39 - steps: - - checkout - - run: - <<: *initialize-venv - - run: - <<: *run-style-check - - python37: - <<: *py37 - environment: - - TEST_TOX_ENV: "py37" - - BUILD_TOX_ENV: "build-py37" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *ci-steps - - python38: - <<: *py38 - environment: - - TEST_TOX_ENV: "py38" - - BUILD_TOX_ENV: "build-py38" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *ci-steps - - python39: - <<: *py39 - environment: - - TEST_TOX_ENV: "py39" - - BUILD_TOX_ENV: "build-py39" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *ci-steps - - python39-upgrade-dev: - <<: *py39 - environment: - - TEST_TOX_ENV: "py39-upgrade-dev" - - BUILD_TOX_ENV: "build-py39-upgrade-dev" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - - UPLOAD_WHEELS: "true" # upload distributions from only this job to pypi - <<: *ci-steps - - python39-upgrade-dev-pre: - <<: *py39 - environment: - - TEST_TOX_ENV: "py39-upgrade-dev-pre" - - BUILD_TOX_ENV: "build-py39-upgrade-dev-pre" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *ci-steps - - python37-min-req: - <<: *py37 - environment: - - TEST_TOX_ENV: "py37-min-req" - - BUILD_TOX_ENV: "build-py37-min-req" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *ci-steps - - miniconda37: - <<: *conda-image - environment: - - CONDA_PYTHON_VER: "3.7" - - TEST_TOX_ENV: "py37" - - BUILD_TOX_ENV: "build-py37" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *conda-steps - - miniconda38: - <<: *conda-image - environment: - - CONDA_PYTHON_VER: "3.8" - - TEST_TOX_ENV: "py38" - - BUILD_TOX_ENV: "build-py38" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *conda-steps - - miniconda39: - <<: *conda-image - environment: - - CONDA_PYTHON_VER: "3.9" - - TEST_TOX_ENV: "py39" - - BUILD_TOX_ENV: "build-py39" - - TEST_WHEELINSTALL_ENV: "wheelinstall" - <<: *conda-steps - - miniconda39-ros3: # tox and conda do not play nicely so do not use tox here - <<: *conda-image - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - run: - name: Configure conda - command: | - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - - run: - name: Run the tests - command: | - conda env create -f environment-ros3.yml - source activate ros3 - pip install -r requirements-dev.txt - pip install -e . - python test.py --ros3 - - gallery37: - <<: *py37 - environment: - - TEST_TOX_ENV: "gallery-py37" - <<: *gallery-steps - - gallery38: - <<: *py38 - environment: - - TEST_TOX_ENV: "gallery-py38" - <<: *gallery-steps - - gallery39: - <<: *py39 - environment: - - TEST_TOX_ENV: "gallery-py39" - <<: *gallery-steps - - gallery39-upgrade-dev: - <<: *py39 - environment: - - TEST_TOX_ENV: "gallery-py39-upgrade-dev" - <<: *gallery-steps - - gallery39-upgrade-dev-pre: - <<: *py39 - environment: - - TEST_TOX_ENV: "gallery-py39-upgrade-dev-pre" - <<: *gallery-steps - - gallery37-min-req: - <<: *py37 - environment: - - TEST_TOX_ENV: "gallery-py37-min-req" - <<: *gallery-steps - - gallery39-ros3: # tox and conda do not play nicely so do not use tox here - <<: *conda-image - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - run: - name: Configure conda - command: | - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - - run: - name: Run the tests - command: | - conda env create -f environment-ros3.yml - source activate ros3 - pip install -e . - python test.py --example-ros3 - - test-validation: - <<: *py38 - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - run: - <<: *initialize-venv - - run: - name: Run the tests - command: | - . ../venv/bin/activate - pip install tox - tox -e validation-py38 - # Install is expected to be quick. Increase timeout in case there are some network issues. - # While pip installing tox does not output by default. Circle thinks task is dead after 10 min. - no_output_timeout: 30m - - deploy-dev: - <<: *py39 - steps: - - checkout - - attach_workspace: - at: ./ - - run: - name: Publish wheel and source distribution as a GitHub pre-release - command: | - python -m venv ../venv - . ../venv/bin/activate - pip install -U scikit-ci-addons - echo "CIRCLE_SHA1 [$CIRCLE_SHA1]" - ci_addons publish_github_release NeurodataWithoutBorders/pynwb \ - --prerelease-packages "dist/*" \ - --prerelease-sha $CIRCLE_SHA1 \ - --prerelease-packages-clear-pattern "*" \ - --prerelease-packages-keep-pattern "*dev*" \ - --re-upload \ - --exit-success-if-missing-token - - deploy-release: - <<: *py39 - steps: - - attach_workspace: - at: ./ - - run: - name: Deploy release - command: | - echo "Deploy release" - python -m venv ../venv - . ../venv/bin/activate - pip install twine - ls dist - twine upload -u $PYPI_USER -p $PYPI_PASSWORD --skip-existing dist/* - - run: - name: Publish wheel and source distribution as a GitHub release - command: | - python -m venv ../venv - . ../venv/bin/activate - # use click<8 until https://github.com/j0057/github-release/issues/62 is resolved - pip install "click<8" githubrelease - githubrelease release $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \ - create $CIRCLE_TAG --name $CIRCLE_TAG \ - --publish ./dist/* - -workflows: - version: 2 - test-package-publish: - jobs: - - flake8: - <<: *no_filters - - python37-min-req: - <<: *no_filters - - python39-upgrade-dev: - <<: *no_filters - - miniconda37: - <<: *no_filters - - miniconda39: - <<: *no_filters - - gallery37-min-req: - <<: *no_filters - - gallery38: # TODO replace with gallery39 after allensdk support py39 - <<: *no_filters - - gallery39-ros3: - <<: *no_filters - - miniconda39-ros3: - <<: *no_filters - - deploy-dev: - requires: - - flake8 - - python37-min-req - - python39-upgrade-dev # distributions from this job uploaded to PyPI - - miniconda37 - - miniconda39 - - gallery37-min-req - - gallery38 # TODO gallery39 - - gallery39-ros3 - - miniconda39-ros3 - filters: - tags: - ignore: - # exclude tags created by "ci_addons publish_github_release" - - /^latest$/ - - /^latest-tmp$/ - branches: - only: dev - context: - - docker-hub-creds - - deploy-release: - requires: - - flake8 - - python37-min-req - - python39-upgrade-dev # distributions from this job uploaded to PyPI - - miniconda37 - - miniconda39 - - gallery37-min-req - - gallery38 # TODO gallery39 - - gallery39-ros3 - - miniconda39-ros3 - filters: - tags: - only: /^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$/ - branches: - ignore: /.*/ - context: - - docker-hub-creds - - nightly: - triggers: - - schedule: - cron: "0 5 * * *" - filters: - branches: - only: dev - jobs: - - flake8: - <<: *no_filters - - python37: - <<: *no_filters - - python37-min-req: - <<: *no_filters - - python38: - <<: *no_filters - - python39: - <<: *no_filters - - python39-upgrade-dev: - <<: *no_filters - - python39-upgrade-dev-pre: - <<: *no_filters - - miniconda37: - <<: *no_filters - - miniconda38: - <<: *no_filters - - miniconda39: - <<: *no_filters - - gallery37: - <<: *no_filters - - gallery37-min-req: - <<: *no_filters - - gallery38: - <<: *no_filters - - gallery39: - <<: *no_filters - - gallery39-upgrade-dev: - <<: *no_filters - - gallery39-upgrade-dev-pre: - <<: *no_filters - - gallery39-ros3: - <<: *no_filters - - miniconda39-ros3: - <<: *no_filters - - test-validation: - <<: *no_filters diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml new file mode 100644 index 000000000..144d16cfa --- /dev/null +++ b/.github/workflows/check_external_links.yml @@ -0,0 +1,34 @@ +name: Check Sphinx external links +on: + pull_request: + schedule: + - cron: '0 5 * * *' # once per day at midnight ET + workflow_dispatch: + +jobs: + check-external-links: + 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 }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.8' # allensdk requires 3.8 + + - 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 . + + - name: Check Sphinx external links + run: sphinx-build -b linkcheck ./docs/source ./test_build diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml new file mode 100644 index 000000000..418cc09e1 --- /dev/null +++ b/.github/workflows/deploy_release.yml @@ -0,0 +1,54 @@ +name: Deploy release +on: + push: + tags: # run only on new tags that follow semver MAJOR.MINOR.PATCH + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + deploy-release: + name: Deploy release from tag + runs-on: ubuntu-latest + steps: + - name: Checkout repo with submodules + 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: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + python -m pip list + + - name: Run tox tests + run: | + tox -e py310-upgraded + + - name: Build wheel and source distribution + run: | + tox -e build-py310-upgraded + ls -1 dist + + - name: Test installation from a wheel + run: | + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Upload wheel and source distributions to PyPI + 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 -u ${{ secrets.BOT_PYPI_USER }} -p ${{ secrets.BOT_PYPI_PASSWORD }} --skip-existing dist/* + + - name: Publish wheel and source distributions as a GitHub release + run: | + python -m pip install "githubrelease>=1.5.9" + githubrelease --github-token ${{ secrets.BOT_GITHUB_TOKEN }} release NeurodataWithoutBorders/pynwb \ + create ${{ github.ref_name }} --name ${{ github.ref_name }} \ + --publish dist/* diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml new file mode 100644 index 000000000..a52d11c40 --- /dev/null +++ b/.github/workflows/run_all_tests.yml @@ -0,0 +1,274 @@ +name: Run all tests +on: + schedule: + - cron: '0 5 * * *' # once per day at midnight ET + push: + tags: # run only on new tags that follow semver + - '/^[0-9]+(\.[0-9]+)?(\.[0-9]+)?$/' + workflow_dispatch: + +jobs: + run-all-tests: + # the only differences between this job and "run_tests.yml" is the "strategy.matrix.include" and the upload + # distributions step. + # GitHub Actions does not yet support YAML anchors, easily reusable components, or easy dynamic matrix + # configurations based on the github event, so this job is duplicated for the most part + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + 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: + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + python -m pip list + + - name: Run tox tests + run: | + tox -e ${{ matrix.test-tox-env }} + + - name: Build wheel and source distribution + run: | + tox -e ${{ matrix.build-tox-env }} + ls -1 dist + + - name: Test installation from a wheel + run: | + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + run-all-gallery-tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + include: + - { name: linux-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } + - { name: linux-gallery-python3.8-upgraded , test-tox-env: gallery-py38-upgraded , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-gallery-python3.8-prerelease , test-tox-env: gallery-py38-prerelease , python-ver: "3.8" , os: ubuntu-latest } + # allensdk is not compatible with python 3.9+, so run gallery tests only on python <=3.8 + # - { name: linux-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: ubuntu-latest } + # - { name: linux-gallery-python3.10-prerelease , test-tox-env: gallery-py310-prerelease, python-ver: "3.10", os: ubuntu-latest } + - { name: windows-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: windows-latest } + - { name: windows-gallery-python3.8-upgraded , test-tox-env: gallery-py38-upgraded , python-ver: "3.8" , os: windows-latest } + - { name: windows-gallery-python3.8-prerelease , test-tox-env: gallery-py38-prerelease , python-ver: "3.8" , os: windows-latest } + # - { name: windows-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: windows-latest } + # - { name: windows-gallery-python3.10-prerelease, test-tox-env: gallery-py310-prerelease, python-ver: "3.10", os: windows-latest } + - { name: macos-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: macos-latest } + - { name: macos-gallery-python3.8-upgraded , test-tox-env: gallery-py38-upgraded , python-ver: "3.8" , os: macos-latest } + - { name: macos-gallery-python3.8-prerelease , test-tox-env: gallery-py38-prerelease , python-ver: "3.8" , os: macos-latest } + # - { 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 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + python -m pip list + + - name: Run tox tests + 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 + strategy: + fail-fast: false + 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 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + auto-activate-base: true + activate-environment: true + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + conda config --set always_yes yes --set changeps1 no + conda info + conda install -c conda-forge tox + conda list + + - name: Run tox tests + run: | + tox -e ${{ matrix.test-tox-env }} + + - name: Build wheel and source distribution + run: | + tox -e ${{ matrix.build-tox-env }} + ls -1 dist + + - name: Test installation from a wheel + run: | + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + + run-ros3-tests: # tox and conda do not play nicely so do not use tox here + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} # necessary for conda + strategy: + fail-fast: false + matrix: + include: + - { name: linux-python3.9-ros3 , python-ver: "3.9", os: ubuntu-latest } + - { name: windows-python3.9-ros3, python-ver: "3.9", os: windows-latest } + - { name: macos-python3.9-ros3 , python-ver: "3.9", os: macos-latest } + steps: + - name: Cancel any previous incomplete runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: ros3 + environment-file: environment-ros3.yml + python-version: ${{ matrix.python-ver }} + channels: conda-forge + auto-activate-base: false + + - name: Install run dependencies + run: | + pip install -r requirements-dev.txt + pip install -e . + conda info + conda list + pip list + + - name: Run gallery ros3 tests + run: | + python test.py --ros3 + + run-gallery-ros3-tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} # necessary for conda + strategy: + fail-fast: false + matrix: + include: + - { name: linux-gallery-python3.9-ros3 , python-ver: "3.9", os: ubuntu-latest } + - { name: windows-gallery-python3.9-ros3, python-ver: "3.9", os: windows-latest } + - { name: macos-gallery-python3.9-ros3 , python-ver: "3.9", os: macos-latest } + steps: + - name: Cancel any previous incomplete runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: ros3 + environment-file: environment-ros3.yml + python-version: ${{ matrix.python-ver }} + channels: conda-forge + auto-activate-base: false + + - name: Install run dependencies + run: | + pip install matplotlib + pip install -e . + conda info + conda list + pip list + + - name: Run gallery ros3 tests + run: | + python test.py --example-ros3 \ No newline at end of file diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index 6b59d5cf6..b3b40c962 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -13,7 +13,7 @@ jobs: run-coverage: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} - # TODO + # TODO handle forks # run pipeline on either a push event or a PR event on a fork # if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name defaults: @@ -46,9 +46,9 @@ jobs: 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 optional dependencies + # if: ${{ matrix.opt_req }} + # run: python -m pip install -r requirements-opt.txt - name: Install package run: | @@ -65,6 +65,7 @@ jobs: uses: codecov/codecov-action@v3 with: flags: unit + files: coverage.xml fail_ci_if_error: true - name: Run integration tests and generate coverage report @@ -79,4 +80,5 @@ jobs: uses: codecov/codecov-action@v3 with: flags: integration + files: coverage.xml fail_ci_if_error: true diff --git a/.github/workflows/run_flake8.yml b/.github/workflows/run_flake8.yml new file mode 100644 index 000000000..891dc2f58 --- /dev/null +++ b/.github/workflows/run_flake8.yml @@ -0,0 +1,30 @@ +name: Run style check +on: pull_request + +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 }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + 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: Run flake8 + run: flake8 diff --git a/.github/workflows/run_inspector_tests.yml b/.github/workflows/run_inspector_tests.yml new file mode 100644 index 000000000..d4663a1f9 --- /dev/null +++ b/.github/workflows/run_inspector_tests.yml @@ -0,0 +1,46 @@ +name: Run NWB Inspector tests +on: + pull_request: + schedule: + - cron: '0 5 * * *' # once per day at midnight ET + workflow_dispatch: + +jobs: + run-tests: + 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 }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.9' + + - name: Update pip + run: python -m pip install --upgrade pip + + - name: Clone NWB Inspector and install dev branch of PyNWB + run: | + python -m pip list + git clone https://github.com/NeurodataWithoutBorders/nwbinspector.git + cd nwbinspector + python -m pip install -r requirements.txt pytest + # must install in editable mode for coverage to find sources + python -m pip install -e . # this might install a pinned version of pynwb instead of the current one + cd .. + python -m pip uninstall -y pynwb # uninstall the pinned version of pynwb + python -m pip install . # reinstall current branch of pynwb + python -m pip list + + - name: Run NWB Inspector tests on NWB Inspector dev branch + run: | + cd nwbinspector + pytest diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 000000000..9aede942e --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,290 @@ +name: Run tests +on: + push: + branches: + - dev + tags-ignore: # exclude tags created by "ci_addons publish_github_release" + - 'latest' + - 'latest-tmp' + pull_request: + +jobs: + run-tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + 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 } + - { 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.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , 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.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 + 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 + with: + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + python -m pip list + + - name: Run tox tests + run: | + tox -e ${{ matrix.test-tox-env }} + + - name: Build wheel and source distribution + run: | + tox -e ${{ matrix.build-tox-env }} + ls -1 dist + + - name: Test installation from a wheel + run: | + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Upload distribution as a workspace artifact + if: ${{ matrix.upload-wheels }} + uses: actions/upload-artifact@v3 + with: + name: distributions + path: dist + + run-gallery-tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + include: + - { name: linux-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } + - { name: linux-gallery-python3.8-upgraded , test-tox-env: gallery-py38-upgraded, python-ver: "3.8", os: ubuntu-latest } + # allensdk is not compatible with python 3.9+, so run gallery tests only on python <=3.8 + # - { name: linux-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded, python-ver: "3.10", os: ubuntu-latest } + - { name: windows-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: windows-latest } + - { name: windows-gallery-python3.8-upgraded, test-tox-env: gallery-py38-upgraded, python-ver: "3.8", 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 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + python -m pip list + + - name: Run tox tests + run: | + tox -e ${{ matrix.test-tox-env }} + + run-tests-on-conda: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} # necessary for conda + strategy: + fail-fast: false + 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.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 + with: + 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 + with: + auto-update-conda: true + auto-activate-base: true + activate-environment: true + python-version: ${{ matrix.python-ver }} + + - name: Install build dependencies + run: | + conda config --set always_yes yes --set changeps1 no + conda info + conda install -c conda-forge tox + conda list + + - name: Run tox tests + run: | + tox -e ${{ matrix.test-tox-env }} + + - name: Build wheel and source distribution + run: | + tox -e ${{ matrix.build-tox-env }} + ls -1 dist + + - name: Test installation from a wheel + run: | + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + run-ros3-tests: # tox and conda do not play nicely so do not use tox here + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} # necessary for conda + strategy: + fail-fast: false + matrix: + include: + - { name: linux-python3.9-ros3 , python-ver: "3.9", os: ubuntu-latest } + steps: + - name: Cancel any previous incomplete runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: ros3 + environment-file: environment-ros3.yml + python-version: ${{ matrix.python-ver }} + channels: conda-forge + auto-activate-base: false + + - name: Install run dependencies + run: | + pip install -r requirements-dev.txt + pip install -e . + conda info + conda list + pip list + + - name: Run gallery ros3 tests + run: | + python test.py --ros3 + + run-gallery-ros3-tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} # necessary for conda + strategy: + fail-fast: false + matrix: + include: + - { name: linux-gallery-python3.9-ros3 , python-ver: "3.9", os: ubuntu-latest } + steps: + - name: Cancel any previous incomplete runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: ros3 + environment-file: environment-ros3.yml + python-version: ${{ matrix.python-ver }} + channels: conda-forge + auto-activate-base: false + + - name: Install run dependencies + run: | + pip install matplotlib + pip install -e . + conda info + conda list + pip list + + - name: Run gallery ros3 tests + run: | + python test.py --example-ros3 + + deploy-dev: + name: Deploy pre-release from dev + needs: [run-tests, run-gallery-tests, run-tests-on-conda, run-ros3-tests, run-gallery-ros3-tests] + if: ${{ github.event_name == 'push' }} + runs-on: ubuntu-latest + steps: + - name: Cancel any previous incomplete runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout repo with submodules + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + + - name: Download wheel and source distributions from artifact + uses: actions/download-artifact@v3 + with: + name: distributions + path: dist + + - name: Publish wheel and source distributions as a GitHub release + run: | + python -m pip install --upgrade pip + python -m pip install scikit-ci-addons + ci_addons publish_github_release NeurodataWithoutBorders/pynwb \ + --prerelease-packages "dist/*" \ + --prerelease-sha $GITHUB_SHA \ + --prerelease-packages-clear-pattern "*" \ + --prerelease-packages-keep-pattern "*dev*" \ + --token ${{ secrets.BOT_GITHUB_TOKEN }} \ + --re-upload diff --git a/CHANGELOG.md b/CHANGELOG.md index db323ef3a..54d8128a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # PyNWB Changelog -## PyNWB 2.1.2 (Upcoming) +## PyNWB 2.2.0 (October 3, 2022) + +### Internal enhancements: +- Moved CI to GitHub Actions. @rly [#1560](https://github.com/NeurodataWithoutBorders/pynwb/pull/1560) ### Bug fixes - Fixed bug in ``pynwb.testing.mock.file.mock_NWBFile`` to identifier UUID to string. @oruebel [#1557](https://github.com/NeurodataWithoutBorders/pynwb/pull/1557) -- Fixed CircleCI configuration. @rly [#1559](https://github.com/NeurodataWithoutBorders/pynwb/pull/1559) ## PyNWB 2.1.1 (September 1, 2022) diff --git a/README.rst b/README.rst index bf928f96d..a1cce1be5 100644 --- a/README.rst +++ b/README.rst @@ -13,27 +13,6 @@ Latest Release .. image:: https://anaconda.org/conda-forge/pynwb/badges/version.svg :target: https://anaconda.org/conda-forge/pynwb - -Build Status -============ - -.. table:: - - +-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | Linux | Windows and MacOS | - +=========================================================================================+=================================================================================================================================+ - | .. image:: https://circleci.com/gh/NeurodataWithoutBorders/pynwb.svg?style=shield | .. image:: https://dev.azure.com/NeurodataWithoutBorders/pynwb/_apis/build/status/NeurodataWithoutBorders.pynwb?branchName=dev | - | :target: https://circleci.com/gh/NeurodataWithoutBorders/pynwb | :target: https://dev.azure.com/NeurodataWithoutBorders/pynwb/_build/latest?definitionId=3&branchName=dev | - +-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - - -**Conda** - - -.. image:: https://circleci.com/gh/conda-forge/pynwb-feedstock.svg?style=shield - :target: https://circleci.com/gh/conda-forge/pynwb-feedstocks - - Code Coverage ============== @@ -58,6 +37,24 @@ Integration test coverage Overall Health ============== +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/workflows/run_tests.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/run_tests.yml + +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/workflows/run_flake8.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/run_flake8.yml + +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/workflows/check_external_links.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/check_external_links.yml + +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/run_inspector_tests.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/run_inspector_tests.yml + +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/workflows/run_all_tests.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/run_all_tests.yml + +.. image:: https://github.com/NeurodataWithoutBorders/pynwb/workflows/deploy_release.yml/badge.svg + :target: https://github.com/NeurodataWithoutBorders/pynwb/actions/workflows/deploy_release.yml + .. image:: https://requires.io/github/NeurodataWithoutBorders/pynwb/requirements.svg?branch=dev :target: https://requires.io/github/NeurodataWithoutBorders/pynwb/requirements/?branch=dev :alt: Requirements Status @@ -68,7 +65,12 @@ Overall Health .. image:: https://img.shields.io/pypi/l/pynwb.svg :target: https://github.com/neurodatawithoutborders/pynwb/blob/dev/license.txt - :alt: PyPI - License + :alt: PyPI - License + +**Conda** +.. image:: https://circleci.com/gh/conda-forge/pynwb-feedstock.svg?style=shield + :target: https://circleci.com/gh/conda-forge/pynwb-feedstocks + :alt: Conda Feedstock Status NWB Format API ============== diff --git a/azure-pipelines-nightly.yml b/azure-pipelines-nightly.yml deleted file mode 100644 index cb4af6def..000000000 --- a/azure-pipelines-nightly.yml +++ /dev/null @@ -1,199 +0,0 @@ -trigger: none - -pr: none - -schedules: -- cron: "0 5 * * *" - displayName: nightly - branches: - include: dev - -jobs: - -- job: 'Test' - displayName: "Test PyNWB" - - strategy: - matrix: - macOS-py3.9: - imageName: 'macOS-latest' - pythonVersion: '3.9' - testToxEnv: 'py39' - buildToxEnv: 'build-py39' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.9-upgrade-dev-pre: - imageName: 'macOS-latest' - pythonVersion: '3.9' - testToxEnv: 'py39-upgrade-dev-pre' - buildToxEnv: 'build-py39-upgrade-dev-pre' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.9-upgrade-dev: - imageName: 'macOS-latest' - pythonVersion: '3.9' - testToxEnv: 'py39-upgrade-dev' - buildToxEnv: 'build-py39-upgrade-dev' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.8: - imageName: 'macOS-latest' - pythonVersion: '3.8' - testToxEnv: 'py38' - buildToxEnv: 'build-py38' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.7: - imageName: 'macOS-latest' - pythonVersion: '3.7' - testToxEnv: 'py37' - buildToxEnv: 'build-py37' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.7-min-req: - imageName: 'macOS-latest' - pythonVersion: '3.7' - testToxEnv: 'py37-min-req' - buildToxEnv: 'build-py37-min-req' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.9: - imageName: 'windows-latest' - pythonVersion: '3.9' - testToxEnv: 'py39' - buildToxEnv: 'build-py39' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.9-upgrade-dev-pre: - imageName: 'windows-latest' - pythonVersion: '3.9' - testToxEnv: 'py39-upgrade-dev-pre' - buildToxEnv: 'build-py39-upgrade-dev-pre' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.9-upgrade-dev: - imageName: 'windows-latest' - pythonVersion: '3.9' - testToxEnv: 'py39-upgrade-dev' - buildToxEnv: 'build-py39-upgrade-dev' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.8: - imageName: 'windows-latest' - pythonVersion: '3.8' - testToxEnv: 'py38' - buildToxEnv: 'build-py38' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.7: - imageName: 'windows-latest' - pythonVersion: '3.7' - testToxEnv: 'py37' - buildToxEnv: 'build-py37' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.7-min-req: - imageName: 'windows-latest' - pythonVersion: '3.7' - testToxEnv: 'py37-min-req' - buildToxEnv: 'build-py37-min-req' - testWheelInstallEnv: 'wheelinstall' - - pool: - vmImage: $(imageName) - - steps: - - - checkout: self - submodules: true - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(pythonVersion)' - architecture: 'x64' - - - script: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install setuptools wheel virtualenv tox - displayName: 'Install build dependencies' - - - bash: | - tox -e $(testToxEnv) - displayName: 'Run tox tests' - - - bash: | - tox -e $(buildToxEnv) - displayName: 'Run build tests' - - - bash: | - tox -e $(testWheelInstallEnv) --recreate --installpkg dist/*-none-any.whl - displayName: 'Run wheel install tests' - - -- job: 'Test_ROS3_Windows' - displayName: "Test PyNWB with Conda and ROS3 on Windows" - - pool: - vmImage: 'windows-latest' - - steps: - - - checkout: self - submodules: true - - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.9' - architecture: 'x64' - - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: 'Add conda to PATH' - - - powershell: conda env create -f environment-ros3.yml - displayName: 'Create conda environment' - - - script: | - call activate ros3 - pip install -r requirements-dev.txt - pip install -e . - displayName: 'Install PyNWB and dependencies' - - - script: | - call activate ros3 - python test.py --ros3 - displayName: 'Run ROS3 tests' - - -- job: 'Test_ROS3_macOS' - displayName: "Test PyNWB with Conda and ROS3 on macOS" - - pool: - vmImage: 'macos-latest' - - steps: - - - checkout: self - submodules: true - - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.9' - architecture: 'x64' - - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA # Take ownership of conda installation - displayName: 'Add conda to PATH' - - - bash: | - conda env create -f environment-ros3.yml - source activate ros3 - pip install -r requirements-dev.txt - pip install -e . - displayName: 'Create conda environment and install PyNWB and dependencies' - - - bash: | - source activate ros3 - python test.py --ros3 - displayName: 'Run ROS3 tests' diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 7eeb215da..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,67 +0,0 @@ -trigger: -- dev - -jobs: - -- job: 'Test' - displayName: "Test PyNWB" - - strategy: - matrix: - macOS-py3.9: - imageName: 'macOS-latest' - pythonVersion: '3.9' - testToxEnv: 'py39' - buildToxEnv: 'build-py39' - testWheelInstallEnv: 'wheelinstall' - - macOS-py3.7-min-req: - imageName: 'macOS-latest' - pythonVersion: '3.7' - testToxEnv: 'py37-min-req' - buildToxEnv: 'build-py37-min-req' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.9: - imageName: 'windows-latest' - pythonVersion: '3.9' - testToxEnv: 'py39' - buildToxEnv: 'build-py39' - testWheelInstallEnv: 'wheelinstall' - - Windows-py3.7-min-req: - imageName: 'windows-latest' - pythonVersion: '3.7' - testToxEnv: 'py37-min-req' - buildToxEnv: 'build-py37-min-req' - testWheelInstallEnv: 'wheelinstall' - - pool: - vmImage: $(imageName) - - steps: - - checkout: self - submodules: true - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(pythonVersion)' - architecture: 'x64' - - - script: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install setuptools wheel virtualenv tox - displayName: 'Install build dependencies' - - - bash: | - tox -e $(testToxEnv) - displayName: 'Run tox tests' - - - bash: | - tox -e $(buildToxEnv) - displayName: 'Run build tests' - - - bash: | - tox -e $(testWheelInstallEnv) --recreate --installpkg dist/*-none-any.whl - displayName: 'Run wheel install tests' diff --git a/docs/gallery/domain/plot_behavior.py b/docs/gallery/domain/plot_behavior.py index cf1bf77a6..c71d21c92 100644 --- a/docs/gallery/domain/plot_behavior.py +++ b/docs/gallery/domain/plot_behavior.py @@ -138,7 +138,7 @@ # .. seealso:: # You can learn more about best practices that can be applied to # :py:class:`~pynwb.behavior.SpatialSeries` at `NWB Best Practices -# `_. +# `_. # #################### diff --git a/docs/gallery/general/read_basics.py b/docs/gallery/general/read_basics.py index 4e6dba70d..30dd93285 100644 --- a/docs/gallery/general/read_basics.py +++ b/docs/gallery/general/read_basics.py @@ -10,7 +10,7 @@ An :py:class:`~pynwb.file.NWBFile` represents a single session of an experiment. It contains all the data of that session and the metadata required to understand the data. -We will demonstrate how to use the `DANDI `_ neurophysiology data archive to access +We will demonstrate how to use the `DANDI `_ neurophysiology data archive to access the data in two different ways: (1) by downloading it to your computer and (2) streaming it. We will briefly show tools for exploring NWB Files interactively and refer the reader to the @@ -32,7 +32,7 @@ #################### # Read the data # ------------- -# We will use the `DANDI `_ neurophysiology data archive +# We will use the `DANDI `_ neurophysiology data archive # to access an NWB File. We will use data from one session of an experiment by # `Chandravadia et al. (2020) `_, where # the authors recorded single neuron activity from the medial temporal lobes of human subjects @@ -40,10 +40,10 @@ # # Download the data # ^^^^^^^^^^^^^^^^^ -# First, we will demonstrate how to download an NWB data file from `DANDI `_ +# First, we will demonstrate how to download an NWB data file from `DANDI `_ # to your machine. # -# 1. Go to the DANDI archive and open `this `_ dataset +# 1. Go to the DANDI archive and open `this `_ dataset # 2. List the files in this dataset by clicking the "Files" button in Dandiset Actions (top right column of the page). # # .. image:: ../../_static/demo_dandi_view_files_in_dataset.png diff --git a/docs/source/conf.py b/docs/source/conf.py index 83c09529f..ca7131e3c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -136,7 +136,7 @@ def __call__(self, filename): } intersphinx_mapping = { - 'python': ('https://docs.python.org/3.9', None), + 'python': ('https://docs.python.org/3.10', None), 'numpy': ('https://numpy.org/doc/stable/', None), 'matplotlib': ('https://matplotlib.org/stable/', None), 'h5py': ('https://docs.h5py.org/en/latest/', None), diff --git a/docs/source/install_developers.rst b/docs/source/install_developers.rst index 00d3962d5..33cafe45c 100644 --- a/docs/source/install_developers.rst +++ b/docs/source/install_developers.rst @@ -6,7 +6,7 @@ Installing PyNWB for Developers PyNWB has the following minimum requirements, which must be installed before you can get started using PyNWB. -#. Python 3.7, 3.8, or 3.9 +#. Python 3.7, 3.8, 3.9, or 3.10 #. pip diff --git a/docs/source/install_users.rst b/docs/source/install_users.rst index 1fa5b9f30..1eb6b0c44 100644 --- a/docs/source/install_users.rst +++ b/docs/source/install_users.rst @@ -6,7 +6,7 @@ Installing PyNWB PyNWB has the following minimum requirements, which must be installed before you can get started using PyNWB. -#. Python 3.7, 3.8, or 3.9 +#. Python 3.7, 3.8, 3.9, or 3.10 #. pip .. note:: If you are a developer then please see the :ref:`install_developers` installation instructions instead. diff --git a/docs/source/make_a_release.rst b/docs/source/make_a_release.rst index 18d4fe075..efbf56223 100644 --- a/docs/source/make_a_release.rst +++ b/docs/source/make_a_release.rst @@ -2,7 +2,7 @@ How to Make a Release ===================== -A core developer should use the following steps to create a release `X.Y.Z` of **pynwb**. +A core developer should use the following steps to create a release ``X.Y.Z`` of **pynwb**. .. note:: @@ -16,67 +16,62 @@ A core developer should use the following steps to create a release `X.Y.Z` of * Prerequisites ------------- -* All CI tests are passing on `CircleCI`_ and `Azure Pipelines`_. +* All CI tests are passing on `GitHub Actions`_. -* You have a `GPG signing key `_. +* You have a `GPG signing key`_. -------------------------- -Documentation conventions -------------------------- +* Dependency versions in ``requirements.txt``, ``requirements-dev.txt``, ``requirements-opt.txt``, + ``requirements-doc.txt``, and ``requirements-min.txt`` are up-to-date. -The commands reported below should be evaluated in the same terminal session. +* Legal information and copyright dates in ``Legal.txt``, ``license.txt``, ``README.rst``, + ``docs/source/conf.py``, and any other files are up-to-date. -Commands to evaluate starts with a dollar sign. For example:: +* Package information in ``setup.py`` is up-to-date. - $ echo "Hello" - Hello +* ``README.rst`` information is up-to-date. -means that ``echo "Hello"`` should be copied and evaluated in the terminal. +* The ``nwb-schema`` submodule is up-to-date. The version number should be checked manually in case syncing the + git submodule does not work as expected. ----------------------- -Setting up environment ----------------------- +* Documentation reflects any new features and changes in PyNWB functionality. -1. First, `register for an account on PyPI `_. +* Documentation builds locally. +* Documentation builds on the `ReadTheDocs project`_ on the "dev" build. -2. If not already the case, ask to be added as a ``Package Index Maintainer``. +* Release notes have been prepared. +* An appropriate new version number has been selected. -3. Create a ``~/.pypirc`` file with your login credentials:: +------------------------- +Documentation conventions +------------------------- - [distutils] - index-servers = - pypi - pypitest +The commands reported below should be evaluated in the same terminal session. - [pypi] - username= - password= +Commands to evaluate starts with a dollar sign. For example:: - [pypitest] - repository=https://test.pypi.org/legacy/ - username= - password= + $ echo "Hello" + Hello - where ```` and ```` correspond to your PyPI account. +means that ``echo "Hello"`` should be copied and evaluated in the terminal. ------------------- -PyPI: Step-by-step ------------------- +------------------------------------- +Publish release on PyPI: Step-by-step +------------------------------------- -1. Make sure that all CI tests are passing on `CircleCI`_ and `Azure Pipelines`_. +1. Make sure that all CI tests are passing on `GitHub Actions`_. -2. List all tags sorted by version +2. List all tags sorted by version. .. code:: $ git tag -l | sort -V -3. Choose the next release version number +3. Choose the next release version number and store it in a variable. .. code:: @@ -84,18 +79,18 @@ PyPI: Step-by-step .. warning:: - To ensure the packages are uploaded on `PyPI`_, tags must match this regular - expression: ``^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$``. + To ensure the packages are uploaded on PyPI, tags must match this regular + expression: ``^[0-9]+.[0-9]+.[0-9]+$``. -4. Download latest sources +4. Download the latest sources. .. code:: $ cd /tmp && git clone --recurse-submodules git@github.com:NeurodataWithoutBorders/pynwb && cd pynwb -5. Tag the release +5. Tag the release. .. code:: @@ -103,10 +98,10 @@ PyPI: Step-by-step .. warning:: - This step requires a `GPG signing key `_. + This step requires a `GPG signing key`_. -6. Publish the release tag +6. Publish the release tag. .. code:: @@ -114,72 +109,92 @@ PyPI: Step-by-step .. important:: - This will trigger builds on each CI services and automatically upload the wheels - and source distribution on `PyPI`_. + This will trigger the "Deploy release" GitHub Actions workflow which will automatically upload the wheels + and source distribution to both the `PyNWB PyPI project page`_ and a new `GitHub release`_ + using the nwb-bot account. + +7. Check the status of the builds on `GitHub Actions`_. -7. Check the status of the builds on `CircleCI`_ and `Azure Pipelines`_. +8. Once the builds are completed, check that the distributions are available on `PyNWB PyPI project page`_ and that + a new `GitHub release`_ was created. -8. Once the builds are completed, check that the distributions are available on `PyPI`_ and that - a new :pynwb:`GitHub release ` was created. +9. Copy the release notes from ``CHANGELOG.md`` to the newly created `GitHub release`_. -9. Create a clean testing environment to test the installation + +10. Create a clean testing environment to test the installation. + + On bash/zsh: .. code:: - $ mkvirtualenv pynwb-${release}-install-test && \ - pip install pynwb && \ - python -c "import pynwb; print(pynwb.__version__)" + $ python -m venv pynwb-${release}-install-test && \ + source pynwb-${release}-install-test/bin/activate + + On other shells, see the `Python instructions for creating a virtual environment`_. + + +11. Test the installation: + + .. code:: - .. note:: + $ pip install pynwb && \ + python -c "import pynwb; print(pynwb.__version__)" - If the ``mkvirtualenv`` command is not available, this means you do not have `virtualenvwrapper`_ - installed, in that case, you could either install it or directly use `virtualenv`_ or `venv`_. 10. Cleanup + On bash/zsh: + .. code:: - $ deactivate && \ + $ deactivate && \ rm -rf dist/* && \ - rmvirtualenv pynwb-${release}-install-test + rm -rf pynwb-${release}-install-test -.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/ -.. _virtualenv: http://virtualenv.readthedocs.io -.. _venv: https://docs.python.org/3/library/venv.html +.. _GPG signing key: https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key +.. _ReadTheDocs project: https://readthedocs.org/projects/pynwb/builds/ +.. _GitHub Actions: https://github.com/NeurodataWithoutBorders/pynwb/actions +.. _GitHub release: https://github.com/NeurodataWithoutBorders/pynwb/releases +.. _PyNWB PyPI project page: https://pypi.org/project/pynwb +.. _Python instructions for creating a virtual environment: https://docs.python.org/3/library/venv.html#creating-virtual-environments -.. _CircleCI: https://circleci.com/gh/NeurodataWithoutBorders/pynwb -.. _Azure Pipelines: https://dev.azure.com/NeurodataWithoutBorders/pynwb/_build -.. _PyPI: https://pypi.org/project/pynwb - -------------------- -Conda: Step-by-step -------------------- +-------------------------------------------- +Publish release on conda-forge: Step-by-step +-------------------------------------------- .. warning:: - Publishing on conda requires you to have corresponding package version uploaded on - `PyPI`_. So you have to do the PypI and Github release before you do the conda release. + Publishing on conda requires you to have the corresponding package version uploaded on + `PyPI`_. So you have to do the PyPI and Github release before you do the conda release. + +.. note:: + + Conda-forge maintains a bot called "regro-cf-autotick-bot" that regularly monitors PyPI for new releases of + packages that are also on conda-forge. When a new release is detected, usually within 24 hours of publishing + on PyPI, the bot will create a Pull Request with the correct modifications to the version and sha256 values + in ``meta.yaml``. If the requirements in ``setup.py`` have been changed, then you need to modify the + requirements/run section in ``meta.yaml`` manually to reflect these changes. Once tests pass, merge the PR, + and a new release will be published on Anaconda cloud. This is the easiest way to update the package version + on conda-forge. -In order to release a new version on conda-forge, follow the steps below: +In order to release a new version on conda-forge manually, follow the steps below: -1. Choose the next release version number (that matches with the pypi version that you already published) +1. Store the release version string (this should match the PyPI version that you already published). .. code:: $ release=X.Y.Z -2. Fork pynwb-feedstock - First step is to fork `pynwb-feedstock `_ repository. - This is the recommended `best practice `_ by conda. +2. Fork the `pynwb-feedstock `_ repository to your GitHub user account. -3. Clone forked feedstock +3. Clone the forked feedstock to your local filesystem. Fill the YOURGITHUBUSER part. @@ -188,14 +203,15 @@ In order to release a new version on conda-forge, follow the steps below: $ cd /tmp && git clone https://github.com/YOURGITHUBUSER/pynwb-feedstock.git -4. Download corresponding source for the release version +4. Download the corresponding source for the release version. .. code:: $ cd /tmp && \ wget https://github.com/NeurodataWithoutBorders/pynwb/releases/download/$release/pynwb-$release.tar.gz -5. Create a new branch + +5. Create a new branch. .. code:: @@ -203,7 +219,7 @@ In order to release a new version on conda-forge, follow the steps below: git checkout -b $release -6. Modify ``meta.yaml`` +6. Modify ``meta.yaml``. Update the `version string `_ and `sha256 `_. @@ -226,15 +242,18 @@ In order to release a new version on conda-forge, follow the steps below: $ sha=$(openssl sha256 /tmp/pynwb-$release.tar.gz | awk '{print $2}') $ sed -i -- "3s/.*/{$ set sha256 = \"$sha\" %}/" recipe/meta.yaml + If the requirements in ``setup.py`` have been changed, then modify the requirements/run list in + the ``meta.yaml`` file to reflect these changes. -7. Push the changes +7. Push the changes to your fork. .. code:: $ git push origin $release -8. Create a Pull Request - Create a pull request against the `main repository `_. If the tests are passed - a new release will be published on Anaconda cloud. +8. Create a Pull Request. + + Create a pull request against the `main feedstock repository `_. + After the tests pass, merge the PR, and a new release will be published on Anaconda cloud. diff --git a/docs/source/software_process.rst b/docs/source/software_process.rst index b341c02ae..e9c0f03b1 100644 --- a/docs/source/software_process.rst +++ b/docs/source/software_process.rst @@ -10,9 +10,7 @@ Continuous Integration PyNWB is tested against Ubuntu, macOS, and Windows operating systems. The project has both unit and integration tests. - -* CircleCI_ runs all PyNWB tests on Ubuntu -* `Azure Pipelines`_ runs all PyNWB tests on Windows and macOS +Tests run on `GitHub Actions`_. Each time a PR is published or updated, the project is built, packaged, and tested on all supported operating systems and python distributions. That way, as a contributor, you know if you introduced regressions or coding style @@ -20,8 +18,7 @@ inconsistencies. There are badges in the README_ file which shows the current condition of the dev branch. -.. _CircleCI: https://circleci.com/gh/NeurodataWithoutBorders/workflows/pynwb -.. _Azure Pipelines: https://dev.azure.com/NeurodataWithoutBorders/pynwb/_build +.. _GitHub Actions: https://github.com/NeurodataWithoutBorders/pynwb/actions .. _README: https://github.com/NeurodataWithoutBorders/pynwb#readme @@ -29,11 +26,13 @@ There are badges in the README_ file which shows the current condition of the de Coverage -------- -Coverage is computed and reported using the coverage_ tool. There is a badge in the README_ file which -shows percentage coverage. A detailed report can be found on codecov_ which shows line by line which -lines are covered by the tests. +Code coverage is computed and reported using the coverage_ tool. There are two coverage-related badges in the README_ +file. One shows the status of the `GitHub Action workflow`_ which runs the coverage_ tool and uploads the report to +codecov_, and the other badge shows the percentage coverage reported from codecov_. A detailed report can be found on +codecov_, which shows line by line which lines are covered by the tests. .. _coverage: https://coverage.readthedocs.io +.. _GitHub Action workflow: https://github.com/NeurodataWithoutBorders/pynwb/actions?query=workflow%3A%22Run+coverage%22 .. _codecov: https://codecov.io/gh/NeurodataWithoutBorders/pynwb/tree/dev/src/pynwb .. _software_process_requirement_specifications: diff --git a/environment-ros3.yml b/environment-ros3.yml index d267e5461..cc3d63cce 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -12,4 +12,4 @@ dependencies: - pandas==1.3.5 - python-dateutil==2.8.2 - setuptools - - dandi==0.43.0 + - dandi==0.46.3 diff --git a/requirements-min.txt b/requirements-min.txt index 0055d14bd..3f6151bc5 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -2,6 +2,6 @@ h5py==2.10 # support for selection of datasets with list of indices added in 2.10 hdmf==3.4.0 numpy==1.16 -pandas==1.0.5 -python-dateutil==2.7 +pandas==1.1.5 +python-dateutil==2.7.3 setuptools diff --git a/setup.py b/setup.py index f952e92a3..21d3e2edf 100755 --- a/setup.py +++ b/setup.py @@ -22,8 +22,8 @@ 'h5py>=2.10,<4', 'hdmf>=3.4.2,<4', 'numpy>=1.16,<1.24', - 'pandas>=1.0.5,<2', - 'python-dateutil>=2.7,<3', + 'pandas>=1.1.5,<2', + 'python-dateutil>=2.7.3,<3', 'setuptools' ] @@ -49,6 +49,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/tox.ini b/tox.ini index 6921d7f51..e004d84ae 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,8 @@ # and then run "tox" from this directory. [tox] -envlist = py37, py38, py39 +envlist = py37, py38, py39, py310 +requires = pip >= 22.0 [testenv] download = True @@ -25,31 +26,43 @@ commands = # Env to create coverage report locally [testenv:localcoverage] -basepython = python3.9 +basepython = python3.10 commands = python -m coverage run test.py --pynwb coverage html -d tests/coverage/htmlcov -# Test with python 3.9, pinned dev reqs, and upgraded run requirements -[testenv:py39-upgrade-dev] -basepython = python3.9 +# Test with python 3.10; pinned dev and optional reqs +[testenv:py310-optional] +basepython = python3.10 +install_command = + pip install -e . {opts} {packages} +deps = + -rrequirements-dev.txt + ; -rrequirements-opt.txt +commands = {[testenv]commands} + +# Test with python 3.10; pinned dev and optional reqs; upgraded run reqs +[testenv:py310-upgraded] +basepython = python3.10 install_command = pip install -U -e . {opts} {packages} deps = -rrequirements-dev.txt + ; -rrequirements-opt.txt commands = {[testenv]commands} -# Test with python 3.9, pinned dev reqs, and pre-release run requirements -[testenv:py39-upgrade-dev-pre] -basepython = python3.9 +# Test with python 3.10; pinned dev and optional reqs; upgraded, pre-release run reqs +[testenv:py310-prerelease] +basepython = python3.10 install_command = pip install -U --pre -e . {opts} {packages} deps = -rrequirements-dev.txt + ; -rrequirements-opt.txt commands = {[testenv]commands} -# Test with python 3.7, pinned dev reqs, and minimum run requirements -[testenv:py37-min-req] +# Test with python 3.7; pinned dev reqs; minimum run reqs +[testenv:py37-minimum] basepython = python3.7 deps = -rrequirements-dev.txt @@ -59,8 +72,8 @@ commands = {[testenv]commands} # Envs that builds wheels and source distribution [testenv:build] commands = - python setup.py sdist - python setup.py bdist_wheel + python -m pip install --upgrade build + python -m build [testenv:build-py37] basepython = python3.7 @@ -74,23 +87,36 @@ commands = {[testenv:build]commands} basepython = python3.9 commands = {[testenv:build]commands} -[testenv:build-py39-upgrade-dev] -basepython = python3.9 +[testenv:build-py310] +basepython = python3.10 +commands = {[testenv:build]commands} + +[testenv:build-py310-optional] +basepython = python3.10 +deps = + -rrequirements-dev.txt + ; -rrequirements-opt.txt +commands = {[testenv:build]commands} + +[testenv:build-py310-upgraded] +basepython = python3.10 install_command = pip install -U -e . {opts} {packages} deps = -rrequirements-dev.txt + ; -rrequirements-opt.txt commands = {[testenv:build]commands} -[testenv:build-py39-upgrade-dev-pre] -basepython = python3.9 +[testenv:build-py310-prerelease] +basepython = python3.10 install_command = pip install -U --pre -e . {opts} {packages} deps = -rrequirements-dev.txt + ; -rrequirements-opt.txt commands = {[testenv:build]commands} -[testenv:build-py37-min-req] +[testenv:build-py37-minimum] basepython = python3.7 deps = -rrequirements-dev.txt @@ -100,7 +126,7 @@ commands = {[testenv:build]commands} # Envs that will test installation from a wheel [testenv:wheelinstall] deps = null -commands = python -c "import hdmf" +commands = python -c "import pynwb" # Envs that will execute gallery tests that do not require ROS3 [testenv:gallery] @@ -134,48 +160,60 @@ basepython = python3.9 deps = {[testenv:gallery]deps} commands = {[testenv:gallery]commands} -# Test with python 3.9, pinned dev and doc reqs, and upgraded run requirements -[testenv:gallery-py39-upgrade-dev] -basepython = python3.9 +[testenv:gallery-py310] +basepython = python3.10 +deps = {[testenv:gallery]deps} +commands = {[testenv:gallery]commands} +# Test with python 3.10; pinned dev, doc, and optional reqs; upgraded run reqs +[testenv:gallery-py310-upgraded] +basepython = python3.10 install_command = pip install -U -e . {opts} {packages} - deps = -rrequirements-dev.txt +# -rrequirements-opt.txt +commands = {[testenv:gallery]commands} -commands = - pip install -r requirements-doc.txt - # NOTE: installing allensdk may downgrade certain requirements so - # reinstall the repo with its requirements - pip install -r requirements-dev.txt -r requirements.txt - pip install -U -e . - python test.py --example - -# Test with python 3.9, pinned dev and doc reqs, and pre-release run requirements -[testenv:gallery-py39-upgrade-dev-pre] -basepython = python3.9 - +# Test with python 3.10; pinned dev, doc, and optional reqs; pre-release run reqs +[testenv:gallery-py310-prerelease] +basepython = python3.10 install_command = pip install -U --pre -e . {opts} {packages} +deps = + -rrequirements-dev.txt + -rrequirements-doc.txt + ; -rrequirements-opt.txt +commands = {[testenv:gallery]commands} +# Test with python 3.8; pinned dev, doc, and optional reqs; upgraded run reqs +[testenv:gallery-py38-upgraded] +basepython = python3.8 +install_command = + pip install -U -e . {opts} {packages} deps = -rrequirements-dev.txt +# -rrequirements-opt.txt +commands = {[testenv:gallery]commands} -commands = - pip install -r requirements-doc.txt - # NOTE: installing allensdk may downgrade certain requirements so - # reinstall the repo with its requirements - pip install -r requirements-dev.txt -r requirements.txt - pip install -U --pre -e . - python test.py --example +# Test with python 3.8; pinned dev, doc, and optional reqs; pre-release run reqs +[testenv:gallery-py38-prerelease] +basepython = python3.8 +install_command = + pip install -U --pre -e . {opts} {packages} +deps = + -rrequirements-dev.txt + -rrequirements-doc.txt + ; -rrequirements-opt.txt +commands = {[testenv:gallery]commands} -# Test with python 3.7, pinned dev reqs, and minimum run requirements -[testenv:gallery-py37-min-req] +# Test with python 3.7; pinned dev and doc reqs; minimum run reqs +[testenv:gallery-py37-minimum] basepython = python3.7 deps = -rrequirements-dev.txt -rrequirements-min.txt + -rrequirements-doc.txt commands = {[testenv:gallery]commands} [testenv:validation-py38]