Skip to content

Commit

Permalink
Merge pull request #14 from tsalo/infrastructure
Browse files Browse the repository at this point in the history
Work on infrastructure
  • Loading branch information
effigies authored Apr 23, 2024
2 parents 244cd72 + 074b393 commit b8e66fd
Show file tree
Hide file tree
Showing 41 changed files with 2,551 additions and 268 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
groups:
actions-infrastructure:
patterns:
- 'actions/*'
- package-ecosystem: 'pip'
directory: '/services/datalad'
schedule:
interval: 'monthly'
groups:
pipenv:
patterns:
- '*'
49 changes: 49 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Text in these brackets are comments, and won't be visible when you submit your pull request.
If this is your first contribution, please take the time to read these, in particular the comment
beginning "Welcome, new contributors!".
-->

## Changes proposed in this pull request

<!--
Please describe here the main features / changes proposed for review and integration in fMRIPost-AROMA
If this PR addresses some existing problem, please use GitHub's citing tools
(eg. ref #, closes # or fixes #).
If there is not an existing issue open describing the problem, please consider opening a new
issue first and then link it from here (so the *fMRIPost-AROMA* community has a better understanding
of ongoing development efforts and possible overlaps between contributions).
-->


## Documentation that should be reviewed
<!--
Please summarize here the main changes to the documentation that the reviewers should be aware of.
-->



<!--
Welcome, new contributors!
We ask you to read through the Contributing Guide:
https://github.com/nipreps/fmripost-aroma/blob/master/CONTRIBUTING.md
These are guidelines intended to make communication easier by describing a consistent process, but
don't worry if you don't get it everything exactly "right" on the first try.
To boil it down, here are some highlights:
1) Consider starting a conversation in the issues list before submitting a pull request. The discussion might save you a
lot of time coding.
2) Please use descriptive prefixes in your pull request title, such as "ENH:" for an enhancement or "FIX:" for a bug fix.
(See the Contributing guide for the full set.) And consider adding a "WIP" tag for works-in-progress.
3) Any code you submit will be licensed under the same terms (Apache License 2.0) as the rest of fMRIPost-AROMA.
4) We invite every contributor to add themselves to the `.zenodo.json` file
(https://github.com/nipreps/fmripost-aroma/blob/master/.zenodo.json), which will result in your being listed as an author
at the next release. Please add yourself as the next-to-last entry, just above Russ.
A pull request is a conversation. We may ask you to make some changes before accepting your PR,
and likewise, you should feel free to ask us any questions you have.
-->
40 changes: 40 additions & 0 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Contribution checks

on:
push:
branches:
- main
- maint/*
pull_request:
branches:
- main
- maint/*

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run ruff check .
- run: pipx run ruff format --diff .

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

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
69 changes: 69 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Pre-release checks

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pre-release:
# Check pre-releases of dependencies on stable Python
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: ['ubuntu-latest']
python-version: ['3.10', '3.11', '3.12']
install: ['pip']
check: ['tests']
pip-flags: ['PRE_PIP_FLAGS']
env:
INSTALL_TYPE: ${{ matrix.install }}
CHECK_TYPE: ${{ matrix.check }}
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}
OS_TYPE: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: .maint/ci/install_dependencies.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Create virtual environment
run: .maint/ci/create_venv.sh
- name: Build archive
run: |
source .maint/ci/build_archive.sh
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
- name: Install fMRIPost-AROMA
run: .maint/ci/install.sh
- name: Install extras
run: .maint/ci/install_extras.sh
- name: Run tests
run: .maint/ci/check.sh
- uses: codecov/codecov-action@v4
with:
file: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ always() }}
72 changes: 72 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Stable tests

on:
push:
branches:
- main
- maint/*
- next
pull_request:
branches:
- main
- maint/*
- next

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
stable:
# Check each OS, all supported Python, minimum versions and latest releases
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
python-version: ['3.10', '3.11', '3.12']
install: ['pip']
check: ['tests']
pip-flags: ['']
env:
INSTALL_TYPE: ${{ matrix.install }}
CHECK_TYPE: ${{ matrix.check }}
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}
OS_TYPE: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: .maint/ci/install_dependencies.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Create virtual environment
run: .maint/ci/create_venv.sh
- name: Build archive
run: |
source .maint/ci/build_archive.sh
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
- name: Install fMRIPost-AROMA
run: .maint/ci/install.sh
- name: Install extras
run: .maint/ci/install_extras.sh
- name: Run tests
run: .maint/ci/check.sh
- uses: codecov/codecov-action@v4
with:
file: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ always() }}
85 changes: 85 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,90 @@
.DS_Store
.*.swp
.mypy_cache
.pytest_cache
.ruff_cache
.coverage

# 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
pip-wheel-metadata/

# 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/

# 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

_version.py
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ repos:
rev: 23.1.0
hooks:
- id: black
files: ^fmriprep/|^wrapper/
files: ^src/fmripost_aroma/
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
files: ^fmriprep/|^wrapper/
files: ^src/fmripost_aroma/
22 changes: 1 addition & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,28 +103,8 @@ RUN apt-get update -qq \
--exclude "fsl/tcl" \
--exclude "fsl/bin/FSLeyes" \
&& find /opt/fsl-6.0.5.1/bin -type f -not \( \
-name "applywarp" -or \
-name "bet" -or \
-name "bet2" -or \
-name "convert_xfm" -or \
-name "fast" -or \
-name "flirt" -or \
-name "fsl_regfilt" -or \
-name "fslhd" -or \
-name "fslinfo" -or \
-name "fslmaths" -or \
-name "fslmerge" -or \
-name "fslroi" -or \
-name "fslsplit" -or \
-name "fslstats" -or \
-name "imtest" -or \
-name "mcflirt" -or \
-name "melodic" -or \
-name "prelude" -or \
-name "remove_ext" -or \
-name "susan" -or \
-name "topup" -or \
-name "zeropad" \) -delete \
-name "susan" -or \) -delete \
&& find /opt/fsl-6.0.5.1/data/standard -type f -not -name "MNI152_T1_2mm_brain.nii.gz" -delete
ENV FSLDIR="/opt/fsl-6.0.5.1" \
PATH="/opt/fsl-6.0.5.1/bin:$PATH" \
Expand Down
Loading

0 comments on commit b8e66fd

Please sign in to comment.