Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into enh/multi_sliceor…
Browse files Browse the repository at this point in the history
…ientationpatient
  • Loading branch information
bpinsard committed May 4, 2023
2 parents eb9f9d4 + d798b12 commit 0a05c19
Show file tree
Hide file tree
Showing 84 changed files with 6,430 additions and 3,972 deletions.
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,.venv,venvs,*.svg,_build
# te -- TE as codespell is case insensitive
ignore-words-list = bu,nd,te
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- DO NOT DELETE THIS!
<!-- DO NOT DELETE THIS!
This template is used to facilitate issue resolution.
All text in <!-> tags will not be displayed.
-->
Expand All @@ -20,5 +20,5 @@ Choose one:
- [ ] Container
<!-- If selected, please provide container name and tag"-->

- Heudiconv version:
- Heudiconv version:
<!-- To check: run heudiconv with just the --version flag -->
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: "[gh-actions]"
include: scope
labels:
- internal
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v1
18 changes: 14 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -20,12 +20,22 @@ jobs:
working-directory: utils

- name: Build Docker image
run: docker build -t nipy/heudiconv:master .
run: |
# build only if not release tag, i.e. has some "-" in describe
# so we do not duplicate work with release workflow.
git describe --match 'v[0-9]*' | grep -q -e - && \
docker build \
-t nipy/heudiconv:master \
-t nipy/heudiconv:unstable \
.
- name: Push Docker image
run: |
docker login -u "$DOCKER_LOGIN" --password-stdin <<<"$DOCKER_TOKEN"
docker push nipy/heudiconv:master
git describe --match 'v[0-9]*' | grep -q -e - && (
docker login -u "$DOCKER_LOGIN" --password-stdin <<<"$DOCKER_TOKEN"
docker push nipy/heudiconv:master
docker push nipy/heudiconv:unstable
)
env:
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Linters

on:
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set up environment
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Run linters
run: tox -e lint
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -28,13 +28,13 @@ jobs:
id: auto-version
run: |
version="$(~/auto version)"
echo "::set-output name=version::$version"
echo "version=$version" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
if: steps.auto-version.outputs.version != ''
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '^3.7'

Expand Down Expand Up @@ -67,8 +67,9 @@ jobs:
run: |
docker build \
-t nipy/heudiconv:master \
-t nipy/heudiconv:unstable \
-t nipy/heudiconv:latest \
-t nipy/heudiconv:"$(git describe)" \
-t nipy/heudiconv:"$(git describe | sed -e 's,^v,,g')" \
.
- name: Push Docker images
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test

on:
pull_request:
push:

jobs:
test:
runs-on: ubuntu-latest
env:
BOTO_CONFIG: /tmp/nowhere
DATALAD_TESTS_SSH: '1'
strategy:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install git-annex
run: |
# The ultimate one-liner setup for NeuroDebian repository
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
sudo apt-get update -qq
sudo apt-get install git-annex-standalone dcm2niix
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r dev-requirements.txt
pip install requests # below installs pyld but that assumes we have requests already
pip install datalad
pip install coverage pytest
- name: Configure Git identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- name: Run tests with coverage
run: coverage run `which pytest` -s -v heudiconv

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false

# vim:set et sts=2:
27 changes: 27 additions & 0 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Type-check

on:
- push
- pull_request

jobs:
typing:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Run type checker
run: tox -e typing
10 changes: 6 additions & 4 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
*.egg-info/
*.pyc
.cache/
.coverage
*.egg-info/
.idea/
venvs/
.tox/
.vscode/
_build/
_version.py
build/
dist/
.vscode/
_version.py
sample_nifti.json
venvs/
6 changes: 6 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ Matteo Visconti di Oleggio Castello <[email protected]>
Matteo Visconti di Oleggio Castello <[email protected]>
Matteo Visconti di Oleggio Castello <[email protected]>
Chris Filo Gorgolewski <[email protected]> Chris Gorgolewski <[email protected]>
Pablo Velasco <[email protected]>
Pablo Velasco <[email protected]>
Dae Houlihan <[email protected]>
Dae Houlihan <[email protected]>
Mathias Goncalves <[email protected]>
Mathias Goncalves <[email protected]>
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-unused-arguments
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python:
build:
os: ubuntu-20.04
tools:
python: "3"
python: "3.9"
sphinx:
configuration: docs/conf.py
fail_on_warning: true
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 0a05c19

Please sign in to comment.