Skip to content

Commit

Permalink
[MAINT] Update contributor table generator style (#1805)
Browse files Browse the repository at this point in the history
* chore(code-style): Rewrite f-strings in print_contributors.py to outrage flake8 less

* chore(render): Rerender contributors.md

* chore(style): Ignore linting errors in auto-generated table
  • Loading branch information
effigies authored Apr 25, 2024
1 parent b5fd938 commit cbb94e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
13 changes: 7 additions & 6 deletions src/appendices/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ecosystem (in alphabetical order).
If you contributed to the BIDS ecosystem and your name is not listed, please add it.

<!-- THE SECTION BELOW IS AUTOMATICALLY GENERATED -->
<!--lint ignore -->

| name | contributions |
| ---------------------------------------------------- | -------------------------------------- |
Expand Down Expand Up @@ -121,7 +122,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Dianne Patterson | πŸ“– |
| Dimitri Papadopoulos Orfanos | πŸ“–πŸ’‘πŸ€”πŸ’¬πŸ’» |
| Dmitry Petrov | πŸ“–πŸ’» |
| Dora Hermes | πŸ“–πŸ’»βœ…πŸ”πŸ€” |
| Dora Hermes | πŸ“–πŸ’»βœ…πŸ”πŸ€” |
| Dorien Huijser | πŸ“– |
| Douglas N. Greve | πŸ“– |
| Duncan Macleod | πŸ“–πŸš‡ |
Expand Down Expand Up @@ -194,7 +195,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Jeanette Mumford | πŸ“– |
| Jefferson Casimir | πŸ”§ |
| Jeffrey G. Ojemann | πŸ“– |
| Jeffrey S. Grethe | πŸ’¬πŸ›βœ…πŸ“’πŸ’» |
| Jeffrey S. Grethe | πŸ’¬πŸ›βœ…πŸ“’πŸ’» |
| JegouA | πŸ’» |
| Jelle Dalenberg | πŸ“– |
| Jeremy Moreau | πŸ“–πŸ’‘ |
Expand All @@ -211,7 +212,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Jose Manuel Saborit | πŸ“– |
| Joseph Wexler | πŸ“–πŸ’‘ |
| Joseph Woods | πŸ“– |
| Julia Guiomar Niso GalΓ‘n | πŸ€”πŸŽ¨πŸ”πŸ‘€πŸ“‹πŸ“πŸ”§πŸ›πŸ’»πŸ”£βœ…πŸ’¬πŸ“–πŸ’‘πŸ“’ |
| Julia Guiomar Niso GalΓ‘n | πŸ€”πŸŽ¨πŸ”πŸ‘€πŸ“‹πŸ“πŸ”§πŸ›πŸ’»πŸ”£βœ…πŸ’¬πŸ“–πŸ’‘πŸ“’ |
| Julia Sprenger | πŸ“– |
| Julien Cohen-Adad | πŸ“–πŸ”£πŸ€” |
| Julius Welzel | πŸ“–πŸ’‘πŸ›πŸ’»πŸ”£πŸ€”πŸ’¬πŸ““ |
Expand Down Expand Up @@ -269,7 +270,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Michael Hanke | πŸ“–πŸ€”πŸ”§πŸ›πŸ“’ |
| Michael P. Harms | πŸ“–βš οΈπŸ”§ |
| Michael P. Milham | πŸ’‘πŸ” |
| Michael P. Notter | πŸ’¬πŸ“βœ…πŸ“’πŸ“– |
| Michael P. Notter | πŸ’¬πŸ“βœ…πŸ“’πŸ“– |
| Michael Schirner | πŸ“– |
| MikaΓ«l Naveau | πŸ› |
| Nader Pouratian | πŸ“– |
Expand All @@ -288,7 +289,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Patricia Clement | πŸ’¬πŸ›πŸ’»πŸ“–πŸ”£πŸ’‘πŸ“‹πŸ€”πŸ“†βš οΈπŸ“’ |
| Patrick Park | πŸ“–πŸ’‘πŸ’¬πŸ’» |
| Paule-Joanne Toussaint | πŸ“– |
| Peer Herholz | πŸ’¬πŸ“–πŸ‘€πŸ”§βœ…πŸ“’ |
| Peer Herholz | πŸ’¬πŸ“–πŸ‘€πŸ”§βœ…πŸ“’ |
| Petra Ritter | πŸ“– |
| Pierre Rioux | πŸ“– |
| Pieter Vandemaele | πŸ“–πŸ’» |
Expand Down Expand Up @@ -318,7 +319,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
| Shashank Bansal | πŸ“– |
| Sjoerd B. Vos | πŸ“– |
| Soichi Hayashi | πŸ“–πŸ”§πŸ› |
| Stefan Appelhoff | πŸ“–πŸ’¬πŸ€”πŸ›πŸ’‘πŸ’»πŸ‘€βš οΈπŸ“’βœ…πŸ”§πŸ”ŒπŸ“πŸš§πŸ”£ |
| Stefan Appelhoff | πŸ“–πŸ’¬πŸ€”πŸ›πŸ’‘πŸ’»πŸ‘€βš οΈπŸ“’βœ…πŸ”§πŸ”ŒπŸ“πŸš§πŸ”£ |
| Stephan Bickel | πŸ“– |
| Steven Meisler | πŸ›πŸ’»πŸ’¬πŸ”§πŸ““ |
| Suyash Bhogawar | πŸ“–πŸ’‘βš οΈπŸ”§πŸ’¬ |
Expand Down
20 changes: 9 additions & 11 deletions tools/print_contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,23 @@


def contributor_table_header(max_name_length, max_contrib_length):
return f"""| name{" " * (max_name_length-4)} | contributions{" " * (max_contrib_length-13)} |
| {"-" * max_name_length} | {"-"*max_contrib_length} |
return f"""\
| {"name":<{max_name_length}} | {"contributions":<{max_contrib_length}} |
| {"":-<{max_name_length}} | {"":-<{max_contrib_length}} |
"""


def create_line_contributor(
contributor: dict[str, str], max_name_length: int, max_contrib_length: int
):
name = contributor["name"]
emap = emoji_map()
contributions = "".join(
emoji.emojize(emap[cont]) for cont in contributor["contributions"]
)

line = f"| {name}{' '*(max_name_length-len(name))} | "

nb_contrib = len(contributor["contributions"]) * 2
for contrib in contributor["contributions"]:
line += emoji.emojize(emoji_map()[contrib])

line += f"{' '*(max_contrib_length-nb_contrib)} |\n"

return line
pad = max_contrib_length - len(contributor["contributions"]) * 2
return f"| {name:<{max_name_length}} | {contributions}{'':<{pad}} |\n"


def main():
Expand Down

0 comments on commit cbb94e1

Please sign in to comment.