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

Brings 20220414-fs-source branch up to date with ReproNim/master #1

Merged
merged 282 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
a0da149
deal with install method
Remi-Gau Jan 7, 2023
47eeae1
draw the rest of F owl
Remi-Gau Jan 7, 2023
d507c89
remove centos that fails across the board
Remi-Gau Jan 7, 2023
a5ce4d2
add matlab mcr
Remi-Gau Jan 7, 2023
725a2b8
add matlab mcr
Remi-Gau Jan 7, 2023
dbb7f18
add debian and cat12
Remi-Gau Jan 7, 2023
879aa18
update dashboard
Remi-Gau Jan 7, 2023
2ef1864
add intermediate versions
Remi-Gau Jan 7, 2023
055d3c5
rm old dockerfile
Remi-Gau Jan 7, 2023
4ca682e
fix name of debian distro
Remi-Gau Jan 7, 2023
18e1139
just say yes
Remi-Gau Jan 7, 2023
814a3ee
update debian stretch name
Remi-Gau Jan 7, 2023
e3f05be
actually update the workflows
Remi-Gau Jan 7, 2023
1bdf467
add mcr for ants
Remi-Gau Jan 7, 2023
16a534a
rm centos 8
Remi-Gau Jan 7, 2023
7788dc2
add afni python option
Remi-Gau Jan 7, 2023
54c4e19
update to mcr base version and ants mcr dependency version
Remi-Gau Jan 8, 2023
19c47bc
add fsl versions$
Remi-Gau Jan 8, 2023
2316725
rm -
Remi-Gau Jan 8, 2023
2355a03
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 10, 2023
7705a07
Update README.md
Remi-Gau Jan 10, 2023
0f71109
Update README.md
Remi-Gau Jan 10, 2023
155e57c
Merge pull request #482 from Remi-Gau/fix_precommit
satra Jan 11, 2023
6ee813e
remove empty lines
satra Jan 11, 2023
f7048d0
test all versions
Remi-Gau Jan 14, 2023
f63915e
add other softwares
Remi-Gau Jan 14, 2023
b42fb12
add more softwares, a dashboard and cron schedule to run the builds
Remi-Gau Jan 14, 2023
43c5b45
minor fixes
Remi-Gau Jan 14, 2023
1a9aa0d
minor fixes
Remi-Gau Jan 14, 2023
1ee8df3
rm duplicate
Remi-Gau Jan 14, 2023
995be58
Update neurodocker/templates/afni.yaml
Remi-Gau Jan 14, 2023
91a50a2
fix typo
Remi-Gau Jan 14, 2023
3523b49
fix: mypy configuration
satra Jan 14, 2023
7d92998
fix: install mypy stubs
satra Jan 14, 2023
81b93de
fix: remove py 3.7 and add apptainer 1.1.5
satra Jan 14, 2023
714c5de
fix: adjust optionEatAll for click >= 8
satra Jan 14, 2023
a80dfa4
install apptainer from deb files
satra Jan 14, 2023
f7f2aaf
remove /docs from .dockerignore
kaczmarj Jan 14, 2023
9792c6a
remove minify option and tests
satra Jan 14, 2023
139a245
fix flake
satra Jan 14, 2023
9c19d66
CFG: restrict workflows to PRs only
satra Jan 14, 2023
7ae8b29
Merge pull request #492 from ReproNim/fix/tests
satra Jan 14, 2023
8f481b4
Merge remote-tracking branch 'origin/master' into fix/test-state
satra Jan 14, 2023
264321b
Merge branch 'fix/tests' into fix/test-state
satra Jan 14, 2023
218697a
fix: workflow file
satra Jan 14, 2023
0d4b4c0
Merge pull request #490 from ReproNim/fix/test-state
satra Jan 14, 2023
69fa8a0
Merge branch 'master' into fix/empty-cont-line
satra Jan 14, 2023
f79ef3e
Merge branch 'master' into fix/fix-version-in-containers
kaczmarj Jan 14, 2023
43cb3b2
enh: add release workflow
satra Jan 14, 2023
d62b72f
Merge pull request #493 from ReproNim/fix/fix-version-in-containers
satra Jan 14, 2023
ec3a286
Merge branch 'master' into enh/release
satra Jan 14, 2023
963e6fc
Merge branch 'master' into fix/empty-cont-line
satra Jan 14, 2023
a46b695
Merge pull request #488 from ReproNim/fix/empty-cont-line
satra Jan 14, 2023
b01a0f6
Merge branch 'master' into enh/release
satra Jan 14, 2023
534bf02
Merge pull request #495 from ReproNim/enh/release
satra Jan 14, 2023
90e23dc
fix: auto setup
satra Jan 14, 2023
6edbded
Merge pull request #496 from ReproNim/fix/auto
satra Jan 14, 2023
942c729
Update CHANGELOG.md [skip ci]
Jan 14, 2023
d7d185e
Merge branch 'master' into test_build
satra Jan 14, 2023
95f8f91
Merge branch 'master' into add/ants24x
kaczmarj Jan 16, 2023
52516ea
Merge pull request #473 from araikes/add/ants24x
satra Jan 16, 2023
b881469
FIX: skip minification tests on M1/M2 macs and run them otherwise (#497)
kaczmarj Jan 16, 2023
4f1cd14
Update CHANGELOG.md [skip ci]
Jan 16, 2023
e87a71d
Update README.md
Remi-Gau Jan 16, 2023
50c473f
start bootstrap
Remi-Gau Jan 17, 2023
6a36db7
try to commit in CI
Remi-Gau Jan 17, 2023
038719e
try using proper auth
Remi-Gau Jan 17, 2023
06fb483
try manual
Remi-Gau Jan 17, 2023
357461f
set upstream
Remi-Gau Jan 17, 2023
6e30561
try with token
Remi-Gau Jan 17, 2023
4aa546b
try repo secret
Remi-Gau Jan 17, 2023
4eacd92
try another token
Remi-Gau Jan 18, 2023
c6394ee
run test on the proper branch
Remi-Gau Jan 18, 2023
d8a9d8c
adapt before merge and comment
Remi-Gau Jan 18, 2023
b4c4234
allow to run workflow manually
Remi-Gau Jan 18, 2023
3301e48
test dashbord build
Remi-Gau Jan 18, 2023
e9b082e
rm no jekyll
Remi-Gau Jan 18, 2023
42c1af6
reactivate testing workflows
Remi-Gau Jan 18, 2023
b9f4896
Merge branch 'master' into test_build
Remi-Gau Jan 18, 2023
76a3b20
rm dashboard
Remi-Gau Jan 18, 2023
e867ba6
[FIX] add regression test for 498 (#499)
Remi-Gau Jan 18, 2023
88b0dda
add long_description to setup.cfg (#465)
kaczmarj Jan 18, 2023
2992e02
fix the types in --copy and --entrypoint (#500)
kaczmarj Jan 18, 2023
ed952ec
Update CHANGELOG.md [skip ci]
Jan 18, 2023
de43d6f
[TESTS] check black style in github actions (#501)
kaczmarj Jan 18, 2023
4e902ec
add bad versions to et file
satra Jan 18, 2023
c92634f
Merge pull request #502 from ReproNim/enh/add-bad-versions
satra Jan 19, 2023
ce889be
do not install sphinx 6.x
kaczmarj Jan 19, 2023
709da4a
testing sphinx build
satra Feb 3, 2023
c59c95d
fix: syntax
satra Feb 3, 2023
d671f28
Merge pull request #505 from ReproNim/fix/docs-sphinx6
satra Feb 3, 2023
ba64412
fix docs build
satra Feb 3, 2023
56d5e72
remove on demand
satra Feb 3, 2023
a2fb4ba
Update .github/workflows/bootstrap.yml
satra Feb 3, 2023
bc03b51
Update .github/workflows/bootstrap.yml
satra Feb 3, 2023
5c9caf7
Apply suggestions from code review
satra Feb 3, 2023
3bddeeb
Update .github/workflows/bootstrap.yml
satra Feb 3, 2023
940eb7a
Merge branch 'master' into test_build
satra Feb 3, 2023
3b03838
run black
Remi-Gau Feb 4, 2023
ed39d30
precommit checks
satra Feb 4, 2023
6adc00b
update black
satra Feb 4, 2023
5caa937
update black commits
satra Feb 4, 2023
a24c771
update black commits for github workflow
satra Feb 4, 2023
b21787e
Merge pull request #7 from ReproNim/ci-test
Remi-Gau Feb 7, 2023
0414fa0
Merge pull request #487 from Remi-Gau/test_build
satra Feb 7, 2023
2e779be
allow writing actions
satra Feb 7, 2023
5286e68
simplify git commit
satra Feb 7, 2023
ef301b5
Update bootstrap.yml
satra Feb 7, 2023
a7a57a1
add all changed files
satra Feb 7, 2023
b83a6c0
add commit agent
satra Feb 7, 2023
31aa323
add workflow token
satra Feb 7, 2023
dc3112f
fix: repo info
satra Feb 7, 2023
ca12739
switched to debian packages that are unpacked for yum based distribut…
stebo85 Feb 7, 2023
e71b6fe
changed from minc to self
stebo85 Feb 7, 2023
79a7307
added comment about debian packages
stebo85 Feb 8, 2023
119d7fe
removed quotes around versions
stebo85 Feb 8, 2023
f3656c9
try with quotes
stebo85 Feb 8, 2023
55cfa6e
fixed binaries url
stebo85 Feb 8, 2023
c94a036
changed to 18.04
stebo85 Feb 8, 2023
6f06168
add https
stebo85 Feb 8, 2023
3731b0e
Merge pull request #509 from NeuroDesk/minc_install_from_deb_and_rpm
satra Feb 8, 2023
e98d131
Update cli.rst
sooyounga Feb 22, 2023
e766064
updated version tags and added latest tag clarification to docs
sooyounga Feb 28, 2023
e009a9c
Merge pull request #516 from ReproNim/sooyoung-494-update-docs-readme
djarecka Mar 3, 2023
d291420
Merge branch 'master' into sooyoung-update-cli-docs
djarecka Mar 3, 2023
2bea183
Merge pull request #514 from ReproNim/sooyoung-update-cli-docs
djarecka Mar 3, 2023
19b6a94
clean
Remi-Gau Mar 4, 2023
57a23f0
Merge pull request #517 from Remi-Gau/clean
satra Mar 4, 2023
b82ee45
Update README.md
djarecka Mar 29, 2023
a203b23
Update ants.yaml (#521)
araikes Mar 29, 2023
0ce9461
Add FSL version 6.0.5.2 (#523)
ghisvail Mar 30, 2023
5dbe50e
Enable build of docs with Sphinx 6 (#525)
ghisvail Mar 30, 2023
80e7cf4
NEW: Add support for FSL version 6.0.6 onwards (#527)
ghisvail Mar 31, 2023
34aa8c8
changed base image for AFNI to fedora:35 (#520)
stebo85 Mar 31, 2023
f39cffb
Mcr missing deb libxp6 (#526)
stebo85 Apr 3, 2023
f2f42e1
modifying value for entry point to allow -arg or --arg (#515)
djarecka Apr 3, 2023
d039674
Afni missing dependencies for suma (#512)
stebo85 May 12, 2023
8f5660a
Update CHANGELOG.md [skip ci]
May 12, 2023
7be8eb7
Update cat (#533)
stebo85 Jun 1, 2023
c71967b
Update years to have full range of years of the project
yarikoptic Jun 30, 2023
3caa4d0
Merge pull request #534 from ReproNim/doc-years
satra Jun 30, 2023
6db92c7
Update matlabmcr.yaml (#539)
dnkennedy Jul 20, 2023
e476266
Fixing my update for mcr2023a (#540)
dnkennedy Jul 21, 2023
6be21d9
added freesurfer 7.4.1 (#542)
hjbockholt Aug 4, 2023
4132721
add fsl 6.0.7.1
stebo85 Aug 9, 2023
7a7aaea
Add github action to codespell master on push and PRs
yarikoptic Aug 21, 2023
21da97d
Add rudimentary codespell config
yarikoptic Aug 21, 2023
1038e35
Add pre-commit definition for codespell
yarikoptic Aug 21, 2023
260a9c2
Add ignores
yarikoptic Aug 21, 2023
9090da3
[DATALAD RUNCMD] run codespell throughout
yarikoptic Aug 21, 2023
fbf6715
Merge pull request #543 from NeuroDesk/add-fsl-6.0.7.1
yarikoptic Aug 21, 2023
0916305
added freesurfer 7.3.2
stebo85 Aug 21, 2023
2b8776f
Merge pull request #547 from ReproNim/added-freesurfer-7-3-2
stebo85 Aug 22, 2023
b0aa175
Merge branch 'master' into enh-codespell
stebo85 Aug 22, 2023
7bba338
Merge pull request #544 from yarikoptic/enh-codespell
stebo85 Aug 22, 2023
e184ed6
Merge branch 'master' into mcr-bug
stebo85 Aug 22, 2023
bd4ce3a
Merge pull request #471 from NeuroDesk/mcr-bug
stebo85 Aug 22, 2023
c3891d8
Merge branch 'master' into autodoc
Remi-Gau Aug 22, 2023
5c173ed
update doc
Remi-Gau Aug 22, 2023
1d0d254
fix codespell
Remi-Gau Aug 22, 2023
4d291a1
[DATALAD RUNCMD] run isort
Remi-Gau Aug 22, 2023
974e8c9
[DATALAD RUNCMD] run precommit
Remi-Gau Aug 22, 2023
440e5ff
simplify typing
Remi-Gau Aug 22, 2023
d7033f0
pacify mypy
Remi-Gau Aug 22, 2023
bcf2114
do not fail fast
Remi-Gau Aug 22, 2023
3cdcc8e
fix typo
Remi-Gau Aug 22, 2023
732bfe2
cancel previous runs
Remi-Gau Aug 22, 2023
9e235e0
Merge pull request #549 from Remi-Gau/isort_clean
Remi-Gau Aug 22, 2023
a3a6125
Merge branch 'master' into simple_type
Remi-Gau Aug 22, 2023
68950b6
split format testing
Remi-Gau Aug 22, 2023
c7a472d
cancel previous runs
Remi-Gau Aug 22, 2023
57f70cf
cancel previous runs
Remi-Gau Aug 22, 2023
dc7d286
Merge pull request #551 from Remi-Gau/simple_type
Remi-Gau Aug 22, 2023
df85125
Merge branch 'master' into split_formatting
Remi-Gau Aug 22, 2023
5326b34
add isort config
Remi-Gau Aug 22, 2023
575e284
Merge pull request #554 from Remi-Gau/split_formatting
Remi-Gau Aug 22, 2023
9464f07
Bump actions/setup-python from 2 to 4
dependabot[bot] Aug 22, 2023
66df6b1
Bump actions/checkout from 2 to 3
dependabot[bot] Aug 22, 2023
d6efdb6
Merge pull request #556 from ReproNim/dependabot/github_actions/actio…
Remi-Gau Aug 22, 2023
1144517
Merge pull request #557 from ReproNim/dependabot/github_actions/actio…
Remi-Gau Aug 22, 2023
8762650
Create stale.yml workflow to close stale issues
kaczmarj Aug 22, 2023
30df09c
Change name of parent directory
kaczmarj Aug 22, 2023
a77bcc1
remove oldest disro
Remi-Gau Aug 25, 2023
b26115f
Merge pull request #559 from ReproNim/rm_old_dsitro
Remi-Gau Aug 25, 2023
82f9509
Bump actions/stale from 5 to 8
dependabot[bot] Aug 28, 2023
827ff79
Merge pull request #560 from ReproNim/dependabot/github_actions/actio…
Remi-Gau Aug 28, 2023
65cedc2
add mamba option
Shotgunosine Aug 29, 2023
bb45442
Merge pull request #562 from Shotgunosine/master
stebo85 Aug 29, 2023
169160e
set python version for format job
stebo85 Aug 29, 2023
1d79797
Merge pull request #563 from ReproNim/fix-format-ci
stebo85 Aug 29, 2023
a02eb23
add filter
Remi-Gau Aug 29, 2023
b13d43e
Merge pull request #564 from Remi-Gau/filter
Remi-Gau Aug 29, 2023
1805439
test build of conda
Remi-Gau Aug 29, 2023
94db0e0
update versions
Remi-Gau Aug 29, 2023
2a07db9
Merge pull request #566 from Remi-Gau/test_miniconda
Remi-Gau Aug 30, 2023
7144d85
Merge remote-tracking branch 'upstream/master' into autodoc
Remi-Gau Sep 3, 2023
549eceb
autobuild CLI help
Remi-Gau Sep 3, 2023
6bdd585
add links to github and docker
Remi-Gau Sep 3, 2023
18fe870
remove unused dependency
Remi-Gau Sep 3, 2023
26e4981
update doc
Remi-Gau Sep 3, 2023
f59e71e
add tests for some examples
Remi-Gau Sep 3, 2023
dff3b69
test on PR
Remi-Gau Sep 3, 2023
66d64b8
it works better if you install the package you want to test
Remi-Gau Sep 3, 2023
191a56c
it works better if you install python to install a python package
Remi-Gau Sep 3, 2023
d6d4d7e
rm test file
Remi-Gau Sep 3, 2023
0b8d789
add possibility to only build a single workflow
Remi-Gau Sep 3, 2023
e165552
add dispatch options
Remi-Gau Sep 3, 2023
6ebca58
move step
Remi-Gau Sep 3, 2023
8153f9f
set defaults
Remi-Gau Sep 3, 2023
c8c11e2
set defaults
Remi-Gau Sep 3, 2023
d8ada1a
pass value
Remi-Gau Sep 3, 2023
4492453
fix build command
Remi-Gau Sep 3, 2023
5e0a707
Update README.md
Remi-Gau Sep 3, 2023
f8c47a1
Merge pull request #570 from Remi-Gau/dispatch
Remi-Gau Sep 3, 2023
613ccc2
try to modernize nipype tuto example
Remi-Gau Sep 3, 2023
36ce230
use env var
Remi-Gau Sep 3, 2023
5da89b8
Merge pull request #571 from Remi-Gau/env_var
Remi-Gau Sep 3, 2023
6de8619
use local var
Remi-Gau Sep 3, 2023
da4f22c
Merge pull request #572 from Remi-Gau/env_var
Remi-Gau Sep 3, 2023
f1ee11f
Merge pull request #463 from Remi-Gau/autodoc
Remi-Gau Sep 3, 2023
8fc2add
update nipype example
Remi-Gau Sep 3, 2023
9609833
use mamba and pin some dependencies
Remi-Gau Sep 3, 2023
1ec6422
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
ad91e73
Merge pull request #573 from ReproNim/dependabot/github_actions/actio…
Remi-Gau Sep 4, 2023
7b2501c
[FIX] install the proper dependencies for doc build
Remi-Gau Sep 4, 2023
df17a86
Merge pull request #574 from ReproNim/Remi-Gau-patch-1
Remi-Gau Sep 4, 2023
b8b5579
Update examples.rst
stebo85 Sep 5, 2023
3376e04
added FSL interactivity note
stebo85 Sep 5, 2023
1e7aed7
Update docs/user_guide/examples.rst
stebo85 Sep 5, 2023
5689479
Update stale.yml
Remi-Gau Sep 6, 2023
caf0aa1
Merge pull request #577 from ReproNim/Remi-Gau-patch-1
Remi-Gau Sep 6, 2023
18a7716
Update installation.rst
stebo85 Sep 11, 2023
f3bd737
Merge pull request #575 from ReproNim/stebo85-patch-1
stebo85 Sep 11, 2023
3ee6970
Merge pull request #576 from ReproNim/stebo85-patch-2
stebo85 Sep 11, 2023
fc18623
Update examples.rst
stebo85 Sep 17, 2023
8571e0b
Merge pull request #578 from ReproNim/stebo85-patch-1
stebo85 Sep 17, 2023
d972685
more recent mrtrix version
Remi-Gau Sep 17, 2023
d096fdc
Merge remote-tracking branch 'upstream/master' into mrtrix
Remi-Gau Sep 17, 2023
cdb6420
fix typo in dox
Remi-Gau Sep 17, 2023
b5e8094
Merge pull request #579 from Remi-Gau/mrtrix
Remi-Gau Sep 18, 2023
d0a213a
Merge branch 'master' into update_doc
Remi-Gau Sep 18, 2023
0b56acd
comment out nipype example
Remi-Gau Sep 18, 2023
9863175
expected failure of nipype tuto
Remi-Gau Sep 18, 2023
5505223
Merge pull request #569 from Remi-Gau/update_doc
Remi-Gau Sep 18, 2023
bd9efcf
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 18, 2023
a87693e
Merge pull request #582 from ReproNim/dependabot/github_actions/actio…
Remi-Gau Sep 18, 2023
4f492e9
Update fsl.yaml
stebo85 Oct 5, 2023
b496ce7
Merge pull request #583 from ReproNim/stebo85-patch-1
stebo85 Oct 5, 2023
8f94055
Merge pull request #1 from ReproNim/master
Oct 21, 2023
cfc0060
Bringing Freesurfer-from-source up to date with master branch
Oct 21, 2023
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
7 changes: 7 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"onlyPublishWithReleaseLabel": true,
"baseBranch": "master",
"author": "Repronim Bot <[email protected]>",
"noVersionPrefix": true,
"plugins": ["git-tag"]
}
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,*.pdf,*.svg,versioneer.py,_version.py
# didi -- some name Dear to someone
ignore-words-list = didi
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Sphinx documentation.
# The Docker image is not intended to be used to build docs.
/docs

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
2 changes: 2 additions & 0 deletions .et
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{ "bad_versions" : ["0.9.2", "0.9.3"]
}
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Documentation
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
85 changes: 85 additions & 0 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# this workflow bootstraps the testing of the build the docker images
#
# - this will run the python script used to generate the workflows
# based on a the jinja template
# - commit and push the generated workflows to the branch test_docker_build
# where they will be executed

name: bootstrap

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

on:
push:
branches: [ "master" ]
paths:
- .github/workflows/bootstrap.yml
- .github/workflows/create_workflows.py
- neurodocker/**

# Uses the cron schedule for github actions
#
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#scheduled-events
#
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *

schedule:
- cron: 0 0 1,15 * *

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
software_name:
description: 'software to test'
required: true
default: 'all'

permissions:
contents: write
actions: write
jobs:
bootstrap:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CI_FLOW }}

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

- name: Install dependencies
run: python -m pip install jinja2 pyyaml

- name: Create workflows
run: |
software_name=${{ inputs.software_name }}
if [ -z "$software_name" ]; then
software_name="all"
fi
if [ "$software_name" = "all" ]; then
echo "testing all software"
else
echo "testing ${software_name}"
fi
git checkout -b test_docker_build
python .github/workflows/create_workflows.py --software_name ${software_name}
ls -l .github/workflows
git add .
git config --global user.email "[email protected]"
git config --global user.name "Repronim neurodocker bot"
git commit -am "added new workflows"
git push origin --force test_docker_build
26 changes: 26 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Codespell

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

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

permissions:
contents: read

jobs:
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
218 changes: 218 additions & 0 deletions .github/workflows/create_workflows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
"""
This scripts uses a jinja template to create CI workflows to test.

- different linux distributions (split by the package manager they use)
- different software that neurodocker supports
- different install method for a given software

All of those are defined in a python dictionary.

Versions to install are read from the neurodocker template for a given software.
It is possible to skip a version by adding a "skip_versions" key to the software.

Each workflow:

- installs the latest version of neurodocker
- builds a dockerfile for a combination of OS / software / version / install method
- cat the dockerfile
- attempts to build the corresponding image

This script will also create a "dashboard" saved in docs/README.md
to be picked up to be rendered by the github pages.
This requires for you to build the pages from the docs folder
and on the branch where the workflows are pushed to (currently "test_docker_build").

"""
import argparse
from pathlib import Path

import yaml # type: ignore
from jinja2 import Environment, FileSystemLoader, select_autoescape

apt_based = [
"ubuntu:22.04",
"ubuntu:18.04",
"debian:bullseye-slim",
"debian:buster-slim",
]
yum_based = ["fedora:36", "centos:7"]

"""
Add a "skip_versions" key to the software dictionary if you want to skip
testing a specific version. For example, if you want to skip testing
version 1.0.0 of afni, add the following to the software dictionary:

"afni": {
"skip_versions": ["1.0.0"],
"methods": ["binaries", "source"],
"afni_python": ["true", "false"],
},

"""
output_dir = Path(__file__).parent

template_folder = Path(__file__).parents[2].joinpath("neurodocker", "templates")

build_dashboard_file = Path(__file__).parents[2].joinpath("docs", "README.md")

# this has to match the name of the branch where the workflows are pushed to
# see .github/workflows/bootstrap.yml
branch = "test_docker_build"

# Update to match your username and repo name if you are testing things on your fork
# "ReproNim/neurodocker"
repo = "ReproNim/neurodocker"


def software() -> dict[str, dict[str, list[str]]]:
return {
"afni": {
"methods": ["binaries", "source"],
"afni_python": ["true", "false"],
},
"ants": {
"methods": ["binaries", "source"],
},
"cat12": {"methods": ["binaries"]},
"convert3d": {"methods": ["binaries"]},
"dcm2niix": {
"methods": ["binaries", "source"],
},
"freesurfer": {"methods": []},
"fsl": {
"methods": ["binaries"],
},
"matlabmcr": {
"methods": ["binaries"],
},
"mricron": {"methods": ["binaries"]},
"mrtrix3": {
"methods": ["binaries", "source"],
},
"spm12": {"methods": ["binaries"]},
"miniconda": {},
}


def create_dashboard_file():
"""Create a build dashboard file."""

print("creating build dashboard file...")
print(build_dashboard_file)

gh_actions_url = "http://github-actions.40ants.com/"

with open(build_dashboard_file, "w") as f:
image_base_url = f"{gh_actions_url}{repo}/matrix.svg?branch={branch}"
print(
"""<!-- This page is generated automatically. Do not edit manually. -->
# Build dashboard
""",
file=f,
)

# table of content
for software_, _ in software().items():
print(f"""- [{software_}](#{software_})""", file=f)

print("", file=f)

# link to the github actions workflow and image of the build status
for software_, _ in software().items():
image_url = f"{image_base_url}&only={software_}"
print(
f"""## {software_}

[{software_} workflow](https://github.com/{repo}/actions/workflows/{software_}.yml)

![{software_} build status]({image_url})
""",
file=f,
)


def get_versions_from_neurodocker_template(software: str) -> list[str]:
"""Load the list of versions to test from the software template."""
template = template_folder.joinpath(software).with_suffix(".yaml")
with open(template, "r") as f:
data = yaml.load(f, Loader=yaml.FullLoader)
return list(data["binaries"]["urls"].keys())


def stringify(some_list: list[str]) -> str:
if len(some_list) == 1:
return f"'{some_list[0]}'"
return "'" + "', '".join(some_list) + "'"


def main(software_name="all"):
env = Environment(
loader=FileSystemLoader(Path(__file__).parent),
autoescape=select_autoescape(),
lstrip_blocks=True,
trim_blocks=True,
)

template = env.get_template("docker_build.jinja")

os = {
"apt_based": stringify(apt_based),
"yum_based": stringify(yum_based),
"all": stringify(apt_based + yum_based),
}

# only keep relevant software
software_to_test = software()
if software_name in software_to_test:
software_to_test = {software_name: software_to_test[software_name]}

for software_, spec in software_to_test.items():
wf = {
"header": "# This is file is automatically generated. Do not edit.",
"os": os,
"software": software_,
}

versions = get_versions_from_neurodocker_template(software_)
for i in spec.get("skip_versions", []):
versions.remove(i)
if software_ == "miniconda":
versions = ["latest"]

if versions is not None and len(versions) > 0:
wf["add_version"] = True
wf["versions"] = stringify(versions)

if spec.get("methods") is not None and len(spec["methods"]) > 0:
wf["add_method"] = True
wf["methods"] = stringify(spec["methods"])

if spec.get("afni_python") is not None and len(spec["afni_python"]) > 0:
wf["add_afni_python"] = True
wf["afni_python"] = stringify(spec["afni_python"])

output_file = output_dir.joinpath(software_).with_suffix(".yml")
print("creating workflow")
print(f"{output_file}")
with open(output_file, "w") as f:
print(template.render(wf=wf), file=f)

create_dashboard_file()


if __name__ == "__main__":
parser = argparse.ArgumentParser()

choices = list(software().keys())
choices.append("all")

parser.add_argument(
"--software_name",
required=False,
default="all",
choices=choices,
nargs=1,
)
args = parser.parse_args()

main(software_name=args.software_name[0])
Loading