Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add test steps and explicit support for Python 3.9 #578

Merged
merged 5 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 36 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
paths:
- src/NiMARE
- restore_cache: # ensure this step occurs *before* installing dependencies
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run: # will overwrite NiMARE installation each time
name: Generate environment
command: |
Expand All @@ -32,7 +32,7 @@ jobs:
fi
python setup.py install --user
- save_cache: # environment cache tied to requirements
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
paths:
- "/opt/conda/envs/py36_env"

Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Run tests
command: |
Expand Down Expand Up @@ -135,6 +135,32 @@ jobs:
source activate py38_env
make unittest

test_py39:
working_directory: /tmp/src/NiMARE
docker:
- image: continuumio/miniconda3
steps:
- checkout
- persist_to_workspace:
root: /tmp
paths:
- src/NiMARE
- run: # will overwrite NiMARE installation each time
name: Generate environment
command: |
conda create -n py39_env python=3.9 -yq
source activate py39_env
pip install pip -U
pip install -e .[tests,peaks2maps-cpu]
python setup.py install --user
- run:
name: Run tests
command: |
apt-get update
apt-get install -yqq make
source activate py39_env
make unittest

test_performance_estimators:
working_directory: /tmp/src/NiMARE
docker:
Expand All @@ -143,7 +169,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Linting
command: |
Expand All @@ -166,7 +192,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Test reasonable output for combinations of estimators/kernels/correctors
no_output_timeout: 30m
Expand All @@ -190,7 +216,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Test reasonable output for combinations of estimators/kernels/correctors
no_output_timeout: 30m
Expand All @@ -215,7 +241,7 @@ jobs:
at: /tmp
- checkout
- restore_cache:
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Merge coverage files
command: |
Expand All @@ -238,7 +264,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Build documentation
command: |
Expand All @@ -258,7 +284,7 @@ jobs:
- attach_workspace: # get NiMARE
at: /tmp
- restore_cache: # load environment
key: deps9-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
key: deps10-{{ checksum "nimare/info.py" }}-{{ checksum "setup.py" }}
- run:
name: Linting
command: |
Expand All @@ -278,6 +304,7 @@ workflows:
- make_py36_env
- test_py37
- test_py38
- test_py39
- test_performance_estimators:
requires:
- make_py36_env
Expand Down
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
"affiliation": "Max Planck Institute for Human Cognitive and Brain Sciences",
"orcid": "0000-0003-0100-2297"
},
{
"name": "Peraza, Julio A.",
"affiliation": "Florida International University",
"orcid": "0000-0003-3816-5903"
},
{
"name": "Laird, Angela R.",
"affiliation": "Florida International University",
Expand Down
3 changes: 2 additions & 1 deletion nimare/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"pymare==0.0.2",
"scikit-learn==0.22",
"scipy==1.5", # 1.6 drops Python 3.6 support
]
],
}

# Enable a handle to install all extra dependencies at once
Expand All @@ -118,5 +118,6 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
]
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==40.8", "wheel"]
requires = ["setuptools==58.2.0", "wheel"]

[tool.black]
line-length = 99
Expand Down