Skip to content

Commit b8a4a89

Browse files
authored
Merge pull request #10 from poldracklab/rel/0.0.1
REL: 0.0.1
2 parents a02a183 + d925c6b commit b8a4a89

File tree

6 files changed

+141
-27
lines changed

6 files changed

+141
-27
lines changed

.circleci/config.yml

Lines changed: 104 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,125 @@ jobs:
33
build:
44
docker:
55
- image: docker:18.01.0-ce-git
6-
working_directory: /home/circleci/fitlins
6+
working_directory: /tmp/src/fitlins
77
steps:
8-
- checkout:
9-
path: /home/circleci/fitlins
8+
- run:
9+
name: Install parallel gzip
10+
command: |
11+
apk add --no-cache pigz
12+
- checkout
1013
- setup_remote_docker
1114
- run:
1215
name: Build image
1316
no_output_timeout: 30m
1417
command: |
1518
docker build \
16-
--tag fitlins \
19+
--tag poldracklab/fitlins:latest \
1720
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
1821
--build-arg VCS_REF="$(git rev-parse --short HEAD)" \
19-
--build-arg VERSION="${CIRCLE_TAG}" /home/circleci/fitlins
22+
--build-arg VERSION="${CIRCLE_TAG}" .
2023
- run:
2124
name: Verify executable can be run
22-
command: docker run --rm -it fitlins --help
25+
command: docker run --rm -it poldracklab/fitlins:latest --help
26+
- run:
27+
name: Docker save
28+
no_output_timeout: 40m
29+
command: |
30+
mkdir -p /tmp/cache
31+
docker save poldracklab/fitlins:latest \
32+
| pigz -8 -p 3 > /tmp/cache/docker.tar.gz
33+
- persist_to_workspace:
34+
root: /tmp
35+
paths:
36+
- cache/docker.tar.gz
37+
- src/fitlins
2338

39+
deploy_test:
40+
machine:
41+
image: circleci/classic:201711-01
42+
working_directory: /tmp/src/fitlins
43+
steps:
44+
- attach_workspace:
45+
at: /tmp
46+
- run:
47+
name: Load Docker image layer cache
48+
no_output_timeout: 30m
49+
command: |
50+
docker info
51+
set +o pipefail
52+
if [ -f /tmp/cache/docker.tar.gz ]; then
53+
sudo apt update && sudo apt -y install pigz
54+
pigz -d --stdout /tmp/cache/docker.tar.gz | docker load
55+
docker images
56+
fi
57+
- run:
58+
name: Deploy to Docker Hub
59+
no_output_timeout: 40m
60+
command: |
61+
if [[ -n "$DOCKER_PASS" ]]; then
62+
docker login -u $DOCKER_USER -p $DOCKER_PASS
63+
fi
64+
- run:
65+
name: Deploy to PyPi
66+
command: |
67+
pip install "setuptools>=27.0" twine
68+
echo "${CIRCLE_TAG}" > fitlins/VERSION
69+
python setup.py sdist
70+
71+
deploy:
72+
machine:
73+
image: circleci/classic:201711-01
74+
working_directory: /tmp/src/fitlins
75+
steps:
76+
- attach_workspace:
77+
at: /tmp
78+
- run:
79+
name: Load Docker image layer cache
80+
no_output_timeout: 30m
81+
command: |
82+
docker info
83+
set +o pipefail
84+
if [ -f /tmp/cache/docker.tar.gz ]; then
85+
sudo apt update && sudo apt -y install pigz
86+
pigz -d --stdout /tmp/cache/docker.tar.gz | docker load
87+
docker images
88+
fi
89+
- run:
90+
name: Deploy to Docker Hub
91+
no_output_timeout: 40m
92+
command: |
93+
if [[ -n "$DOCKER_PASS" ]]; then
94+
docker login -u $DOCKER_USER -p $DOCKER_PASS
95+
docker push poldracklab/fitlins:latest
96+
docker tag poldracklab/fitlins poldracklab/fitlins:$CIRCLE_TAG
97+
docker push poldracklab/fitlins:$CIRCLE_TAG
98+
fi
99+
- run:
100+
name: Deploy to PyPi
101+
command: |
102+
pip install "setuptools>=27.0" twine
103+
echo "${CIRCLE_TAG}" > fitlins/VERSION
104+
python setup.py sdist
105+
twine upload dist/*
24106
25107
workflows:
26108
version: 2
27109
fitlins_tests:
28110
jobs:
29111
- build
112+
- deploy_test:
113+
requires:
114+
- build
115+
filters:
116+
branches:
117+
only: /rel\/[\d\.]+/
118+
tags:
119+
ignore: /.*/
120+
- deploy:
121+
requires:
122+
- build
123+
filters:
124+
branches:
125+
ignore: /.*/
126+
tags:
127+
only: /.*/

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
./work*
2+
./out*
3+
data
4+
.git
5+
.gitignore
6+
*.rst
7+
*.md
8+
*.egg-info/
9+
.circleci/

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ RUN conda install -y mkl=2018.0.1 mkl-service git=2.9.3; sync &&\
77
scikit-learn=0.19.1 \
88
matplotlib=2.1.2 \
99
seaborn=0.8.1 \
10-
pandas=0.22.0 \
11-
libxml2=2.9.7 \
12-
libxslt=1.1.29\
13-
traits=4.6.0; sync && \
10+
pandas=0.22.0; sync && \
1411
chmod +x /opt/conda/bin/*; sync && \
1512
conda clean --all -y; sync && \
1613
conda clean -tipsy && sync

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Similarly the outputs (or derivatives) are subject to change, as experience
6161
and user feedback prompt.
6262
The command-line interface outlined above should be fairly stable, however.
6363

64-
.. _"BIDS Model": https://docs.google.com/document/d/1bq5eNDHTb6Nkx3WUiOBgKvLNnaa5OMcGtD0AZ9yms2M/
65-
.. _"BIDS Derivatives": https://docs.google.com/document/d/1Wwc4A6Mow4ZPPszDIWfCUCRNstn7d_zzaWPcfcHmgI4/
64+
.. _`BIDS Model`: https://docs.google.com/document/d/1bq5eNDHTb6Nkx3WUiOBgKvLNnaa5OMcGtD0AZ9yms2M/
65+
.. _`BIDS Derivatives`: https://docs.google.com/document/d/1Wwc4A6Mow4ZPPszDIWfCUCRNstn7d_zzaWPcfcHmgI4/
6666
.. _BIDS-Apps: http://bids-apps.neuroimaging.io
6767
.. _FMRIPREP: https://fmriprep.readthedocs.io

fitlins/info.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,54 @@
55
Base module variables
66
"""
77

8-
__version__ = '0.0.1-dev'
8+
__version__ = '0.0.1'
99
__author__ = 'The CRN developers'
10-
__copyright__ = 'Copyright 2017, Center for Reproducible Neuroscience, Stanford University'
11-
__credits__ = ['Christopher J. Markiewicz', 'Chris Gorgolewski', 'Russell A. Poldrack']
10+
__copyright__ = ('Copyright 2018, Center for Reproducible Neuroscience, '
11+
'Stanford University')
12+
__credits__ = ['Christopher J. Markiewicz', 'Chris Gorgolewski',
13+
'Russell A. Poldrack']
1214
__license__ = '3-clause BSD'
1315
__maintainer__ = 'Christopher J. Markiewicz'
1416
__email__ = '[email protected]'
1517
__status__ = 'Prototype'
1618
__url__ = 'https://github.com/poldracklab/fitlins'
1719
__packagename__ = 'fitlins'
18-
__description__ = ''
20+
__description__ = 'Fit Linear Models to fMRI Data'
1921
__longdesc__ = ''
2022

2123
DOWNLOAD_URL = (
22-
'https://github.com/effigies/{name}/archive/{ver}.tar.gz'.format(
24+
'https://github.com/poldracklab/{name}/archive/{ver}.tar.gz'.format(
2325
name=__packagename__, ver=__version__))
2426

2527

2628
SETUP_REQUIRES = [
27-
'setuptools>=18.0',
29+
'setuptools>=27.0',
2830
]
2931

3032
REQUIRES = [
31-
'nistats',
33+
'nibabel>=2.0',
34+
'seaborn>=0.7.1',
35+
'numpy>=1.11',
36+
'nilearn>=0.4.0',
37+
'pandas>=0.19',
38+
'nistats>=0.0.1a',
3239
'pybids>=0.3',
33-
'niworkflows>=0.1.8',
40+
'jinja2',
3441
]
3542

3643
LINKS_REQUIRES = [
44+
'git+https://github.com/grabbles/grabbit.git@'
45+
'f317224f90f572ec35899a43f19cb82b870ff772#egg=grabbit-0.1.1-dev',
46+
'git+https://github.com/INCF/pybids.git@'
47+
'ea6cf9db042f25dfcae907bd535e9dcabcf2bd55#egg=pybids-0.4.3-dev',
48+
'git+https://github.com/effigies/nistats.git@'
49+
'd5b63e0ce1ea817bacd9117b9d729b3ca62c9352#egg=nistats-0.0.1b-dev',
3750
]
3851

3952
TESTS_REQUIRES = [
4053
]
4154

4255
EXTRA_REQUIRES = {
43-
'doc': ['sphinx>=1.5.3', 'pydotplus', 'pydot>=1.2.3', 'sphinx_rtd_theme', 'sphinx-argparse'],
4456
'tests': TESTS_REQUIRES,
4557
'duecredit': ['duecredit'],
4658
}

requirements.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
nibabel>2.0
2-
seaborn>0.7.1
3-
numpy>1.11
1+
nibabel>=2.0
2+
seaborn>=0.7.1
3+
numpy>=1.11
44
nilearn>=0.4.0
5-
pandas>0.19
6-
niworkflows>0.3
7-
PyYAML>3
5+
pandas>=0.19
86
git+https://github.com/grabbles/grabbit.git@f317224f90f572ec35899a43f19cb82b870ff772#egg=grabbit-0.1.1-dev
97
git+https://github.com/INCF/pybids.git@ea6cf9db042f25dfcae907bd535e9dcabcf2bd55#egg=pybids-0.4.3-dev
108
git+https://github.com/effigies/nistats.git@d5b63e0ce1ea817bacd9117b9d729b3ca62c9352#egg=nistats-0.0.1b-dev

0 commit comments

Comments
 (0)