Repository: nilearn/nilearn

Issue:
[DOC] order of contributors
Adding the citation.cff allows to "cite" nilearn from the github UI in bibtex or APA format. 
See below.

By default it will list contributors in the order they appear in the citation.cff file: so alphabetically for now.

Opening an issue to discuss if we want a different order and if so which one.


```bibtex
@software{Chamma_nilearn,
author = {Chamma, Ahmad and Frau-Pascual, Aina and Rothberg, Alex and Abadie, Alexandre and Abraham, Alexandre and Gramfort, Alexandre and Savio, Alexandre and Thual, Alexis and Kanaan, Amadeus and Pinho, Ana Luisa and Idrobo, Andrés Hoyos and Kieslinger, Anne-Sophie and Rokem, Ariel and Mensch, Arthur and Duran, Audrey and Cipollini, Ben and Thirion, Bertrand and Nguyen, Binh and Cakan, Caglar and Gorgolewski, Chris and Markiewicz, Chris and Horea, Christian and Gerloff, Christian and Reininger, Colin and Lane, Connor and Delettre, Céline and Gale, Dan and Gomez, Daniel and Bzdok, Danilo and Ellis, David G and Wassermann, Demian and Pisner, Derek and Orfanos, Dimitri Papadopoulos and DuPre, Elizabeth and Dohmatob, Elvis and Larson, Eric and Edmond, Evan and Pedregosa, Fabian and Liem, Franz and Varoquaux, Gael and Hollander, Gilles de and Kiar, Greg and Gilmore, Greydon and Lemaitre, Guillaume and Wang, Hao-Ting and Aggarwal, Himanshu and Abenes, Ian and Vogel, Jake and Margeta, Jan and Grobler, Jaques and Gors, Jason and Rasero, Javier and Kossaifi, Jean and King, Jean-Rémi and Dalenberg, Jelle Roelof and Lefort-Besnard, Jeremy and Dockes, Jerome and Chevalier, Jerome-Alexis and Wiesner, Johannes and Gorrono, Jon Haitz Legarreta and Sassenhagen, Jona and Teves, Joshua and Huntenburg, Julia and Peraza, Julio A and Daddy, Kamalakar Reddy and Sitek, Kevin and Helwegen, Koen and Shmelkov, Konstantin and Chawla, Kshitij and CHEN, Kun and Sasse, Leonard and Estève, Loic and Tetrel, Loic and Paz, Luz and Pietrantoni, Manon and Perez-Guevara, Martin and Wegrzyn, Martin and Goncalves, Mathias and Ekman, Matthias and Joulot, Matthieu and Rahim, Mehdi and Eickenberg, Michael and Hanke, Michael and Notter, Michael and Waskom, Michael and Wang, Michelle and Torabi, Mohammad and Boos, Moritz and Song, Myeong Seop and Clarke, Natasha and Shah, Neelay and Gensollen, Nicolas and Esteban, Oscar and Bogdan, Paul and Sanz-Leon, Paula and Herholz, Peer and Gervais, Philippe and Bellec, Pierre and Glaser, Pierre and Quirion, Pierre-Olivier and Raamana, Pradeep Reddy and Meudec, Raphael and Luke, Robert and Williamson, Robert and Guidotti, Roberto and Phlypo, Ronald and Hammonds, Ryan and Gau, Rémi and Patalasingh, Sachin and Hahn, Sage and Bougacha, Salma and Johnson, Sam Buck and Jawhar, Sami and Steinkamp, Simon and Singh, Sourav and Meisler, Steven and Lan, Sylvain and Takerkart, Sylvain and Samanta, Tarun and Salo, Taylor and Bazeille, Thomas and Vanasse, Tom and Diogo, Vasco and Michel, Vincent and Fritsch, Virgile and Halchenko, Yaroslav and Mzayek, Yasmin and Baratz, Zvi and Nájera, Óscar},
license = {BSD-4-Clause},
title = {{nilearn}},
url = {https://github.com/nilearn/nilearn}
}
```


Discussion:
Note sure we want a different order.
Good with me but preferred to open an issue just to be sure we made the decision explicit.
Maybe we can briefly discuss this at the next dev meeting just to make sure we are all on the same page.
I wonder if we could do something like astropy [has proposed](https://github.com/astropy/astropy/pull/14896/files#diff-9b9f76394a441ff40bf8d7a0f3e0ddd7ae97abfa9a9a6abaedccf76dc4d51295R33-R34), where the first author is "Nilearn developers" or "Nilearn collaboration" or something similar. 
Needs time investment to get all the information in a consistent manner (and then to maintain it), but it looks like the right thing to do. 
I like consortium authorships, so I am in favor of this.

Resolving patch:
diff --git a/maint_tools/citation_cff_maint.py b/maint_tools/citation_cff_maint.py
--- a/maint_tools/citation_cff_maint.py
+++ b/maint_tools/citation_cff_maint.py
@@ -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()
@@ -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()


Test patch: