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

[MAINT] add consortium authorship #3969

Merged
merged 1 commit into from
Sep 13, 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
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Some other past or present contributors are:
* `Maximilian Cosmo Sitter`_
* `Mehdi Rahim`_: Air Liquide, France
* `Michael Eickenberg`_: Flatiron Institute, New-York, New-York, USA
* `Michael Hanke`_: Psycho­informatics, Forschungszentrum Jülich GmbH, Jülich, Germany
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removes a character with some "weird" encoding that made my VS code lose its mind

* `Michael Hanke`_: Psychoinformatics, Forschungszentrum Jülich GmbH, Jülich, Germany
* `Michael Notter`_: ams OSRAM, Martigny, Lausanne, Switzerland
* `Michael Waskom`_: Flatiron health, New York, USA
* `Michelle Wang`_: Origami lab, McGill University, Montréal, Canada
Expand Down
3 changes: 2 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ contact:
license: BSD-4-Clause

authors:
- family-names: Nilearn contributors
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@emdupre I went with the first thing that crossed my mind but happy to use anything else.

Copy link
Member

Choose a reason for hiding this comment

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

I think that's fine ! I'd say "developers", but I don't think this word choice is going to make or break the consortium idea :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so either. And we still have some time before the release in case we got a change of heart

- given-names: Ahmad
family-names: Chamma
website: https://github.com/achamma723
Expand Down Expand Up @@ -419,7 +420,7 @@ authors:
family-names: Hanke
website: https://github.com/mih
email: michael.hanke@gmail.com
affiliation: Psycho­informatics, Forschungszentrum Jülich GmbH, Jülich, Germany
affiliation: Psychoinformatics, Forschungszentrum Jülich GmbH, Jülich, Germany
orcid: https://orcid.org/0000-0001-6398-6370
- given-names: Michael
family-names: Notter
Expand Down
21 changes: 19 additions & 2 deletions maint_tools/citation_cff_maint.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,25 @@ def count_authors() -> int:
return nb_authors


def remove_consortium(authors: list[dict[str, str]]) -> list[dict[str, str]]:
"""Remove consortium from authors."""
authors = [
author
for author in authors
if author["family-names"] != "Nilearn contributors"
]
return authors


def add_consortium(authors: list[dict[str, str]]) -> list[dict[str, str]]:
"""Add consortium to authors."""
return [{"family-names": "Nilearn contributors"}] + authors


def main():
"""Update names.rst and AUTHORS.rst files."""
citation = read_citation_cff()
citation["authors"] = remove_consortium(citation["authors"])
citation["authors"] = sort_authors(citation["authors"])

nb_authors = count_authors()
Expand All @@ -192,10 +208,11 @@ def main():
# Sanity check to make sure we have not lost anyone
assert nb_authors <= new_nb_authors

write_citation_cff(citation)

write_authors_file(citation["authors"])

citation["authors"] = add_consortium(citation["authors"])
write_citation_cff(citation)


if __name__ == "__main__":
main()