-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STYLE: Transition to
ruff
for code formatting
Transition to `ruff` for code formatting in line with the rest of the `nipreps` repositories. Drop the flake8 `W503` rule, which is not implemented by `ruff`. Add a GHA workflow to ensure that contributions not complying with the style are detected. Format the source code accordingly.
- Loading branch information
1 parent
a8b3927
commit d8f3beb
Showing
39 changed files
with
424 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Contribution checks | ||
on: [push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
stable: | ||
name: Run ruff | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Set up Python 3 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3 | ||
|
||
- name: Install and run pre-commit hooks | ||
uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ Christopher J. Markiewicz <[email protected]> | |
Christopher J. Markiewicz <[email protected]> <[email protected]> | ||
Christopher J. Markiewicz <[email protected]> <[email protected]> | ||
Conrad Ma <[email protected]> | ||
Conrad Ma <[email protected]> Conrad | ||
Conrad Ma <[email protected]> 394822740 | ||
Conrad Ma <[email protected]> Conrad | ||
Conrad Ma <[email protected]> 394822740 | ||
Conrad Ma <[email protected]> <[email protected]> | ||
Conrad Ma <[email protected]> <[email protected]> | ||
Dylan Nielson <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
click | ||
fuzzywuzzy | ||
fuzzywuzzy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
# To install the git pre-commit hook run: | ||
# pre-commit install | ||
# To update the pre-commit hooks run: | ||
# pre-commit install-hooks | ||
|
||
exclude: | | ||
(?x)^( | ||
docs/_static/.*| | ||
nireports/tests/data/.*| | ||
nireports/assembler/data/tests/work/.*| | ||
nireports/assembler/data/tests/crashfile.txt| | ||
nireports/assembler/data/.*\.tpl | ||
)$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-vcs-permalinks | ||
- id: pretty-format-json | ||
args: ['--autofix'] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-vcs-permalinks | ||
- id: pretty-format-json | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.4 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,77 @@ | ||
{ | ||
"title": "NiReports: the NiPreps' reporting and visualization tools", | ||
"description": "<p>The visual report system (VRS) of <em>NiPreps</em>.</p>", | ||
"creators": [ | ||
{ | ||
"orcid": "0000-0001-8435-6191", | ||
"affiliation": "Lausanne University Hospital and University of Lausanne, Lausanne, Switzerland", | ||
"name": "Oscar Esteban" | ||
}, | ||
{ | ||
"orcid": "0000-0002-3896-6906", | ||
"affiliation": "Department of Radiology, Lausanne University Hospital and University of Lausanne, Switzerland", | ||
"name": "Elodie Savary" | ||
}, | ||
{ | ||
"orcid": "0000-0003-3715-7012", | ||
"affiliation": "Department of Neuroimaging, Institute of Psychiatry, Psychology and Neuroscience, King's College London, London, UK", | ||
"name": "Eilidh MacNicol" | ||
}, | ||
{ | ||
"orcid": "0000-0002-1668-9629", | ||
"affiliation": "Department of Radiology, Lausanne University Hospital and University of Lausanne, Switzerland", | ||
"name": "C\u00e9line Provins" | ||
} | ||
], | ||
"contributors": [ | ||
{ | ||
"orcid": "0000-0002-6533-164X", | ||
"affiliation": "Department of Psychology, Stanford University, CA, USA", | ||
"name": "Christopher J. Markiewicz", | ||
"orcid": "0000-0002-6533-164X", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0001-7159-1387", | ||
"affiliation": "Sagol School of Neuroscience, Tel Aviv University, Tel Aviv, Israel", | ||
"name": "Zvi Baratz", | ||
"orcid": "0000-0001-7159-1387", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0002-7252-7771", | ||
"affiliation": "Department of Psychology, Stanford University, CA, USA", | ||
"name": "Mathias Goncalves", | ||
"orcid": "0000-0002-7252-7771", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0003-3007-1056", | ||
"affiliation": "Department of Psychology, Stanford University, CA, USA", | ||
"name": "Ross W. Blair", | ||
"orcid": "0000-0003-3007-1056", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0003-4613-6643", | ||
"affiliation": "Section on Clinical and Computational Psychiatry, National Institute of Mental Health, Bethesda, MD, USA", | ||
"name": "Dylan Nielson", | ||
"orcid": "0000-0003-4613-6643", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0001-8435-6191", | ||
"affiliation": "Department of Radiology, Lausanne University Hospital and University of Lausanne", | ||
"name": "Oscar Esteban", | ||
"orcid": "0000-0001-8435-6191", | ||
"type": "Researcher" | ||
}, | ||
{ | ||
"orcid": "0000-0001-6755-0259", | ||
"affiliation": "Department of Psychology, Stanford University, CA, USA", | ||
"name": "Russell A. Poldrack", | ||
"orcid": "0000-0001-6755-0259", | ||
"type": "Researcher" | ||
} | ||
], | ||
"creators": [ | ||
{ | ||
"affiliation": "Lausanne University Hospital and University of Lausanne, Lausanne, Switzerland", | ||
"name": "Oscar Esteban", | ||
"orcid": "0000-0001-8435-6191" | ||
}, | ||
{ | ||
"affiliation": "Department of Radiology, Lausanne University Hospital and University of Lausanne, Switzerland", | ||
"name": "Elodie Savary", | ||
"orcid": "0000-0002-3896-6906" | ||
}, | ||
{ | ||
"affiliation": "Department of Neuroimaging, Institute of Psychiatry, Psychology and Neuroscience, King's College London, London, UK", | ||
"name": "Eilidh MacNicol", | ||
"orcid": "0000-0003-3715-7012" | ||
}, | ||
{ | ||
"affiliation": "Department of Radiology, Lausanne University Hospital and University of Lausanne, Switzerland", | ||
"name": "C\u00e9line Provins", | ||
"orcid": "0000-0002-1668-9629" | ||
} | ||
], | ||
"description": "<p>The visual report system (VRS) of <em>NiPreps</em>.</p>", | ||
"keywords": [ | ||
"neuroimaging", | ||
"visualization", | ||
"nipreps" | ||
], | ||
"license": "Apache-2.0", | ||
"title": "NiReports: the NiPreps' reporting and visualization tools", | ||
"upload_type": "software" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Contributing to *nireports* | ||
|
||
*nireports* is a project of the [*NiPreps* Community, which specifies the contributing guidelines](https://www.nipreps.org/community/). | ||
*nireports* is a project of the [*NiPreps* Community, which specifies the contributing guidelines](https://www.nipreps.org/community/). |
Oops, something went wrong.