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

[ENH] use citation.cff to store affiliations of authors #3754

Merged
merged 22 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Uses flake8 tool to verify code is PEP8 compliant. Configured in [.flake8](/.fla

### f_strings.yml

Checks for f strings in the codebase with [flynt](https://pypi.org/project/flynt/).
Checks for f strings in the codebase with [flynt](https://pypi.org/project/flynt/).
Configured in [pyproject.toml](/pyproject.toml)
Flynt will check if it automatically convert "format" or "%" strings to "f strings".
This workflow will fail if it finds any potential target to be converted.
Expand Down Expand Up @@ -130,3 +130,11 @@ This aims to detect tests that are not properly isolated from each other (test p
### update_precommit_hooks.yml

Runs weekly to check for updates in versions of precommit hooks and creates a pull request automatically to apply updates.

## Update authors

### update_authors.yml

If the CITATION.CFF file is modified,
this workflow will run to update the AUTHORS file
and the and doc/changes/names.rst file.
5 changes: 5 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ jobs:
nilearn_data/spm_multimodal_fmri
key: v1-spm_multimodal_fmri-${{ hashFiles('week_num') }}

# Update the authors file and the names file
# in case a contributor has been added to citation.cff
# but did not run the maint_tools/citation_cff_maint.py script.
- name: update AUTHORS.rst and doc/changes/names.rst
run: python maint_tools/citation_cff_maint.py
Comment on lines +261 to +265
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since running citation_cff_maint.py is automated can we keep the instructions simple for 1st time contributors so all they have to do is add their names to citation.cff ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup I was thinking about that too: will update

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the contributing.rst also with an example of what to add in the citation.cff

# Run the doc build. If no data is restored in previous steps, the data
# will be downloaded during the build (this only applies for full builds;
# no data is downloaded for partial builds).
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/update_authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# github action to update AUTHORS.rst file if CITATION.cff is updated
name: update authors

on:
push:
branches:
- "main"

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

jobs:
update_authors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: install dependencies
run: python -m pip install --upgrade pip ruamel.yaml

- name: update AUTHORS.rst and doc/changes/names.rst
run: python maint_tools/citation_cff_maint.py

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: update AUTHORS.rst and doc/changes/names.rst
base: main
token: ${{ secrets.GITHUB_TOKEN }}
delete-branch: true
title: '[BOT] update AUTHORS.rst and doc/changes/names.rst'
body: 'done via this [GitHub Action](https://github.com/${{ github.repository_owner }}/nilearn/blob/main/.github/workflows/update_authors.yml)'
23 changes: 23 additions & 0 deletions .github/workflows/validation_cff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: validation of citation.cff

on:
push:
branches: ['*']
pull_request:
branches: ['*']

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

jobs:

validate_cff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: --validate
126 changes: 121 additions & 5 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ An up-to-date list of contributors can be seen in on

Additional credit goes to `Michael Hanke`_ and `Yaroslav Halchenko`_ for data and packaging.

.. CORE DEV SECTION STARTS HERE
The Core developers section is added automatically
and should not be edited manually.

.. _core_devs:

Core developers
Expand All @@ -33,36 +37,148 @@ The nilearn core developers are:
* `Taylor Salo`_
* `Yasmin Mzayek`_

.. CORE DEV SECTION ENDS HERE

.. OTHER CONTRIBUTION SECTION STARTS HERE
The Other contributors section is added automatically
and should not be edited manually.

Other contributors
..................

Some other past or present contributors are:

* `Alexandre Gramfort`_
* `Binh Nguyen`_
* `Gael Varoquaux`_
* `Julia Huntenburg`_
* `Thomas Bazeille`_
* `Ahmad Chamma`_
* `Aina Frau-Pascual`_
* `Alex Rothberg`_
* `Alexandre Abadie`_
* `Alexandre Abraham`_
* `Alexandre Gramfort`_
* `Alexandre Savio`_
* `Alexis Thual`_
* `Amadeus Kanaan`_
* `Ana Luisa Pinho`_
* `Andrés Hoyos Idrobo`_
* `Anne-Sophie Kieslinger`_
* `Ariel Rokem`_
* `Arthur Mensch`_
* `Audrey Duran`_
* `Ben Cipollini`_
* `Bertrand Thirion`_
* `Binh Nguyen`_
* `Caglar Cakan`_
* `Chris Gorgolewski`_
* `Chris Markiewicz`_
* `Christian Horea`_
* `Christian Gerloff`_
* `Colin Reininger`_
* `Connor Lane`_
* `Céline Delettre`_
* `Dan Gale`_
* `Daniel Gomez`_
* `Danilo Bzdok`_
* `David G Ellis`_
* `Demian Wassermann`_
* `Derek Pisner`_
* `Dimitri Papadopoulos Orfanos`_
* `Elizabeth DuPre`_
* `Elvis Dohmatob`_
* `Eric Larson`_
* `Evan Edmond`_
* `Fabian Pedregosa`_
* `Franz Liem`_
* `Gael Varoquaux`_
* `Gilles de Hollander`_
* `Greg Kiar`_
* `Greydon Gilmore`_
* `Guillaume Lemaitre`_
* `Hao-Ting Wang`_
* `Himanshu Aggarwal`_
* `Ian Abenes`_
* `Jake Vogel`_
* `Jan Margeta`_
* `Jaques Grobler`_
* `Jason Gors`_
* `Javier Rasero`_
* `Jean Kossaifi`_
* `Jean-Rémi King`_
* `Jelle Roelof Dalenberg`_
* `Jeremy Lefort-Besnard`_
* `Jerome Dockes`_
* `Jerome-Alexis Chevalier`_
* `Johannes Wiesner`_
* `Jon Haitz Legarreta Gorrono`_
* `Jona Sassenhagen`_
* `Joshua Teves`_
* `Julia Huntenburg`_
* `Julio A Peraza`_
* `Kamalakar Reddy Daddy`_
* `Kevin Sitek`_
* `Koen Helwegen`_
* `Konstantin Shmelkov`_
* `Kshitij Chawla`_
* `Kun CHEN`_
* `Leonard Sasse`_
* `Loic Estève`_
* `Loic Tetrel`_
* `Luz Paz`_
* `Manon Pietrantoni`_
* `Martin Perez-Guevara`_
* `Martin Wegrzyn`_
* `Mathias Goncalves`_
* `Matthias Ekman`_
* `Matthieu Joulot`_
* `Mehdi Rahim`_
* `Michael Eickenberg`_
* `Michael Hanke`_
* `Michael Notter`_
* `Michael Waskom`_
* `Michelle Wang`_
* `Mohammad Torabi`_
* `Moritz Boos`_
* `Myeong Seop Song`_
* `Natasha Clarke`_
* `Neelay Shah`_
* `Nicolas Gensollen`_
* `Oscar Esteban`_
* `Paul Bogdan`_
* `Paula Sanz-Leon`_
* `Peer Herholz`_
* `Philippe Gervais`_
* `Pierre Bellec`_
* `Pierre Glaser`_
* `Pierre-Olivier Quirion`_
* `Pradeep Reddy Raamana`_
* `Raphael Meudec`_
* `Robert Luke`_
* `Robert Williamson`_
* `Roberto Guidotti`_
* `Ronald Phlypo`_
* `Ryan Hammonds`_
* `Rémi Gau`_
* `Sachin Patalasingh`_
* `Sage Hahn`_
* `Salma Bougacha`_
* `Sam Buck Johnson`_
* `Sami Jawhar`_
* `Simon Steinkamp`_
* `Sourav Singh`_
* `Steven Meisler`_
* `Sylvain Lan`_
* `Sylvain Takerkart`_
* `Tarun Samanta`_
* `Taylor Salo`_
* `Thomas Bazeille`_
* `Tom Vanasse`_
* `Vasco Diogo`_
* `Vincent Michel`_
* `Virgile Fritsch`_
* `Yaroslav Halchenko`_
* `Yasmin Mzayek`_
* `Zvi Baratz`_
* `Óscar Nájera`_

.. OTHER CONTRIBUTION SECTION ENDS HERE

Funding
.......
Expand Down