Skip to content

Commit 63315d6

Browse files
authored
Merge pull request #36 from templateflow/maint/drop-python-3.5
MAINT: Drop Python 3.5
2 parents c337d13 + 8f774c0 commit 63315d6

4 files changed

Lines changed: 57 additions & 58 deletions

File tree

.circleci/config.yml

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ docs_deploy: &docs
2424
version: 2
2525
jobs:
2626
tests:
27-
machine:
28-
image: circleci/classic:201711-01
27+
docker:
28+
- image: circleci/python:3.7.6
2929
working_directory: /tmp/tests
3030
steps:
3131
- checkout:
3232
path: /tmp/src/templateflow
3333

3434
- restore_cache:
3535
keys:
36-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
37-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
38-
- deps-v6-
36+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
37+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
38+
- deps-v8-
3939

4040
- run:
4141
name: Get TemplateFlow Zip package
@@ -49,8 +49,8 @@ jobs:
4949
- run:
5050
name: Prepare environment
5151
command: |
52-
pyenv global 3.5.2
53-
virtualenv venv
52+
python -m venv /tmp/venv
53+
source /tmp/venv/bin/activate
5454
pip install -U pip
5555
pip install -r /tmp/src/templateflow/requirements.txt
5656
pip install "datalad ~= 0.11.8"
@@ -72,15 +72,16 @@ jobs:
7272
git config --global user.email "email@domain.com"
7373
7474
- save_cache:
75-
key: deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
75+
key: deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
7676
paths:
77-
- "/opt/circleci/.pyenv/versions/3.5.2"
7877
- "/tmp/data/templateflow"
7978
- "/tmp/cache"
79+
- "/tmp/venv"
8080

8181
- run:
8282
name: Update TemplateFlow skeleton
8383
command: |
84+
source /tmp/venv/bin/activate
8485
datalad install -r -s https://github.com/templateflow/templateflow $HOME/.cache/templateflow
8586
cd $HOME/.cache/templateflow/
8687
find . -type d -not -path "*/\.*" -exec mkdir -p /tmp/skel/{} \;
@@ -97,42 +98,37 @@ jobs:
9798
- run:
9899
name: Run tests (w/ DataLad)
99100
command: |
100-
pyenv global 3.5.2
101-
virtualenv venv
101+
source /tmp/venv/bin/activate
102102
export TEMPLATEFLOW_USE_DATALAD=on
103103
pytest --junit-xml=/tmp/tests/datalad.xml --cov templateflow --cov-report xml:/tmp/cov_api_dl.xml \
104104
--doctest-modules /tmp/src/templateflow/templateflow/api.py
105105
106106
- run:
107107
name: Submit api test coverage
108108
command: |
109+
source /tmp/venv/bin/activate
109110
codecov --file /tmp/cov_api_dl.xml --root /tmp/src/templateflow \
110111
--flags api,datalad -e CIRCLE_JOB
111112
112-
113113
- run:
114114
name: Run tests (pre-cached full TemplateFlow / no downloads)
115-
environment:
116-
TEMPLATEFLOW_USE_DATALAD: 0
117-
TEMPLATEFLOW_HOME: "/tmp/data/templateflow"
118115
command: |
119-
pyenv global 3.5.2
120-
virtualenv venv
116+
source /tmp/venv/bin/activate
121117
export TEMPLATEFLOW_HOME="/tmp/data/templateflow"
122118
pytest --junit-xml=/tmp/tests/wodatalad.xml --cov templateflow --cov-report xml:/tmp/cov_api_cached.xml \
123119
--doctest-modules /tmp/src/templateflow/templateflow/api.py
124120
125121
- run:
126122
name: Submit api test coverage
127123
command: |
124+
source /tmp/venv/bin/activate
128125
codecov --file /tmp/cov_api_cached.xml --root /tmp/src/templateflow \
129126
--flags api,cached -e CIRCLE_JOB
130127
131128
- run:
132129
name: Run tests (pulling from S3)
133130
command: |
134-
pyenv global 3.5.2
135-
virtualenv venv
131+
source /tmp/venv/bin/activate
136132
export TEMPLATEFLOW_USE_DATALAD=off
137133
export TEMPLATEFLOW_HOME=$HOME/templateflow-s3
138134
pytest --junit-xml=/tmp/tests/s3.xml --cov templateflow --cov-report xml:/tmp/cov_api_s3.xml \
@@ -141,14 +137,14 @@ jobs:
141137
- run:
142138
name: Submit api test coverage
143139
command: |
140+
source /tmp/venv/bin/activate
144141
codecov --file /tmp/cov_api_s3.xml --root /tmp/src/templateflow \
145142
--flags api,s3 -e CIRCLE_JOB
146143
147144
- run:
148145
name: Run tests (w/ DataLad, bypassed via S3)
149146
command: |
150-
pyenv global 3.5.2
151-
virtualenv venv
147+
source /tmp/venv/bin/activate
152148
export TEMPLATEFLOW_USE_DATALAD=off
153149
export TEMPLATEFLOW_HOME=$HOME/templateflow-clean
154150
datalad install -r -s https://github.com/templateflow/templateflow $TEMPLATEFLOW_HOME
@@ -158,20 +154,21 @@ jobs:
158154
- run:
159155
name: Submit api test coverage
160156
command: |
157+
source /tmp/venv/bin/activate
161158
codecov --file /tmp/cov_api_dl_s3.xml --root /tmp/src/templateflow \
162159
--flags api,dls3 -e CIRCLE_JOB
163160
164161
- run:
165162
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
166163
command: |
167-
pyenv global 3.5.2
168-
virtualenv venv
164+
source /tmp/venv/bin/activate
169165
pytest --junit-xml=/tmp/tests/conftests.xml --cov templateflow --cov-report xml:/tmp/cov_config.xml \
170166
/tmp/src/templateflow/templateflow/conf/tests/test_conf.py
171167
172168
- run:
173169
name: Submit config test coverage
174170
command: |
171+
source /tmp/venv/bin/activate
175172
codecov --file /tmp/cov_config.xml --root /tmp/src/templateflow \
176173
--flags config -e CIRCLE_JOB
177174
@@ -181,8 +178,7 @@ jobs:
181178
- run:
182179
name: Test packaging
183180
command: |
184-
pyenv global 3.5.2
185-
virtualenv venv
181+
source /tmp/venv/bin/activate
186182
cd /tmp/src/templateflow
187183
python setup.py sdist
188184
twine check dist/*
@@ -257,9 +253,9 @@ jobs:
257253

258254
- restore_cache:
259255
keys:
260-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
261-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
262-
- deps-v6-
256+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
257+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
258+
- deps-v8-
263259

264260
- add_ssh_keys:
265261
fingerprints:
@@ -300,8 +296,8 @@ jobs:
300296
git push origin HEAD:master
301297
302298
deploy_pypi:
303-
machine:
304-
image: circleci/classic:201711-01
299+
docker:
300+
- image: circleci/python:3.7.6
305301
working_directory: /tmp/src/templateflow
306302
steps:
307303
- attach_workspace:
@@ -312,15 +308,14 @@ jobs:
312308

313309
- restore_cache:
314310
keys:
315-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
316-
- deps-v6-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
317-
- deps-v6-
311+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
312+
- deps-v8-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-
313+
- deps-v8-
318314

319315
- run:
320316
name: Deploy to PyPi
321317
command: |
322-
pyenv global 3.5.2
323-
virtualenv venv
318+
source /tmp/venv/bin/activate
324319
pip install "setuptools>=27.0" twine
325320
python setup.py sdist
326321
twine check dist/*

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ cache:
88
- $HOME/.cache/pip
99

1010
python:
11-
- 3.5
1211
- 3.6
1312
- 3.7
13+
- 3.8
1414

1515
env:
1616
global:
@@ -31,16 +31,16 @@ matrix:
3131
- python: 3.7
3232
env: CHECK_TYPE="style"
3333
allow_failures:
34-
- python: 3.5
35-
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
3634
- python: 3.6
3735
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
3836
- python: 3.7
3937
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
38+
- python: 3.8
39+
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
4040

4141
before_install:
4242
- python -m pip install --upgrade $INSTALL_DEPENDS
43-
- pip install "flake8<3.0" flake8-putty
43+
- pip install -U flake8
4444

4545
install:
4646
- |
@@ -59,7 +59,7 @@ install:
5959
fi
6060
- |
6161
if [ "$CHECK_TYPE" == "style" ]; then
62-
travis_retry pip install "flake8<3.0" flake8-putty
62+
travis_retry pip install -U flake8
6363
fi
6464
6565
script:

setup.cfg

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ classifiers =
1313
Intended Audience :: Science/Research
1414
Topic :: Scientific/Engineering :: Image Recognition
1515
License :: OSI Approved :: Apache Software License
16-
Programming Language :: Python :: 3.5
1716
Programming Language :: Python :: 3.6
1817
Programming Language :: Python :: 3.7
18+
Programming Language :: Python :: 3.8
1919

2020
[options]
21-
python_requires = >= 3.5
21+
python_requires = >= 3.6
2222
install_requires =
2323
pybids >= 0.9.2
2424
requests
@@ -76,3 +76,23 @@ versionfile_source = templateflow/_version.py
7676
versionfile_build = templateflow/_version.py
7777
tag_prefix =
7878
parentdir_prefix =
79+
80+
[flake8]
81+
max-line-length = 99
82+
doctests = False
83+
exclude=*build/
84+
ignore =
85+
W503
86+
87+
[tool:pytest]
88+
norecursedirs = .git
89+
addopts = -svx
90+
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
91+
env =
92+
PYTHONHASHSEED=0
93+
filterwarnings =
94+
ignore::DeprecationWarning
95+
96+
[coverage:run]
97+
branch = True
98+

tox.ini

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)