From a1ce5b0b456a6dd664a33d4e71e76969dbc5f29d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 30 Jan 2023 10:39:47 -0500 Subject: [PATCH 01/10] MNT: Update update_changes.sh --- update_changes.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/update_changes.sh b/update_changes.sh index aff00727..b5e2bf2c 100644 --- a/update_changes.sh +++ b/update_changes.sh @@ -19,8 +19,28 @@ if [[ "$UPCOMING" == "0" ]]; then head -n3 CHANGES.rst >> newchanges fi +# Elaborate today's release header +HEADER="$1 ($(date '+%B %d, %Y'))" +echo $HEADER >> newchanges +echo $( printf "%${#HEADER}s" | tr " " "=" ) >> newchanges +echo "" >> newchanges + # Search for PRs since previous release -git show --pretty='format: * %b %s' HEAD | sed 's/Merge pull request \#\([^\d]*\)\ from\ .*/(\#\1)/' >> newchanges +MERGE_COMMITS=$( git log --grep="Merge pull request\|(#.*)$" `git describe --tags --abbrev=0`..HEAD --pretty='format:%h' ) +for COMMIT in ${MERGE_COMMITS//\n}; do + SUB=$( git log -n 1 --pretty="format:%s" $COMMIT ) + if ( echo $SUB | grep "^Merge pull request" ); then + # Merge commit + PR=$( echo $SUB | sed -e "s/Merge pull request \#\([0-9]*\).*/\1/" ) + TITLE=$( git log -n 1 --pretty="format:%b" $COMMIT ) + else + # Squashed merge + PR=$( echo $SUB | sed -e "s/.*(\#\([0-9]*\))$/\1/" ) + TITLE=$( echo $SUB | sed -e "s/\(.*\) (\#[0-9]*)$/\1/" ) + fi + echo "* $TITLE (#$PR)" >> newchanges +done +echo >> newchanges # Add back the Upcoming header if it was present if [[ "$UPCOMING" == "0" ]]; then @@ -31,4 +51,3 @@ fi # Replace old CHANGES.rst with new file mv newchanges CHANGES.rst - From efecae86ab82aaddbfdf50998ab1be77484e38ba Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 09:22:21 -0500 Subject: [PATCH 02/10] MNT: Switch to nipreps-calver version scheme --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c089da82..38860932 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "setuptools >= 45", "setuptools_scm >= 6.2", - "wheel" + "nipreps-versions", ] build-backend = "setuptools.build_meta" @@ -13,3 +13,4 @@ write_to_template = """\ __version__ = "{version}" """ fallback_version = "0.0" +version_scheme = "nipreps-calver" From f24e7ef1a650ecbebfbb5cd7d8257044fd0d7b7b Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 09:32:18 -0500 Subject: [PATCH 03/10] CI: Install nipreps-versions for version calculation, use python -m build --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5ae13f3..a4eb7f02 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: pip install -U pip pip install -r /tmp/src/templateflow/requirements.txt pip install "datalad ~= 0.11.8" - pip install "setuptools>=45" "setuptools_scm >= 6.2" twine codecov + pip install "setuptools>=45" "setuptools_scm >= 6.2" nipreps-versions build twine codecov - run: name: Install git and git-annex @@ -120,7 +120,7 @@ jobs: command: | source /tmp/venv/bin/activate cd /tmp/src/templateflow - python setup.py sdist + python -m build twine check dist/* build_docs: @@ -194,8 +194,8 @@ jobs: name: Deploy to PyPi command: | source /tmp/venv/bin/activate - pip install "setuptools>=45" "setuptools_scm >= 6.2" wheel twine - python setup.py sdist bdist_wheel + pip install build twine + python -m build twine check dist/* twine upload dist/* From 0ba0040165cae2eca1ec7fdb33e4ce1d171bd728 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 10:09:55 -0500 Subject: [PATCH 04/10] CI: Update doc environment to include nipreps-versions --- docs/environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/environment.yml b/docs/environment.yml index 1e7db025..b9fc3f65 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -152,8 +152,6 @@ dependencies: - requests=2.27.1=pyhd8ed1ab_0 - scipy=1.8.0=py39hee8e79c_1 - setuptools=62.1.0=py39hf3d152e_0 - - setuptools-scm=6.4.2=pyhd8ed1ab_0 - - setuptools_scm=6.4.2=hd8ed1ab_0 - six=1.16.0=pyh6c4a22f_0 - snowballstemmer=2.2.0=pyhd8ed1ab_0 - soupsieve=2.3.1=pyhd8ed1ab_0 @@ -202,6 +200,8 @@ dependencies: - docopt==0.6.2 - formulaic==0.3.4 - nibabel==3.2.2 + - nipreps-versions==1.0.3 - pandas==1.4.2 - pybids==0.15.2 + - setuptools_scm==7.1.0 - sqlalchemy==1.3.24 From 84e7d617985a39c5d7f6b0fd7af0e335d389e83d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 09:43:21 -0500 Subject: [PATCH 05/10] CI: Test with latest pip, stop using setup.py directly --- .github/workflows/pythonpackage.yml | 103 +++++++++------------------- 1 file changed, 32 insertions(+), 71 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 74d69f72..91488af2 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -12,58 +12,54 @@ on: jobs: build: - if: "!startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest strategy: matrix: python-version: [3.7, 3.8, 3.9] - pip: ["pip==21.2", "pip~=22.0"] steps: - - uses: actions/checkout@v2 - - name: Fetch all tags (for setuptools_scm to work) - run: | - /usr/bin/git -c protocol.version=2 fetch --tags --prune --unshallow origin + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v1 + - uses: actions/cache@v3 with: path: $HOME/.cache/pip key: pip-cache-v1 restore-keys: | pip-cache- - - name: Build in confined environment and interpolate version + - name: Interpolate version in confined environment run: | python -m venv /tmp/buildenv source /tmp/buildenv/bin/activate - python -m pip install -U "setuptools >= 45" wheel "setuptools_scm >= 6.2" \ - setuptools_scm_git_archive pip twine docutils - python setup.py sdist bdist_wheel - python -m twine check dist/templateflow* - - mv dist /tmp/package - rm -rf templateflow.egg-info/ - - # Interpolate version + python -m pip install --upgrade setuptools setuptools_scm nipreps-versions if [[ "$GITHUB_REF" == refs/tags/* ]]; then TAG=${GITHUB_REF##*/} fi - THISVERSION=$( python setup.py --version ) + THISVERSION=$( python -m setuptools_scm ) THISVERSION=${TAG:-$THISVERSION} echo "Expected VERSION: \"${THISVERSION}\"" echo "THISVERSION=${THISVERSION}" >> $GITHUB_ENV + - name: Build packages + run: | + pip install build twine + python -m build + twine check dist/templateflow* + mv dist /tmp/package + - name: Install in confined environment [pip] env: TEMPLATEFLOW_HOME: /tmp/home/pip run: | python -m venv /tmp/pip source /tmp/pip/bin/activate - python -m pip install -U "setuptools >= 45" "setuptools_scm >= 6.2" "${{ matrix.pip }}" - python -m pip install . + pip install --upgrade pip wheel + pip install . INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') echo "VERSION: \"${THISVERSION}\"" echo "INSTALLED: \"${INSTALLED_VERSION}\"" @@ -75,8 +71,8 @@ jobs: run: | python -m venv /tmp/install_sdist source /tmp/install_sdist/bin/activate - python -m pip install -U "setuptools >= 45" "${{ matrix.pip }}" - python -m pip install /tmp/package/templateflow*.tar.gz + pip install --upgrade pip wheel + pip install /tmp/package/templateflow*.tar.gz INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') echo "VERSION: \"${THISVERSION}\"" echo "INSTALLED: \"${INSTALLED_VERSION}\"" @@ -87,7 +83,7 @@ jobs: TEMPLATEFLOW_HOME: /tmp/home/sdist run: | source /tmp/install_sdist/bin/activate - python -m pip install /tmp/package/templateflow*.tar.gz --force-reinstall + pip install /tmp/package/templateflow*.tar.gz --force-reinstall find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install.txt - name: Re-install in confined environment [sdist - missing template] env: @@ -95,7 +91,7 @@ jobs: run: | rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym source /tmp/install_sdist/bin/activate - python -m pip install /tmp/package/templateflow*.tar.gz --force-reinstall + pip install /tmp/package/templateflow*.tar.gz --force-reinstall python -c "import templateflow; templateflow.update(overwrite=False)" find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install-2.txt diff /tmp/.sdist-install.txt /tmp/.sdist-install-2.txt @@ -107,8 +103,8 @@ jobs: run: | python -m venv /tmp/install_wheel source /tmp/install_wheel/bin/activate - python -m pip install -U "setuptools >= 45" "${{ matrix.pip }}" - python -m pip install /tmp/package/templateflow*.whl + pip install --upgrade pip wheel + pip install /tmp/package/templateflow*.whl INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') echo "INSTALLED: \"${INSTALLED_VERSION}\"" test "${INSTALLED_VERSION}" = "${THISVERSION}" @@ -118,7 +114,7 @@ jobs: TEMPLATEFLOW_HOME: /tmp/home/wheel run: | source /tmp/install_wheel/bin/activate - python -m pip install /tmp/package/templateflow*.whl --force-reinstall + pip install /tmp/package/templateflow*.whl --force-reinstall find ${TEMPLATEFLOW_HOME} >> /tmp/.wheel-install.txt - name: Re-install in confined environment [wheel - missing template] env: @@ -126,7 +122,7 @@ jobs: run: | rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym source /tmp/install_wheel/bin/activate - python -m pip install /tmp/package/templateflow*.whl --force-reinstall + pip install /tmp/package/templateflow*.whl --force-reinstall # Wheels do not run post-install hooks: test ! -d ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym python -c "import templateflow; templateflow.update(overwrite=False)" @@ -134,68 +130,33 @@ jobs: diff /tmp/.wheel-install.txt /tmp/.wheel-install-2.txt exit $? - - name: Install in confined environment [setup.py - install] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_install - run: | - python -m venv /tmp/setup_install - source /tmp/setup_install/bin/activate - python -m pip install -U "setuptools >= 45" wheel "setuptools_scm >= 6.2" \ - setuptools_scm_git_archive "${{ matrix.pip }}" - python -m pip install "numpy==1.20" Cython "pandas==1.3" "scipy==1.7" - python setup.py install - INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') - echo "INSTALLED: \"${INSTALLED_VERSION}\"" - test "${INSTALLED_VERSION}" = "${THISVERSION}" - - - name: Re-install in confined environment [setup.py - install] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_install - run: | - source /tmp/setup_install/bin/activate - python setup.py install - find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-install.txt - - name: Re-install in confined environment [setup.py - install - missing template] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_install - run: | - rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym - source /tmp/setup_install/bin/activate - python setup.py install - python -c "import templateflow; templateflow.update(overwrite=False)" - find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-install-2.txt - diff /tmp/.setup-install.txt /tmp/.setup-install-2.txt - exit $? - - - name: Install in confined environment [setup.py - develop] + - name: Install in confined environment [editable] env: TEMPLATEFLOW_HOME: /tmp/home/setup_develop run: | python -m venv /tmp/setup_develop source /tmp/setup_develop/bin/activate - python -m pip install -U "setuptools >= 45" wheel "setuptools_scm >= 6.2" \ - setuptools_scm_git_archive "${{ matrix.pip }}" - python -m pip install "numpy==1.20" Cython "pandas==1.3" "scipy==1.7" - python setup.py develop + pip install --upgrade pip wheel + pip install -e . INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') echo "INSTALLED: \"${INSTALLED_VERSION}\"" test "${INSTALLED_VERSION}" = "${THISVERSION}" - - name: Re-install in confined environment [setup.py - develop] + - name: Re-install in confined environment [editable] env: TEMPLATEFLOW_HOME: /tmp/home/setup_develop run: | source /tmp/setup_develop/bin/activate - python setup.py develop + pip install -e . find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-develop.txt - - name: Re-install in confined environment [setup.py - develop - missing template] + - name: Re-install in confined environment [editable - missing template] env: TEMPLATEFLOW_HOME: /tmp/home/setup_develop run: | rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym source /tmp/setup_develop/bin/activate - python setup.py develop + pip install -e . python -c "import templateflow; templateflow.update(overwrite=False)" find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-develop-2.txt diff /tmp/.setup-develop.txt /tmp/.setup-develop-2.txt From e82211d2b6c428d41be17834954f34dd948fd73a Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 09:45:02 -0500 Subject: [PATCH 06/10] CI: Add concurrency and permissions to GitHub actions --- .github/workflows/pythonpackage.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 91488af2..3345f89e 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -10,6 +10,13 @@ on: pull_request: branches: [ master ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest From dc6232ee64332dcacdd76d93928e734833fd50b7 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 10:08:07 -0500 Subject: [PATCH 07/10] CI: Deduplicate by breaking out build and using matrix --- .github/workflows/pythonpackage.yml | 196 +++++++++++----------------- 1 file changed, 77 insertions(+), 119 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3345f89e..d9168dc3 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -20,151 +20,109 @@ permissions: jobs: build: runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: 3 + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: pip-cache-v1 + restore-keys: | + pip-cache- + - run: pip install --upgrade build twine + - name: Build sdist and wheel + run: python -m build + - run: twine check dist/* + - uses: actions/upload-artifact@v3 + with: + name: dist + path: dist/ + - name: Interpolate version in confined environment + id: get_version + run: | + python -m venv /tmp/buildenv + source /tmp/buildenv/bin/activate + python -m pip install --upgrade setuptools setuptools_scm nipreps-versions + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + TAG=${GITHUB_REF##*/} + fi + THISVERSION=$( python -m setuptools_scm ) + THISVERSION=${TAG:-$THISVERSION} + echo "Expected VERSION: \"${THISVERSION}\"" + echo "version=${THISVERSION}" >> $GITHUB_OUTPUT + + test-install: + runs-on: ubuntu-latest + needs: build strategy: matrix: python-version: [3.7, 3.8, 3.9] + mode: ['repo', 'sdist', 'wheel', 'editable'] + env: + TEMPLATEFLOW_HOME: /tmp/home + THISVERSION: ${{ needs.build.outputs.version }} steps: - uses: actions/checkout@v3 + if: matrix.mode == 'repo' || matrix.mode == 'editable' with: fetch-depth: 0 + - uses: actions/download-artifact@v3 + if: matrix.mode == 'sdist' || matrix.mode == 'wheel' + with: + name: dist + path: /tmp/package/ - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - uses: actions/cache@v3 with: - path: $HOME/.cache/pip + path: ~/.cache/pip key: pip-cache-v1 restore-keys: | pip-cache- - - - name: Interpolate version in confined environment + - name: Upgrade pip + run: pip install --upgrade pip wheel + - name: Set install command run: | - python -m venv /tmp/buildenv - source /tmp/buildenv/bin/activate - python -m pip install --upgrade setuptools setuptools_scm nipreps-versions - if [[ "$GITHUB_REF" == refs/tags/* ]]; then - TAG=${GITHUB_REF##*/} - fi - THISVERSION=$( python -m setuptools_scm ) - THISVERSION=${TAG:-$THISVERSION} - echo "Expected VERSION: \"${THISVERSION}\"" - echo "THISVERSION=${THISVERSION}" >> $GITHUB_ENV - - - name: Build packages - run: | - pip install build twine - python -m build - twine check dist/templateflow* - mv dist /tmp/package - - - name: Install in confined environment [pip] - env: - TEMPLATEFLOW_HOME: /tmp/home/pip - run: | - python -m venv /tmp/pip - source /tmp/pip/bin/activate - pip install --upgrade pip wheel - pip install . - INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') - echo "VERSION: \"${THISVERSION}\"" - echo "INSTALLED: \"${INSTALLED_VERSION}\"" - test "${INSTALLED_VERSION}" = "${THISVERSION}" - - - name: Install in confined environment [sdist] - env: - TEMPLATEFLOW_HOME: /tmp/home/sdist + case ${{ matrix.mode }} in + repo) + echo "TARGET=." >> $GITHUB_ENV + ;; + editable) + echo "TARGET=-e ." >> $GITHUB_ENV + ;; + sdist) + echo "TARGET=$( ls /tmp/package/templateflow*.tar.gz )" >> $GITHUB_ENV + ;; + wheel) + echo "TARGET=$( ls /tmp/package/templateflow*.whl )" >> $GITHUB_ENV + ;; + esac + - name: Install and check version run: | - python -m venv /tmp/install_sdist - source /tmp/install_sdist/bin/activate - pip install --upgrade pip wheel - pip install /tmp/package/templateflow*.tar.gz + pip install $TARGET INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') echo "VERSION: \"${THISVERSION}\"" echo "INSTALLED: \"${INSTALLED_VERSION}\"" test "${INSTALLED_VERSION}" = "${THISVERSION}" - - name: Re-install in confined environment [sdist] - env: - TEMPLATEFLOW_HOME: /tmp/home/sdist - run: | - source /tmp/install_sdist/bin/activate - pip install /tmp/package/templateflow*.tar.gz --force-reinstall - find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install.txt - - name: Re-install in confined environment [sdist - missing template] - env: - TEMPLATEFLOW_HOME: /tmp/home/sdist - run: | - rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym - source /tmp/install_sdist/bin/activate - pip install /tmp/package/templateflow*.tar.gz --force-reinstall - python -c "import templateflow; templateflow.update(overwrite=False)" - find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install-2.txt - diff /tmp/.sdist-install.txt /tmp/.sdist-install-2.txt - exit $? - - - name: Install in confined environment [wheel] - env: - TEMPLATEFLOW_HOME: /tmp/home/wheel - run: | - python -m venv /tmp/install_wheel - source /tmp/install_wheel/bin/activate - pip install --upgrade pip wheel - pip install /tmp/package/templateflow*.whl - INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') - echo "INSTALLED: \"${INSTALLED_VERSION}\"" - test "${INSTALLED_VERSION}" = "${THISVERSION}" - - - name: Re-install in confined environment [wheel] - env: - TEMPLATEFLOW_HOME: /tmp/home/wheel - run: | - source /tmp/install_wheel/bin/activate - pip install /tmp/package/templateflow*.whl --force-reinstall - find ${TEMPLATEFLOW_HOME} >> /tmp/.wheel-install.txt - - name: Re-install in confined environment [wheel - missing template] - env: - TEMPLATEFLOW_HOME: /tmp/home/wheel - run: | - rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym - source /tmp/install_wheel/bin/activate - pip install /tmp/package/templateflow*.whl --force-reinstall - # Wheels do not run post-install hooks: - test ! -d ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym - python -c "import templateflow; templateflow.update(overwrite=False)" - find ${TEMPLATEFLOW_HOME} >> /tmp/.wheel-install-2.txt - diff /tmp/.wheel-install.txt /tmp/.wheel-install-2.txt - exit $? - - - name: Install in confined environment [editable] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_develop - run: | - python -m venv /tmp/setup_develop - source /tmp/setup_develop/bin/activate - pip install --upgrade pip wheel - pip install -e . - INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")') - echo "INSTALLED: \"${INSTALLED_VERSION}\"" - test "${INSTALLED_VERSION}" = "${THISVERSION}" - - - name: Re-install in confined environment [editable] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_develop + - name: Re-install run: | - source /tmp/setup_develop/bin/activate - pip install -e . - find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-develop.txt - - - name: Re-install in confined environment [editable - missing template] - env: - TEMPLATEFLOW_HOME: /tmp/home/setup_develop + pip install $TARGET --force-reinstall + find ${TEMPLATEFLOW_HOME} >> /tmp/.install.txt + - name: Re-install [missing template] run: | rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym - source /tmp/setup_develop/bin/activate - pip install -e . + pip install $TARGET --force-reinstall python -c "import templateflow; templateflow.update(overwrite=False)" - find ${TEMPLATEFLOW_HOME} >> /tmp/.setup-develop-2.txt - diff /tmp/.setup-develop.txt /tmp/.setup-develop-2.txt + find ${TEMPLATEFLOW_HOME} >> /tmp/.install-2.txt + diff /tmp/.install.txt /tmp/.install-2.txt exit $? From 52306423f8b490a035150901d8c033e2a79d1006 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 10:13:08 -0500 Subject: [PATCH 08/10] CI: Check conda environment even if installed --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a4eb7f02..7a5354d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,8 +150,8 @@ jobs: if ! [ -x "$(command -v conda)" ]; then curl -sSLO https://repo.anaconda.com/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh bash Miniconda3-py39_4.11.0-Linux-x86_64.sh -b -p $HOME/.conda - $HOME/.conda/bin/conda env update -f docs/environment.yml --prune fi + $HOME/.conda/bin/conda env update -f docs/environment.yml --prune - save_cache: key: env-v7-{{ .Branch }} From 1efb1c9e472f0acce1fa5130bd5b09773d327d06 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 1 Feb 2023 12:05:27 -0500 Subject: [PATCH 09/10] CI: Test wheel for 3.7-3.11, test other methods with 3.9 --- .github/workflows/pythonpackage.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index d9168dc3..097707f4 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -62,8 +62,12 @@ jobs: needs: build strategy: matrix: - python-version: [3.7, 3.8, 3.9] - mode: ['repo', 'sdist', 'wheel', 'editable'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + mode: ['wheel'] + include: + - {python-version: '3.9', mode: 'repo'} + - {python-version: '3.9', mode: 'sdist'} + - {python-version: '3.9', mode: 'editable'} env: TEMPLATEFLOW_HOME: /tmp/home From 91c600c619e18bb635a32eaeb71d42bfd7a5ca74 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 2 Feb 2023 14:17:34 -0500 Subject: [PATCH 10/10] DOC: Update CHANGES.rst --- CHANGES.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 64e4d3b1..b3c7f57e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,15 @@ +23.0.0 (February 2, 2023) +========================= +Minor release including additional API features and an updated skeleton. + +* FIX: Preempt ``BIDSLayout`` from indexing dot-folders (#99) +* ENH: Make sure existing ``layout.get_*`` are not bubbled in (#102) +* ENH: Allow access to PyBIDS' magic ``get_*`` (#101) +* ENH: Add an ``api.ls()`` function to list (without getting) files (#97) +* MAINT: Discontinue legacy docker runners of CircleCI (#104) +* MAINT: Rotate CircleCI secrets and setup up org-level context (#103) +* MAINT: Fix docs build environment in CircleCI (#96) + 0.8.1 (May 7, 2022) =================== Patch release updating the S3 skeleton to include the fixed version of ``tpl-MouseIn``.