Skip to content

Commit

Permalink
Merge pull request #104 from poldracklab/fix/packaging-tests
Browse files Browse the repository at this point in the history
MAINT: Revise tests and Docker image dependencies
  • Loading branch information
oesteban authored May 15, 2021
2 parents c4d86eb + 0adceb8 commit 71ec933
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 85 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
name: Prepare a Python environment
command: |
pyenv local 3.7.0
python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
python3 -m pip install "setuptools >= 45.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
- run:
name: Build Docker image & push to registry
no_output_timeout: 60m
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
command: |
python3 -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python3 -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
python3 -m pip install "setuptools >= 45.0" wheel "setuptools_scm[toml] >= 3.4" \
"pip>=10.0.1" twine docutils
python setup.py sdist bdist_wheel
twine check dist/nitransforms*
Expand All @@ -168,7 +168,7 @@ jobs:
command: |
python3 -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python3 -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
python3 -m pip install "setuptools >= 45.0" "pip>=10.0.1"
THISVERSION=$( python3 setup.py --version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
Expand All @@ -182,7 +182,7 @@ jobs:
command: |
python3 -m venv /tmp/install_wheel
source /tmp/install_wheel/bin/activate
python3 -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
python3 -m pip install "setuptools >= 45.0" "pip>=10.0.1"
THISVERSION=$( python3 setup.py --version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
Expand Down
86 changes: 86 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
joss/
.github/
.circle/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/

# C extensions
*.so
*.c

# Distribution / packaging
.Python
env/
# build/ # commented due to some strangeness with Docker/circle setup
develop-eggs/
dist/
build/lib*
build/temp*
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
.pep8speaks.yml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/
build/

# PyBuilder
target/

#Ipython Notebook
.ipynb_checkpoints

# pycharm project settings
.idea

# Spyder project settings
.spyderproject
.spyproject

auth/
secrets.py
local_settings.py

*.swp
.vscode/
69 changes: 0 additions & 69 deletions .travis.yml

This file was deleted.

23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ ENV FSLDIR="/usr/share/fsl/5.0" \
AFNI_PLUGINPATH="/usr/lib/afni/plugins"
ENV PATH="/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH"

# Installing ANTs 2.2.0 (NeuroDocker build)
# Installing ANTs 2.3.3 (NeuroDocker build)
# Note: the URL says 2.3.4 but it is actually 2.3.3
ENV ANTSPATH=/usr/lib/ants
RUN mkdir -p $ANTSPATH && \
curl -sSL "https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz" \
curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \
| tar -xzC $ANTSPATH --strip-components 1
ENV PATH=$ANTSPATH:$PATH

Expand All @@ -106,14 +107,18 @@ ENV PATH="/usr/local/miniconda/bin:$PATH" \
PYTHONNOUSERSITE=1

# Installing precomputed python packages
RUN conda install -y python=3.7.1 \
pip=19.1 \
mkl=2018.0.3 \
RUN conda install -y -c anaconda -c conda-forge \
python=3.7 \
libxml2=2.9 \
libxslt=1.1 \
mkl \
mkl-service \
numpy=1.15.4 \
scipy=1.1.0 \
libxml2=2.9.8 \
libxslt=1.1.32 \
numpy=1.20 \
pip=21 \
scipy=1.6 \
setuptools \
setuptools_scm \
toml \
zlib; sync && \
chmod -R a+rX /usr/local/miniconda; sync && \
chmod +x /usr/local/miniconda/bin/*; sync && \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools ~= 42.0", "wheel", "setuptools_scm[toml] >= 3.4"]
requires = ["setuptools >= 42.0", "wheel", "setuptools_scm[toml] >= 3.4", "setuptools_scm_git_archive"]

[tool.setuptools_scm]
write_to = "nitransforms/_version.py"
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ classifiers =
Intended Audience :: Science/Research
Topic :: Scientific/Engineering :: Image Recognition
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
description = NiTransforms -- Neuroimaging spatial transforms in Python.
license = MIT License
long_description = file:README.md
Expand All @@ -20,7 +20,7 @@ project_urls =
url = https://github.com/poldracklab/nitransforms

[options]
python_requires = >= 3.6
python_requires = >= 3.7
install_requires =
numpy
scipy
Expand Down

0 comments on commit 71ec933

Please sign in to comment.