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

Contributor Roles Taxonomy #491

Open
habi opened this issue Mar 9, 2023 · 3 comments
Open

Contributor Roles Taxonomy #491

habi opened this issue Mar 9, 2023 · 3 comments

Comments

@habi
Copy link

habi commented Mar 9, 2023

I'm preparing a document in which I'd like to add the CRediT.
I'm adding the roles as a small table, based on the display here: https://github.com/Pseudomanifold/latex-credits

It would be nicecool, if the CRediT roles could be put into the author metadata file somehow.

@agitter
Copy link
Member

agitter commented Mar 9, 2023

I like that tabular display. Perhaps that could be logged as a future Manubot feature idea?

For now, it is possible to use the metadata file to track CRediT roles and list them in a regular table after the manuscript. We did that in https://github.com/greenelab/covid19-review

See the contributions: in metadata.yaml and 70.coi-contribs.md that writes the table. The contributions are free text and not constrained to recognized CRediT roles.

@habi
Copy link
Author

habi commented Mar 10, 2023

and list them in a regular table after the manuscript

For now I manually generated a table in Markdown, but having the contributions tracked in the metadata file and automatically generating them from there is so much nicer.

habi added a commit to habi/EAWAG-manuscript that referenced this issue Mar 10, 2023
As suggested here: manubot/rootstock#491 (comment)
For the moment, we display it as manually generated table in 05.credit.md
@dhimmel
Copy link
Member

dhimmel commented Dec 30, 2023

Just noting what we did for author roles at greenelab/xswap-manuscript@ad40823 and greenelab/xswap-manuscript@2a8cc8f. Here's the markdown / jinja2 template for generating a contribution summary based on metadata roles:

Author contributions are noted here according to [CRediT](https://credit.niso.org/) (Contributor Roles Taxonomy).
{%- set roles = {} -%}
{%- for author in manubot.authors -%}
  {% for role in author.get('roles', []) -%}
    {%- if role in roles -%}
      {% set _ = roles[role].append(author.initials) %}
    {%- else -%}
      {% set _ = roles.update({role: [author.initials]}) %}
    {%- endif -%}
  {%- endfor -%}
{%- endfor %}
{% for role, author_initials in roles.items() -%}
{% if author_initials|length > 2 %}
  {{- role }} by {{ ', '.join(author_initials[:-1]) }}, and {{ author_initials[-1] }}.
{% elif author_initials|length == 2 %}
  {{- role }} by {{ ' and '.join(author_initials) }}.
{% else %}
  {{- role }} by {{ author_initials[0] }}.
{%- endif -%}
{%- endfor %}

Which rendered as:

Author contributions are noted here according to CRediT (Contributor Roles Taxonomy). Conceptualization by MZ, DSH, KAK, and CSG. Data curation by MZ and DSH. Formal analysis by MZ and DSH. Investigation by MZ, DSH, MWN, and CSG. Methodology by MZ, DSH, KAK, CW, and CSG. Project administration by MZ, DSH, and CSG. Software by MZ, DSH, and CW. Visualization by MZ and DSH. Writing – original draft by MZ.Writing – review & editing by MZ, DSH, and CSG. Resources by DSH, MWN, and CSG. Supervision by DSH and CSG. Funding acquisition by CSG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants