Skip to content

Commit 2d49837

Browse files
authored
Merge pull request #798 from effigies/mnt/1.3.x/pip-compile
MNT: Create a requirements.txt to keep the LTS branch buildable
2 parents 3682ef7 + 55c6d89 commit 2d49837

File tree

5 files changed

+262
-31
lines changed

5 files changed

+262
-31
lines changed

.circleci/config.yml

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 2.1
22
orbs:
33
docker: circleci/[email protected]
4+
codecov: codecov/[email protected]
45

56
jobs:
67
build:
@@ -117,7 +118,6 @@ jobs:
117118

118119
- restore_cache:
119120
keys:
120-
- data-v3-{{ .Branch }}-{{ epoch }}
121121
- data-v3-{{ .Branch }}-
122122
- data-v3-maint/1.3.x-
123123
- data-v3-master-
@@ -222,9 +222,6 @@ jobs:
222222
steps:
223223
- attach_workspace:
224224
at: /tmp
225-
- run:
226-
name: Get codecov
227-
command: python -m pip install codecov
228225
- restore_cache:
229226
keys:
230227
- build-v1-{{ .Branch }}-{{ .Revision }}
@@ -254,7 +251,7 @@ jobs:
254251
255252
- restore_cache:
256253
keys:
257-
- data-v3-{{ .Branch }}-{{ epoch }}
254+
- data-v3-{{ .Branch }}-
258255

259256
- run:
260257
name: Run unit tests
@@ -274,12 +271,9 @@ jobs:
274271
--ignore=niworkflows/func/tests/ \
275272
niworkflows/
276273
277-
- run:
278-
name: Submit unit test coverage
279-
command: |
280-
cd /tmp/src/niworkflows
281-
python -m codecov --file /tmp/tests/summaries/unittests.xml \
282-
--flags unittests -e CIRCLE_JOB
274+
- codecov/upload:
275+
file: /tmp/tests/summaries/unittests.xml
276+
flags: unittests
283277

284278
- run:
285279
name: Run reportlet tests
@@ -294,12 +288,10 @@ jobs:
294288
pytest -n auto --junit-xml=/tmp/summaries/reportlets.xml \
295289
--cov niworkflows --cov-report xml:/tmp/summaries/reportlets.xml \
296290
niworkflows/tests/
297-
- run:
298-
name: Submit reportlet test coverage
299-
command: |
300-
cd /tmp/src/niworkflows
301-
python -m codecov --file /tmp/tests/summaries/reportlets.xml \
302-
--flags reportlettests -e CIRCLE_JOB
291+
292+
- codecov/upload:
293+
file: /tmp/tests/summaries/reportlets.xml
294+
flags: reportlettests
303295

304296
- run:
305297
name: Clean up tests directory
@@ -339,7 +331,7 @@ jobs:
339331

340332
- restore_cache:
341333
keys:
342-
- build-v1-{{ .Branch }}-{{ epoch }}
334+
- build-v1-{{ .Branch }}-
343335
- run:
344336
name: Docker authentication
345337
command: |
@@ -367,7 +359,6 @@ jobs:
367359
docker tag localhost:5000/niworkflows niworkflows:latest
368360
- restore_cache:
369361
keys:
370-
- masks-workdir-v3-{{ .Branch }}-{{epoch}}
371362
- masks-workdir-v3-{{ .Branch }}-
372363
- masks-workdir-v3-maint/1.3.x-
373364
- masks-workdir-v3-master-
@@ -417,16 +408,10 @@ jobs:
417408
-e COVERAGE_FILE=/tmp/masks/reports/.coverage \
418409
-v /tmp/masks/reports:/tmp/masks/reports \
419410
niworkflows:latest coverage xml -o coverage.xml
420-
- run:
421-
name: Get codecov
422-
command: python -m pip install codecov
423-
- run:
424-
name: Submit masks test coverage
425-
working_directory: /tmp/src/niworkflows
426-
command: |
427-
cp /tmp/masks/reports/coverage.xml .
428-
sed -i "s+/src/niworkflows+/tmp/src/niworkflows+g" coverage.xml
429-
python -m codecov --file coverage.xml --flags masks -e CIRCLE_JOB
411+
412+
- codecov/upload:
413+
file: /tmp/tests/summaries/unittests.xml
414+
flags: masks
430415

431416
test_package:
432417
docker:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ COPY . /src/niworkflows/
151151
ARG VERSION
152152
RUN echo "${VERSION}" > /src/niworkflows/niworkflows/VERSION && \
153153
echo "include niworkflows/VERSION" >> /src/niworkflows/MANIFEST.in && \
154-
pip install --no-cache-dir -e .[all] && \
154+
pip install --no-cache-dir -r requirements.txt -e .[all] && \
155155
rm -rf $HOME/.cache/pip
156156

157157
COPY docker/files/nipype.cfg /home/niworkflows/.nipype/nipype.cfg

niworkflows/interfaces/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def less_breakable(a_string):
956956
drop_columns = drop_columns or []
957957
additional_metadata = additional_metadata or {}
958958
try:
959-
tsv_data = pd.read_csv(in_tsv, "\t")
959+
tsv_data = pd.read_csv(in_tsv, sep="\t")
960960
except pd.errors.EmptyDataError:
961961
tsv_data = pd.DataFrame()
962962
for k, v in additional_metadata.items():

requirements.in

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Hints to pip-compile that combine the requirements in setup.cfg
2+
# and the environment pinned in fMRIPrep 20.2.x's docker/files/environment.yml
3+
#
4+
# Some dependencies need old versions of setuptools to resolve. The following environment
5+
# currently builds:
6+
#
7+
# python==3.7 pip-tools setuptools<58
8+
#
9+
attrs
10+
jinja2
11+
h5py==3.5
12+
matplotlib==2.2.2
13+
nibabel >= 3.0.1
14+
nilearn == 0.7
15+
nipype >= 1.5.1, != 1.7.0
16+
nitransforms >= 20.0.0rc3,<20.2
17+
numpy==1.19
18+
packaging
19+
pandas==0.24
20+
pybids >= 0.11.1, < 0.15
21+
PyYAML
22+
scikit-image
23+
scikit-learn==0.21
24+
scipy==1.5
25+
seaborn==0.11.2
26+
svgutils == 0.3.1
27+
templateflow >= 0.6,<23
28+
traits==4.6.0
29+
transforms3d

requirements.txt

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.7
3+
# by the following command:
4+
#
5+
# pip-compile --resolver=backtracking
6+
#
7+
astor==0.8.1
8+
# via formulaic
9+
attrs==22.2.0
10+
# via -r requirements.in
11+
bids-validator==1.11.0
12+
# via pybids
13+
cached-property==1.5.2
14+
# via h5py
15+
certifi==2022.12.7
16+
# via requests
17+
charset-normalizer==3.1.0
18+
# via requests
19+
ci-info==0.3.0
20+
# via etelemetry
21+
click==8.1.3
22+
# via
23+
# nipype
24+
# pybids
25+
cycler==0.11.0
26+
# via matplotlib
27+
docopt==0.6.2
28+
# via num2words
29+
etelemetry==0.3.0
30+
# via nipype
31+
filelock==3.11.0
32+
# via nipype
33+
formulaic==0.2.4
34+
# via pybids
35+
h5py==3.5.0
36+
# via
37+
# -r requirements.in
38+
# nitransforms
39+
idna==3.4
40+
# via requests
41+
imageio==2.27.0
42+
# via scikit-image
43+
importlib-metadata==4.13.0
44+
# via
45+
# click
46+
# rdflib
47+
interface-meta==1.3.0
48+
# via formulaic
49+
isodate==0.6.1
50+
# via rdflib
51+
jinja2==3.1.2
52+
# via -r requirements.in
53+
joblib==1.2.0
54+
# via
55+
# nilearn
56+
# scikit-learn
57+
kiwisolver==1.4.4
58+
# via matplotlib
59+
looseversion==1.1.2
60+
# via nipype
61+
lxml==4.9.2
62+
# via
63+
# prov
64+
# svgutils
65+
markupsafe==2.1.2
66+
# via jinja2
67+
matplotlib==2.2.2
68+
# via
69+
# -r requirements.in
70+
# seaborn
71+
networkx==2.6.3
72+
# via
73+
# nipype
74+
# prov
75+
# scikit-image
76+
nibabel==4.0.2
77+
# via
78+
# -r requirements.in
79+
# nilearn
80+
# nipype
81+
# nitransforms
82+
# pybids
83+
nilearn==0.7.0
84+
# via -r requirements.in
85+
nipype==1.8.6
86+
# via -r requirements.in
87+
nitransforms==20.0.0rc5
88+
# via -r requirements.in
89+
num2words==0.5.12
90+
# via pybids
91+
numpy==1.19.0
92+
# via
93+
# -r requirements.in
94+
# formulaic
95+
# h5py
96+
# imageio
97+
# matplotlib
98+
# nibabel
99+
# nilearn
100+
# nipype
101+
# nitransforms
102+
# pandas
103+
# pybids
104+
# pywavelets
105+
# scikit-image
106+
# scikit-learn
107+
# scipy
108+
# seaborn
109+
# tifffile
110+
packaging==23.1
111+
# via
112+
# -r requirements.in
113+
# nibabel
114+
# nipype
115+
# scikit-image
116+
pandas==0.24.0
117+
# via
118+
# -r requirements.in
119+
# formulaic
120+
# nilearn
121+
# pybids
122+
# seaborn
123+
pillow==9.5.0
124+
# via
125+
# imageio
126+
# scikit-image
127+
prov==2.0.0
128+
# via nipype
129+
pybids==0.14.1
130+
# via
131+
# -r requirements.in
132+
# templateflow
133+
pydot==1.4.2
134+
# via nipype
135+
pyparsing==3.0.9
136+
# via
137+
# matplotlib
138+
# pydot
139+
# rdflib
140+
python-dateutil==2.8.2
141+
# via
142+
# matplotlib
143+
# nipype
144+
# pandas
145+
# prov
146+
pytz==2023.3
147+
# via
148+
# matplotlib
149+
# pandas
150+
pywavelets==1.3.0
151+
# via scikit-image
152+
pyyaml==6.0
153+
# via -r requirements.in
154+
rdflib==6.3.2
155+
# via
156+
# nipype
157+
# prov
158+
requests==2.28.2
159+
# via
160+
# etelemetry
161+
# nilearn
162+
# templateflow
163+
scikit-image==0.19.3
164+
# via -r requirements.in
165+
scikit-learn==0.21.0
166+
# via
167+
# -r requirements.in
168+
# nilearn
169+
scipy==1.5.0
170+
# via
171+
# -r requirements.in
172+
# formulaic
173+
# nilearn
174+
# nipype
175+
# nitransforms
176+
# pybids
177+
# scikit-image
178+
# scikit-learn
179+
# seaborn
180+
seaborn==0.11.2
181+
# via -r requirements.in
182+
simplejson==3.19.1
183+
# via nipype
184+
six==1.16.0
185+
# via
186+
# isodate
187+
# matplotlib
188+
# python-dateutil
189+
sqlalchemy==1.3.24
190+
# via pybids
191+
svgutils==0.3.1
192+
# via -r requirements.in
193+
templateflow==0.8.1
194+
# via -r requirements.in
195+
tifffile==2021.11.2
196+
# via scikit-image
197+
tqdm==4.65.0
198+
# via templateflow
199+
traits==4.6.0
200+
# via
201+
# -r requirements.in
202+
# nipype
203+
transforms3d==0.4.1
204+
# via -r requirements.in
205+
typing-extensions==4.5.0
206+
# via
207+
# importlib-metadata
208+
# kiwisolver
209+
urllib3==1.26.15
210+
# via requests
211+
wrapt==1.15.0
212+
# via formulaic
213+
zipp==3.15.0
214+
# via importlib-metadata
215+
216+
# The following packages are considered to be unsafe in a requirements file:
217+
# setuptools

0 commit comments

Comments
 (0)