Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ jobs:
name: Deploy to PyPi
command: |
source /tmp/venv/bin/activate
pip install "setuptools>=42.0" "setuptools_scm[toml] >= 3.4" twine
python setup.py sdist
pip install "setuptools>=42.0" "setuptools_scm[toml] >= 3.4" wheel twine
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*

Expand Down
53 changes: 39 additions & 14 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
pip: ["pip", "pip~=10.0.1"]

steps:
- uses: actions/checkout@v2
Expand All @@ -30,15 +31,25 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1
with:
path: $HOME/.cache/pip
key: pip-cache-v1
restore-keys: |
pip-cache-

- name: Build in confined environment and interpolate version
run: |
python -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
setuptools_scm_git_archive "pip>=10.0.1" twine docutils
python -m pip install -U "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
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
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
TAG=${GITHUB_REF##*/}
Expand All @@ -47,14 +58,28 @@ jobs:
THISVERSION=${TAG:-$THISVERSION}
echo "Expected VERSION: \"${THISVERSION}\""
echo ::set-env name=THISVERSION::"${THISVERSION}"

- 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 ~= 42.0" "setuptools_scm[toml] >= 3.4" "${{ matrix.pip }}"
python -m 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
run: |
python -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
python -m pip install dist/templateflow*.tar.gz
python -m pip install -U "setuptools ~= 42.0" "${{ matrix.pip }}"
python -m 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}\""
Expand All @@ -65,15 +90,15 @@ jobs:
TEMPLATEFLOW_HOME: /tmp/home/sdist
run: |
source /tmp/install_sdist/bin/activate
python -m pip install dist/templateflow*.tar.gz
python -m pip install /tmp/package/templateflow*.tar.gz
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
python -m pip install dist/templateflow*.tar.gz
python -m pip install /tmp/package/templateflow*.tar.gz
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
Expand All @@ -85,8 +110,8 @@ jobs:
run: |
python -m venv /tmp/install_wheel
source /tmp/install_wheel/bin/activate
python -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
python -m pip install dist/templateflow*.whl
python -m pip install -U "setuptools ~= 42.0" "${{ matrix.pip }}"
python -m 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}"
Expand All @@ -96,15 +121,15 @@ jobs:
TEMPLATEFLOW_HOME: /tmp/home/wheel
run: |
source /tmp/install_wheel/bin/activate
python -m pip install dist/templateflow*.whl
python -m pip install /tmp/package/templateflow*.whl
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
python -m pip install dist/templateflow*.whl
python -m pip install /tmp/package/templateflow*.whl
# Wheels do not run post-install hooks:
test ! -d ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym
python -c "import templateflow; templateflow.update(overwrite=False)"
Expand All @@ -118,8 +143,8 @@ jobs:
run: |
python -m venv /tmp/setup_install
source /tmp/setup_install/bin/activate
python -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
setuptools_scm_git_archive "pip>=10.0.1"
python -m pip install -U "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
setuptools_scm_git_archive "${{ matrix.pip }}"
python setup.py install
INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")')
echo "INSTALLED: \"${INSTALLED_VERSION}\""
Expand Down Expand Up @@ -150,8 +175,8 @@ jobs:
run: |
python -m venv /tmp/setup_develop
source /tmp/setup_develop/bin/activate
python -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
setuptools_scm_git_archive "pip>=10.0.1"
python -m pip install -U "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
setuptools_scm_git_archive "${{ matrix.pip }}"
python setup.py develop
INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")')
echo "INSTALLED: \"${INSTALLED_VERSION}\""
Expand Down
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

13 changes: 5 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# data
include templateflow/conf/config.json
include templateflow/conf/templateflow-skel.zip
include templateflow/conf/templateflow-skel.md5
recursive-exclude templateflow/tests *
recursive-exclude templateflow/conf/tests *
recursive-exclude docs/ *

recursive-exclude .circleci/ *
recursive-exclude .github/ *
recursive-exclude docker/ *
recursive-exclude docs/ *
recursive-exclude joss/ *
exclude .codecov.yml .coveragerc .gitignore .gitattributes .pep8speaks.yml .travis.yml .zenodo.json codecov.yml Dockerfile update_changes.sh

exclude .gitignore .gitattributes .git_archival.txt .travis.yml .zenodo.json codecov.yml update_changes.sh
11 changes: 9 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[metadata]
author = Oscar Esteban
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
Expand Down Expand Up @@ -36,11 +35,19 @@ test_requires =
pytest-cov == 2.5.1
coverage
packages = find:
include_package_data = True
zip_safe = true

[options.package_data]
templateflow =
conf/config.json
conf/templateflow-skel.zip
conf/templateflow-skel.md5

[options.packages.find]
exclude =
*.tests
tests.*
*.tests.*

[options.extras_require]
citations =
Expand Down