Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into test-python
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Feb 1, 2024
2 parents 067b978 + 2b8ad8d commit 841fc21
Show file tree
Hide file tree
Showing 45 changed files with 1,278 additions and 658 deletions.
210 changes: 88 additions & 122 deletions .circleci/config.yml
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: /.*/
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
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>
```
-->
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
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.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
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?-->
18 changes: 18 additions & 0 deletions .github/dependabot.yml
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
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
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

-
20 changes: 20 additions & 0 deletions .github/release.yml
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:
- "*"
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up environment
uses: actions/checkout@v3
uses: actions/checkout@v4
with: # no need for the history
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
Expand Down
14 changes: 9 additions & 5 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ Credits

Development Lead
----------------
* Sydney Covitz <sydney.covitz at pennmedicine dot upenn .edu>
* Taylor Salo <taylor dot salo at pennmedicine dot upenn dot edu>

Contributors
------------
* Matt Cieslak <matthew.cieslak at pennmedicine dot upenn .edu>

* Tinashe Tapera <tinashe.tapera at pennmedicine dot upenn .edu>
* Matt Cieslak <matthew dot cieslak at pennmedicine dot upenn dot edu>

Principal Investigator
----------------------
* Theodore Satterthwaite <theodore.satterthwaite at pennmedicine dot upenn .edu>
* Theodore Satterthwaite <theodore dot satterthwaite at pennmedicine dot upenn dot edu>

Previous Contributors
---------------------
* Sydney Covitz <sydney dot covitz at pennmedicine dot upenn dot edu> (previous development lead)

* Tinashe Tapera <tinashe dot tapera at pennmedicine dot upenn dot edu>
Loading

0 comments on commit 841fc21

Please sign in to comment.