update: add support for pre-commit #232
49 changed files with 195 additions and 145 deletions
2
.github/ISSUE_TEMPLATE/dataset-request.yml
vendored
2
.github/ISSUE_TEMPLATE/dataset-request.yml
vendored
|
|
@ -10,7 +10,7 @@ body:
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
Fill in this form if you want that junifer includes a new dataset.
|
Fill in this form if you want that junifer includes a new dataset.
|
||||||
|
|
||||||
As a reminder, junifer supports customising the `PatternDataGrabber` and `PatternDataladDatagrabber` which should work in most cases.
|
As a reminder, junifer supports customising the `PatternDataGrabber` and `PatternDataladDatagrabber` which should work in most cases.
|
||||||
|
|
||||||
If it is a widely used dataset, we could alternatevely create a new _DataGrabber_ that simplifies the usage, by already configuring the underlying `PatternDataGrabber` or `PatternDataladDatagrabber`
|
If it is a widely used dataset, we could alternatevely create a new _DataGrabber_ that simplifies the usage, by already configuring the underlying `PatternDataGrabber` or `PatternDataladDatagrabber`
|
||||||
|
|
|
||||||
2
.github/workflows/ci-docs.yml
vendored
2
.github/workflows/ci-docs.yml
vendored
|
|
@ -47,4 +47,4 @@ jobs:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
flags: docs
|
flags: docs
|
||||||
if: success() && matrix.python-version == 3.10
|
if: success() && matrix.python-version == 3.10
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -134,4 +134,4 @@ cython_debug/
|
||||||
|
|
||||||
junifer/_version.py
|
junifer/_version.py
|
||||||
scratch/
|
scratch/
|
||||||
junifer_jobs/
|
junifer_jobs/
|
||||||
|
|
|
||||||
48
.pre-commit-config.yaml
Normal file
48
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
ci:
|
||||||
|
autofix_prs: false
|
||||||
|
autoupdate_commit_msg: "chore: bump pre-commit repositories"
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.4.0
|
||||||
|
hooks:
|
||||||
|
- id: check-ast
|
||||||
|
- id: check-docstring-first
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-toml
|
||||||
|
- id: debug-statements
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
args: [--markdown-linebreak-ext=md]
|
||||||
|
- repo: https://github.com/abravalheri/validate-pyproject
|
||||||
|
rev: v0.12.2
|
||||||
|
hooks:
|
||||||
|
- id: validate-pyproject
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 23.3.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
exclude: ^(docs/|examples/|tools/)
|
||||||
|
args: [--check]
|
||||||
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
|
rev: v0.0.267
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
exclude: ^(__init__.py)
|
||||||
|
args: [--format, grouped, --show-fixes]
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: v2.2.4
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
exclude: ^(.github/|docs/)
|
||||||
|
args: [--config, tox.ini]
|
||||||
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||||
|
rev: v1.10.0
|
||||||
|
hooks:
|
||||||
|
- id: python-no-eval
|
||||||
|
- id: python-no-log-warn
|
||||||
|
- id: rst-backticks
|
||||||
|
- id: rst-directive-colons
|
||||||
|
- id: rst-inline-touching-normal
|
||||||
|
|
@ -648,4 +648,4 @@ specific requirements.
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
<<http://www.gnu.org/licenses/>>.
|
<<http://www.gnu.org/licenses/>>.
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||

|

|
||||||
[](https://github.com/psf/black)
|
[](https://github.com/psf/black)
|
||||||
[](https://github.com/charliermarsh/ruff)
|
[](https://github.com/charliermarsh/ruff)
|
||||||
|
[](https://github.com/pre-commit/pre-commit)
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,4 @@ flag_management:
|
||||||
threshold: 1%
|
threshold: 1%
|
||||||
- type: patch
|
- type: patch
|
||||||
target: 95%
|
target: 95%
|
||||||
threshold: 1%
|
threshold: 1%
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ clean:
|
||||||
local: news
|
local: news
|
||||||
make _build_local; STATUS=$$?; make news_cleanup; exit $$STATUS
|
make _build_local; STATUS=$$?; make news_cleanup; exit $$STATUS
|
||||||
|
|
||||||
news:
|
news:
|
||||||
@echo "Generating whats_new.rst"
|
@echo "Generating whats_new.rst"
|
||||||
cd ../ && towncrier build --keep
|
cd ../ && towncrier build --keep
|
||||||
|
|
||||||
|
|
|
||||||
2
docs/_static/css/custom.css
vendored
2
docs/_static/css/custom.css
vendored
|
|
@ -43,4 +43,4 @@ body:not([data-theme="light"]) .mermaid svg .edgeLabel {
|
||||||
body:not([data-theme="light"]) .mermaid svg .marker{
|
body:not([data-theme="light"]) .mermaid svg .marker{
|
||||||
stroke: white !important;
|
stroke: white !important;
|
||||||
fill: white !important;
|
fill: white !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
docs/_static/js/custom.js
vendored
2
docs/_static/js/custom.js
vendored
|
|
@ -11,4 +11,4 @@ for (i = 0; i < coll.length; i++) {
|
||||||
content.style.display = "block";
|
content.style.display = "block";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
docs/_templates/versions.html
vendored
2
docs/_templates/versions.html
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="sidebar-tree">
|
<div class="sidebar-tree">
|
||||||
<p class="version-select">
|
<p class="version-select">
|
||||||
<span class="caption-text">Other Versions</span>
|
<span class="caption-text">Other Versions</span>
|
||||||
</p>
|
</p>
|
||||||
<div id="versions">
|
<div id="versions">
|
||||||
{% if versions.branches %}
|
{% if versions.branches %}
|
||||||
<span class="caption-text">{{ _('Branches') }}</span>
|
<span class="caption-text">{{ _('Branches') }}</span>
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ Configs
|
||||||
External
|
External
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
nilearn.rst
|
nilearn.rst
|
||||||
|
|
|
||||||
2
docs/changes/newsfragments/.gitignore
vendored
2
docs/changes/newsfragments/.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Improve general prose, formatting and code blocks in docs and set line length for ``.rst`` files to 80 by `Synchon Mandal`_
|
Improve general prose, formatting and code blocks in docs and set line length for ``.rst`` files to 80 by `Synchon Mandal`_
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Rename ``junifer.testing.datagrabbers.SPMAuditoryTestingDatagrabber`` to :class:`.SPMAuditoryTestingDataGrabber` and ``junifer.testing.datagrabbers.OasisVBMTestingDatagrabber`` to :class:`.OasisVBMTestingDataGrabber` by `Synchon Mandal`_
|
Rename ``junifer.testing.datagrabbers.SPMAuditoryTestingDatagrabber`` to :class:`.SPMAuditoryTestingDataGrabber` and ``junifer.testing.datagrabbers.OasisVBMTestingDatagrabber`` to :class:`.OasisVBMTestingDataGrabber` by `Synchon Mandal`_
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Rename instances of "Datagrabber" to "DataGrabber" especially in ``junifer.testing`` to be consistent by `Synchon Mandal`_
|
Rename instances of "Datagrabber" to "DataGrabber" especially in ``junifer.testing`` to be consistent by `Synchon Mandal`_
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Enable YAML 1.2 support and allow multiline strings in YAML which would not work earlier by `Synchon Mandal`_
|
Enable YAML 1.2 support and allow multiline strings in YAML which would not work earlier by `Synchon Mandal`_
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Use ``ruamel.yaml`` instead of ``pyyaml`` as YAML I/O library by `Synchon Mandal`_
|
Use ``ruamel.yaml`` instead of ``pyyaml`` as YAML I/O library by `Synchon Mandal`_
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Adopt ``ruff`` as the only linter for the codebase by `Synchon Mandal`_
|
Adopt ``ruff`` as the only linter for the codebase by `Synchon Mandal`_
|
||||||
|
|
|
||||||
1
docs/changes/newsfragments/232.misc
Normal file
1
docs/changes/newsfragments/232.misc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Adopt ``pre-commmit`` for adding and managing git pre-commit hooks by `Synchon Mandal`_
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue