-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into test-python
- Loading branch information
Showing
45 changed files
with
1,278 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,119 @@ | ||
# Python CircleCI 2.1 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.1/language-python/ for more details | ||
# | ||
version: 2.1 | ||
orbs: | ||
codecov: codecov/[email protected] | ||
jobs: | ||
|
||
test_py38: | ||
jobs: | ||
set_up_conda: | ||
machine: | ||
image: ubuntu-2004:202201-02 | ||
working_directory: /home/circleci/src/CuBIDS | ||
docker: | ||
- image: continuumio/miniconda3 | ||
steps: | ||
- checkout | ||
- checkout: | ||
path: /home/circleci/src/CuBIDS | ||
- run: | ||
name: Generate environment | ||
command: | | ||
conda create -n py38_env python=3.8 pip -yq | ||
conda install -c conda-forge -y datalad | ||
# Add nodejs and the validator | ||
conda install nodejs | ||
npm install -g yarn && \ | ||
npm install -g bids-validator | ||
name: install miniconda | ||
command: | | ||
export MINICONDA=/tmp/miniconda | ||
export PATH="$MINICONDA/bin:$PATH" | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh | ||
bash /tmp/miniconda.sh -b -f -p $MINICONDA | ||
conda config --set always_yes yes | ||
conda update conda | ||
conda info -a | ||
source activate py38_env | ||
pip install -e .[tests] | ||
- run: | ||
name: Run tests | ||
command: | | ||
source activate py38_env | ||
py.test --cov-append --cov-config=cubids/tests/coverage.cfg --cov-report=xml --cov=cubids cubids | ||
mkdir /tmp/src/coverage | ||
mv /home/circleci/src/CuBIDS/.coverage /tmp/src/coverage/.coverage.py38 | ||
- persist_to_workspace: | ||
root: /tmp | ||
paths: | ||
- miniconda | ||
|
||
test_py39: | ||
run_pytests: | ||
machine: | ||
image: ubuntu-2004:202201-02 | ||
working_directory: /home/circleci/src/CuBIDS | ||
docker: | ||
- image: continuumio/miniconda3 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Generate environment | ||
command: | | ||
conda create -n py39_env python=3.9 pip -yq | ||
conda install -c conda-forge -y datalad | ||
# Add nodejs and the validator | ||
conda install nodejs | ||
npm install -g yarn && \ | ||
npm install -g bids-validator | ||
- checkout: | ||
path: /home/circleci/src/CuBIDS | ||
|
||
source activate py39_env | ||
pip install -e .[tests] | ||
- run: | ||
name: Run tests | ||
command: | | ||
source activate py39_env | ||
py.test --cov-append --cov-config=cubids/tests/coverage.cfg --cov-report=xml --cov=cubids cubids | ||
mkdir /tmp/src/coverage | ||
mv /home/circleci/src/CuBIDS/.coverage /tmp/src/coverage/.coverage.py39 | ||
- attach_workspace: | ||
at: /tmp | ||
|
||
test_py310: | ||
working_directory: /home/circleci/src/CuBIDS | ||
docker: | ||
- image: continuumio/miniconda3 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Generate environment | ||
command: | | ||
conda create -n py310_env python=3.10 pip -yq | ||
name: Test CuBIDS (Python = ${{ matrix.python_version }}) | ||
command: | | ||
export PATH=/tmp/miniconda/bin:$PATH | ||
conda create -n cubids python=${{ matrix.python_version }} pip | ||
source activate cubids | ||
conda install -c conda-forge -y datalad | ||
# Add nodejs and the validator | ||
conda install nodejs | ||
npm install -g yarn && \ | ||
npm install -g bids-validator | ||
source activate py310_env | ||
# Install CuBIDS | ||
pip install -e .[tests] | ||
- run: | ||
name: Run tests | ||
command: | | ||
source activate py310_env | ||
py.test --cov-append --cov-config=cubids/tests/coverage.cfg --cov-report=xml --cov=cubids cubids | ||
mkdir /tmp/src/coverage | ||
mv /home/circleci/src/CuBIDS/.coverage /tmp/src/coverage/.coverage.py310 | ||
test_py311: | ||
working_directory: /home/circleci/src/CuBIDS | ||
# Run tests | ||
pytest cubids | ||
deployable: | ||
docker: | ||
- image: continuumio/miniconda3 | ||
- image: busybox:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: Generate environment | ||
command: | | ||
conda create -n py311_env python=3.11 pip -yq | ||
conda install -c conda-forge -y datalad | ||
# Add nodejs and the validator | ||
conda install nodejs | ||
npm install -g yarn && \ | ||
npm install -g bids-validator | ||
source activate py311_env | ||
pip install -e .[tests] | ||
- run: | ||
name: Run tests | ||
command: | | ||
source activate py311_env | ||
py.test --cov-append --cov-config=cubids/tests/coverage.cfg --cov-report=xml --cov=cubids cubids | ||
mkdir /tmp/src/coverage | ||
mv /home/circleci/src/CuBIDS/.coverage /tmp/src/coverage/.coverage.py311 | ||
- run: echo Deploying! | ||
|
||
merge_coverage: | ||
deploy_pypi: | ||
machine: | ||
image: ubuntu-2004:202201-02 | ||
working_directory: /home/circleci/src/CuBIDS | ||
docker: | ||
- image: continuumio/miniconda3 | ||
steps: | ||
- attach_workspace: | ||
at: /tmp | ||
- checkout | ||
- checkout: | ||
path: /home/circleci/src/CuBIDS | ||
- run: | ||
name: Merge coverage files | ||
command: | | ||
apt-get update | ||
apt-get install -yqq curl | ||
source activate py37_env | ||
cd /tmp/src/coverage/ | ||
coverage combine | ||
coverage xml | ||
- store_artifacts: | ||
path: /tmp/src/coverage | ||
- codecov/upload: | ||
file: /tmp/src/coverage/coverage.xml | ||
name: Update build tools | ||
command: pip install --upgrade build twine | ||
- run: | ||
name: Build CuBIDS | ||
command: python -m build | ||
- run: | ||
name: Upload package to PyPI | ||
command: python -m twine upload -u __token__ -p ${PYPI_TOKEN} dist/cubids* | ||
|
||
workflows: | ||
version: 2.1 | ||
run_tests: | ||
version: 2 | ||
build_test_deploy: | ||
jobs: | ||
- test_py38 | ||
- test_py39 | ||
- test_py310 | ||
- test_py311 | ||
- merge_coverage: | ||
- set_up_conda: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- run_pytests: | ||
# Define the matrix for Python versions | ||
matrix: | ||
python_version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
requires: | ||
- set_up_conda | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- deployable: | ||
requires: | ||
- run_pytests | ||
filters: | ||
branches: | ||
only: main | ||
tags: | ||
only: /.*/ | ||
|
||
- deploy_pypi: | ||
requires: | ||
- test_py38 | ||
- test_py39 | ||
- test_py310 | ||
- test_py311 | ||
- deployable | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Bug report | ||
about: Something not working as described? Missing/incorrect documentation? This is the place. | ||
title: '' | ||
labels: 'bug' | ||
assignees: '' | ||
|
||
--- | ||
## Summary | ||
<!--What is the nature of the bug?--> | ||
|
||
## Additional details | ||
<!--Please fill in the following details--> | ||
- CuBIDS version: | ||
- Datalad version: | ||
|
||
### What were you trying to do? | ||
|
||
### What did you expect to happen? | ||
|
||
### What actually happened? | ||
|
||
## Reproducing the bug | ||
<!--Please share any steps you performed that revealed the bug--> | ||
<!--Please include any code snippets. | ||
Enclose them in triple back-ticks (```) | ||
Like this: | ||
``` | ||
<code> | ||
``` | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
contact_links: | ||
- name: Usage question | ||
url: https://neurostars.org/tags/c/software-support/234/cubids | ||
about: Please ask questions about using CuBIDS on NeuroStars. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Feature request | ||
about: Got an idea for a new feature, or changing an existing one? This is the place. | ||
title: '' | ||
labels: 'enhancement' | ||
assignees: '' | ||
|
||
--- | ||
## Summary | ||
<!--What would you like changed/added and why?--> | ||
|
||
## Additional details | ||
<!--What would be the benefit?--> | ||
|
||
## Next steps | ||
<!--Do you have any ideas about the implementation?--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
labels: ["maintenance", "ignore-for-release"] | ||
assignees: ["tsalo"] | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: pip | ||
directory: "/" | ||
labels: ["maintenance", "ignore-for-release"] | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Closes . | ||
|
||
## Changes proposed in this pull request | ||
|
||
- | ||
|
||
## Documentation that should be reviewed | ||
|
||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
categories: | ||
- title: 🛠 Breaking Changes | ||
labels: | ||
- breaking-change | ||
- title: 🎉 Exciting New Features | ||
labels: | ||
- enhancement | ||
- title: 👎 Deprecations | ||
labels: | ||
- deprecation | ||
- title: 🐛 Bug Fixes | ||
labels: | ||
- bug | ||
- title: Other Changes | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.