Skip to content

Commit

Permalink
Merge pull request #150 from poldracklab/rel/0.4.0
Browse files Browse the repository at this point in the history
REL: 0.4.0
  • Loading branch information
effigies authored May 10, 2019
2 parents 224db12 + ce2addf commit 6691058
Show file tree
Hide file tree
Showing 16 changed files with 201 additions and 139 deletions.
146 changes: 111 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
THISVERSION=$( python3 -c 'import fitlins; print(fitlins.__version__)' )
echo "Building version ${CIRCLE_TAG:-$THISVERSION}"
docker build \
--cache-from=poldracklab/fitlins \
--rm=false \
--tag poldracklab/fitlins:latest \
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--build-arg VCS_REF="$(git rev-parse --short HEAD)" \
Expand All @@ -33,7 +35,13 @@ jobs:
- run:
name: Check version
command: |
docker run --rm -it poldracklab/fitlins:latest --version
THISVERSION=$( python3 -c 'import fitlins; print(fitlins.__version__)' )
THISVERSION="${CIRCLE_TAG:-$THISVERSION}"
DOCKERVERSION=$(docker run --rm -it poldracklab/fitlins:latest --version \
| tail -n 1 | sed -e 's/.*fit/fit/' -e 's/[\r\n]//g')
echo "$THISVERSION"
echo "$DOCKERVERSION"
test "$DOCKERVERSION" = "fitlins v$THISVERSION"
- run:
name: Docker save
no_output_timeout: 40m
Expand All @@ -44,8 +52,11 @@ jobs:
- persist_to_workspace:
root: /tmp
paths:
- cache/docker.tar.gz
- src/fitlins
- save_cache:
key: docker-v0-{{ .Branch }}-{{ .Revision }}-{{ epoch }}
paths:
- /tmp/cache/docker.tar.gz

cache_test_data:
docker:
Expand Down Expand Up @@ -106,6 +117,9 @@ jobs:
steps:
- attach_workspace:
at: /tmp
- restore_cache:
keys:
- docker-v0-{{ .Branch }}-{{ .Revision }}
- restore_cache:
keys:
- ds003-v0-{{ .Branch }}-
Expand Down Expand Up @@ -161,36 +175,93 @@ jobs:
- store_artifacts:
path: /tmp/ds003

deploy_test:
machine:
image: circleci/classic:201711-01
test_packaging:
docker:
- image: python:latest
working_directory: /tmp/src/fitlins
steps:
- attach_workspace:
at: /tmp
- run:
name: Check Docker credentials
no_output_timeout: 40m
name: Check Python version and upgrade pip
command: |
if [[ -n "$DOCKER_PASS" ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
python --version
python -m pip install -U pip setuptools virtualenv twine
- checkout
- run:
name: Build and check Python packages
name: Build FitLins
command: |
pip install "setuptools>=27.0" twine
echo "${CIRCLE_TAG}" > fitlins/VERSION
virtualenv --python=python /tmp/venv/build
source /tmp/venv/build/bin/activate
pip install --upgrade "pip>=19.1" setuptools wheel
python setup.py sdist
pip wheel --no-deps -w dist/ .
twine check dist/*
- store_artifacts:
path: /tmp/src/fitlins/dist
- run:
name: Check sdist distribution
command: |
THISVERSION=$( python -c 'import fitlins; print(fitlins.__version__)' )
THISVERSION="${CIRCLE_TAG:-$THISVERSION}"
twine check dist/fitlins*.tar.gz
virtualenv --python=python /tmp/venv/sdist
source /tmp/venv/sdist/bin/activate
pip install --upgrade "pip>=19.1" setuptools wheel
pip install dist/fitlins*.tar.gz
which fitlins | grep sdist\\/bin
INSTALLED_VERSION=$(fitlins --version)
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "fitlins v$THISVERSION"
- run:
name: Check wheel distribution
command: |
THISVERSION=$( python -c 'import fitlins; print(fitlins.__version__)' )
THISVERSION="${CIRCLE_TAG:-$THISVERSION}"
twine check dist/fitlins*.tar.gz
virtualenv --python=python /tmp/venv/wheel
source /tmp/venv/wheel/bin/activate
pip install --upgrade "pip>=19.1" setuptools wheel
pip install dist/fitlins*.whl
which fitlins | grep wheel\\/bin
INSTALLED_VERSION=$(fitlins --version)
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "fitlins v$THISVERSION"
deploy_pypi:
docker:
- image: python:latest
working_directory: /tmp/src/fitlins
steps:
- run:
name: Check Python version and upgrade pip
command: |
python --version
python -m pip install -U pip setuptools virtualenv twine
- checkout
- run:
name: Build FitLins
command: |
virtualenv --python=python /tmp/venv/build
source /tmp/venv/build/bin/activate
pip install --upgrade "pip>=19.1" setuptools wheel
python setup.py sdist
pip wheel --no-deps -w dist/ .
- store_artifacts:
path: /tmp/src/fitlins/dist
- run:
name: Upload packages to PyPI
command: |
twine check dist/fitlins*
twine upload dist/fitlins*
deploy_master:
machine:
image: circleci/classic:201711-01
working_directory: /tmp/src/fitlins
steps:
- attach_workspace:
at: /tmp
- restore_cache:
keys:
- docker-v0-{{ .Branch }}-{{ .Revision }}
- run:
name: Load Docker image layer cache
no_output_timeout: 30m
Expand All @@ -211,13 +282,14 @@ jobs:
docker push poldracklab/fitlins:master
fi
deploy:
deploy_docker:
machine:
image: circleci/classic:201711-01
working_directory: /tmp/src/fitlins
steps:
- attach_workspace:
at: /tmp
- restore_cache:
keys:
- docker-v0-{{ .Branch }}-{{ .Revision }}
- run:
name: Load Docker image layer cache
no_output_timeout: 30m
Expand All @@ -238,15 +310,13 @@ jobs:
docker tag poldracklab/fitlins poldracklab/fitlins:$CIRCLE_TAG
docker push poldracklab/fitlins:$CIRCLE_TAG
fi
- run:
name: Deploy to PyPi
command: |
pip install "setuptools>=27.0" twine
echo "${CIRCLE_TAG}" > fitlins/VERSION
python setup.py sdist
pip wheel --no-deps -w dist/ .
twine check dist/*
twine upload dist/*
deployable:
docker:
- image: busybox:latest
steps:
- run: echo Deploying!


workflows:
version: 2
Expand Down Expand Up @@ -275,24 +345,30 @@ workflows:
filters:
tags:
only: /.*/
- test_packaging:
filters:
tags:
only: /.*/
- deploy_master:
requires:
- test_ds003
filters:
branches:
only: master
- deploy_test:
- deploy_docker:
requires:
- build
- test_ds003
- build_docs
filters:
branches:
only: /rel\/[\d\.]+/
tags:
ignore: /.*/
- deploy:
tags:
only: /.*/
- deploy_pypi:
requires:
- test_ds003
- build_docs
- test_packaging
filters:
branches:
ignore: /.*/
Expand Down
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fixes:
- "/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages::"
ignore:
- "fitlins/_version.py"
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ data
*.md
*.egg-info/
.circleci/
docs/
examples/
26 changes: 9 additions & 17 deletions .neurodocker.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@
"user",
"root"
],
[
"arg",
{
"VERSION": ""
}
],
[
"run",
"echo \"$VERSION\" > /src/fitlins/fitlins/VERSION"
],
[
"run",
"mkdir /work && chown -R neuro /src /work && chmod a+w /work"
Expand All @@ -82,21 +72,23 @@
"neuro"
],
[
"miniconda",
"arg",
{
"use_env": "neuro",
"pip_opts": "-r",
"pip_install": [
"/src/fitlins/requirements.txt"
]
"VERSION": ""
}
],
[
"run",
"echo \"$VERSION\" > /src/fitlins/VERSION"
],
[
"miniconda",
{
"use_env": "neuro",
"pip_opts": "-r",
"pip_install": [
"/src/fitlins[all,test]"
"/src/fitlins/requirements.txt",
"/src/fitlins[all]"
],
"activate": true
}
Expand Down
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
0.4.0 (May 10, 2019)
====================

This release produces effect, variance, statistic (t or F), Z-score, and p-value
maps at every level, and enables smoothing at higher levels if preferred.

Additionally, documentation has been added at https://fitlins.readthedocs.io and
versioning/packaging issues have been resolved.

* FIX: Do not install FitLins as editable in Docker (https://github.com/poldracklab/fitlins/pull/137)
* ENH: Save design matrix as TSV to output directory (https://github.com/poldracklab/fitlins/pull/143)
* ENH: Enable smoothing at any analysis level (https://github.com/poldracklab/fitlins/pull/135)
* ENH: Produce all available statistical maps from each analysis unit (https://github.com/poldracklab/fitlins/pull/131)
* ENH: Add version to non-release Docker images. (https://github.com/poldracklab/fitlins/pull/136)
* DOC: Flesh out documentation (https://github.com/poldracklab/fitlins/pull/147)
* DOC: Build API docs on RTD (https://github.com/poldracklab/fitlins/pull/146)
* DOC: Create Sphinx documentation with API autodocs (https://github.com/poldracklab/fitlins/pull/145)
* MAINT: Drop Python 3.5 support (https://github.com/poldracklab/fitlins/pull/140)
* CI: Run FitLins with coverage (https://github.com/poldracklab/fitlins/pull/144)
* CI: Test FitLins on OpenNeuro DS000003, preprocessed with fMRIPrep 1.3.2 (https://github.com/poldracklab/fitlins/pull/141)


0.3.0 (April 19, 2019)
======================

Expand Down
Loading

0 comments on commit 6691058

Please sign in to comment.