Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-fixed-effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Sep 12, 2023
2 parents c3c0b1f + 93c49f1 commit 19cc33d
Show file tree
Hide file tree
Showing 382 changed files with 18,951 additions and 12,954 deletions.
145 changes: 73 additions & 72 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Documentation is built using Github Actions.
# CircleCI is only used to download the artifacts in order to host
# and deploy them.
Expand All @@ -7,84 +8,84 @@ version: 2.1
# Parameters required to trigger the execution
# of the "host_docs" job
parameters:
GITHUB_RUN_URL:
type: string
default: "none"
GITHUB_RUN_URL:
type: string
default: none

jobs:
host_docs:
machine:
image: ubuntu-2004:202111-01
environment:
GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc.zip
steps:
- checkout
- run: bash build_tools/circle/download_documentation.sh
- store_artifacts:
path: doc/_build/html/
destination: dev
host_docs:
machine:
image: ubuntu-2004:202111-01
environment:
GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc.zip
steps:
- checkout
- run: bash build_tools/circle/download_documentation.sh
- store_artifacts:
path: doc/_build/html/
destination: dev
# Persists the generated documentation, so that it
# can be attached and deployed in the "deploy" job
- persist_to_workspace:
root: doc/_build
paths:
- html
- persist_to_workspace:
root: doc/_build
paths:
- html

deploy:
docker:
- image: circleci/python:3.9
steps:
- add_ssh_keys:
fingerprints:
- "19:56:86:2d:c6:df:02:f2:87:0e:59:a1:eb:b7:65:77"
- attach_workspace:
at: /tmp/_build
- run:
name: Fetch docs
command: |
set -e
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts;
if [ ! -d ~/nilearn.github.io ]; then
git clone [email protected]:nilearn/nilearn.github.io.git ~/nilearn.github.io --depth=1
fi
- run:
name: Deploy dev docs
command: |
set -e;
if [ "${CIRCLE_BRANCH}" == "main" ]; then
git config --global user.email "[email protected]";
git config --global user.name "CircleCI";
cd ~/nilearn.github.io;
git checkout main
git remote -v
git fetch origin
git reset --hard origin/main
git clean -xdf
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
rm -Rf dev;
cp -a /tmp/_build/html dev;
git add -A;
git commit -m "CircleCI update of dev docs (build: ${CIRCLE_BUILD_NUM}).";
git push origin main;
else
echo "No deployment (build: ${CIRCLE_BRANCH}).";
fi
deploy:
docker:
- image: circleci/python:3.9
steps:
- add_ssh_keys:
fingerprints:
- 19:56:86:2d:c6:df:02:f2:87:0e:59:a1:eb:b7:65:77
- attach_workspace:
at: /tmp/_build
- run:
name: Fetch docs
command: |
set -e
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts;
if [ ! -d ~/nilearn.github.io ]; then
git clone [email protected]:nilearn/nilearn.github.io.git ~/nilearn.github.io --depth=1
fi
- run:
name: Deploy dev docs
command: |
set -e;
if [ "${CIRCLE_BRANCH}" == "main" ]; then
git config --global user.email "[email protected]";
git config --global user.name "CircleCI";
cd ~/nilearn.github.io;
git checkout main
git remote -v
git fetch origin
git reset --hard origin/main
git clean -xdf
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
rm -Rf dev;
cp -a /tmp/_build/html dev;
git add -A;
git commit -m "CircleCI update of dev docs (build: ${CIRCLE_BUILD_NUM}).";
git push origin main;
else
echo "No deployment (build: ${CIRCLE_BRANCH}).";
fi
workflows:
version: 2
version: 2

host_and_deploy_doc:
when:
not:
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
host_and_deploy_doc:
when:
not:
equal: [none, << pipeline.parameters.GITHUB_RUN_URL >>]
# The jobs should run only when triggered by the workflow
jobs:
- host_docs
- deploy:
requires:
- host_docs
filters:
branches:
only:
- main
jobs:
- host_docs
- deploy:
requires:
- host_docs
filters:
branches:
only:
- main
24 changes: 14 additions & 10 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
exclude =
.git,
__pycache__,
env,
venv,
auto_examples,
build,
dist,
env,
nilearn/externals/tempita
nilearn/externals/
nilearn_cache
--select = D,E,F,W,C90
venv,
doc/_build
--select = D,E,F,W,C90,CFQ
docstring-convention = numpy
max-line-length = 79
max_complexity = 43
max_function_length = 150
max_function_length = 407
max_parameters_amount = 26
max_returns_amount = 10
# For PEP8 error codes see
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes
# D100-D104: missing docstring
Expand All @@ -26,16 +31,15 @@ max_function_length = 150
# W503: line break before binary operator
# W504: line break after binary operator
per-file-ignores =
*/__init__.py: D104
**/__init__.py: D104
# - docstrings rules that should not be applied to tests
*/tests/*: D100, D101, D102, D103, D104, D205, D400, D401
*/*/tests/*: D100, D101, D102, D103, D104, D205, D400, D401
*/_testing.py: D100, D101, D102, D103, D104, D205, D400, D401
**/tests/*: D100, D101, D102, D103, D104, D205, D400, D401
**/_testing.py: D100, D101, D102, D103, D104, D205, D400, D401
# - docstrings rules that should not be applied to examples
examples/*/*: D103, D205, D301, D400
# - docstrings rules that should not be applied to doc
doc/*: D100, D103, F401
ignore = D105, D107, E402, W503, W504, W605
ignore = D105, D107, E402, W503, W504, W605, BLK100, CFQ003
# for compatibility with black
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
extend-ignore = E203
extend-ignore = E203
94 changes: 73 additions & 21 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,42 +1,94 @@
# Run this command to always ignore formatting commits in git blame
# git config blame.ignoreRevsFile .git-blame-ignore-revs
# ---------------------------------------------------------------------------- #
# FORMATTING PRs
# REFACTORING PRs
#
# Most recent PRs are at the top
# Most recently merged PRs are at the top
#
# ---------------------------------------------------------------------------- #
# [MAINT] Format nilearn/glm: apply isort and fix flake8 errors (#3640)
# refactor nilearn/maskers (sourcery, f-strings) (#3685)
37333f4604488ccef0ace5870ad442b725f60860
# refactor nilearn/glm (sourcery, f-strings) (#3672)
3522d9086eb9999d05549fc2ad0d13a83c590f8c
# refactor nilearn/surface (sourcery, f-strings) (#3682)
9352506d7d32fa17cc83971b011ad00932befe56
# refactor nilearn/interfaces (sourcery, f-strings) (#3683)
2e18c91342b65048307a21a45b5a8473414b6d16
# ---------------------------------------------------------------------------- #
# FORMATTING PRs
#
# Most recently merged PRs are at the top
#
# ---------------------------------------------------------------------------- #
# [FMT] apply black (#3836)
1b8c6ed6028e3ecf880597539f1de0910eb8d230
# [FMT] apply black to plotting - part 4 (#3833)
34613ab01d219924a8ed34677f48779d5d0b0cd1
# [FMT] apply black to plotting - part 3 (#3827)
ea375e01b35208f26aae9e66183fab245dd9862e
# [FMT] apply black to plotting - part 2 (#3810)
787d662116a0808d074b0dd40c9b4c2498712819
# [FMT] apply black to maskers - part 2 (#3803)
3f2628ffd016c9504c62db8560c5c4cc06d024c8
# [FMT] apply black to plotting - part 1 (#3802)
90dd16e20afafd2f9628bd5e08d3db3fe50353f2
# [FMT] apply black to maskers - part 1 (#3795)
aece81bb22bff7ad84427bda8d777eb072ade0b0
# [FMT] apply black nilearn.plotting.display (#3790)
186845cc04cb8c13c2dd5aa50eff2b426ec2329c
# apply black to interface (#3783)
43ff123df9e3849019c12d1c4125ed5fc8d21328
# [MAINT] Update config black and pre-commit (#3777)
caa8da8172c2ea56929ef6ecd3b592b963384370
# run isort and flake8 on the whole nilearn code base in CI (#3651)
44933309ecd09add795ce1c3ea5edaab4294da87
# Format nilearn/plotting: apply isort and fix flake8 errors (#3648)
115816702222182a244414540bb74687d7ea9597
# Update config for formatting of nilearn/datasets (#3697)
54aed7305f75be38d52d15ed30f80f45bfdd839f
# Format datasets/atlas.py (#3694)
983accf6d83983bae261143d311b2a9b10374d3a
# Formatting _utils (#3614)
9a507162952e8598c1281bfdd1b86f6d6ad14425
# Format reporting (#3615)
9ed76218dcef6814030c7473a52ae836d7a9ca7a
# Format nilearn/surface: apply isort and fix flake8 errors (#3645)
17d4b53d2bdb3a7722530eef9be1d58b305c9a0d
# apply to black nilearn/glm (#3662)
a9e13a62f4cbc9eddc4f789ee46c2e096c921f03
# Format nilearn/glm: apply isort and fix flake8 errors (#3640)
1c334c9f2bfc5f2f5057489ea199aee483b8874d
# [MAINT] Format nilearn/interfaces: apply isort and fix flake8 errors (#3647)
# Format nilearn/interfaces: apply isort and fix flake8 errors (#3647)
32787d285228dc6c741198ed56d4a6af89445489
# [MAINT] Format nilearn/maskers: apply isort and fix flake8 errors (#3650)
# Format nilearn/maskers: apply isort and fix flake8 errors (#3650)
d15ae59eb181f9980934452f9595d0625681c955
# [MAINT] Format nilearn/input_data (#3646)
# Format nilearn/input_data (#3646)
4a0808b8ef3fe8da1a1e6f910725dacf11e21edd
# [MAINT] Format files in nilearn folder (#3609)
# Format files in nilearn folder (#3609)
d5f11821da6c8852712a5d105d0afb478a04790f
# [MAINT] Format mass univariate module (#3601)
# Format mass univariate module (#3601)
d5dd4ed4b402e0918ac791b20716db05ce14280f
# [FMT] clean example/07_advanced and fix remaining style issues in examples (#3556)
# clean example/07_advanced and fix remaining style issues in examples (#3556)
6cf7b0e0a897d8b5f16d81d3831103af1123130b
# [FMT] format image module (#3548)
# format image module (#3548)
92c9bf1e5ced1e9062576bfcc846bee4d20598cc
# [FMT] format example/03_connectivity (#3552)
# format example/03_connectivity (#3552)
48fb614ca9ebf99635c78598d5b748080f67fb4d
# [FMT] format example/02_decoding (#3551)
# format example/02_decoding (#3551)
1c87dc98574774f62da632284442a4056f77fea1
# [MAINT] Apply precommit hooks to doc (#3566)
# Apply precommit hooks to doc (#3566)
5ddc12b585d8bd956df5e8f89c8d9d2ca37bc981
# [FMT] format example/04_glm_first_level (#3553)
# format example/04_glm_first_level (#3553)
946440c527a077dc759d76bce7964dad18cd6b13
# [FMT] format example/01_plotting (#3550)
# format example/01_plotting (#3550)
686a7debd73e746c282d8111d24343abb5c19d34
# [FMT] format example/00_tutorials (#3549)
# format example/00_tutorials (#3549)
859a2b5141fc36fc01c402bdd3152683feab82e4
# [MAINT] start applying isort to organize imports (#3538)
# start applying isort to organize imports (#3538)
bf2eb514acf75f338b28164563f6023d762fc95b
# [MAINT] apply pre-commit to root files (#3533)
# apply pre-commit to root files (#3533)
f6db5d424cfb794dd9cf4ea93d8319e5fbc4565b
# [INFRA] apply black, flake8, pyupgrade to `nilearn/decoding` (#3491)
# apply black, flake8, pyupgrade to nilearn/decoding (#3491)
f62e896234e389c9579bbf41b3c2531111cc6371
# [INFRA] Initial formatting with black and precommit (#3484)
77c1d785df4995166ea0a6798bc756f58f172812
# Initial formatting with black and precommit (#3484)
77c1d785df4995166ea0a6798bc756f58f172812
Loading

0 comments on commit 19cc33d

Please sign in to comment.