Skip to content

Authors without an ORCID are not supported #10

Description

@dxL1nus

My current example for my CODECHECK:

paper:
  title: "A scientific paper to be codechecked"
  authors:
    - name: Some One
      ORCID: 0123-4567-8910-1112
    - name: An Author
    - name: Co Author
    - name: Different Author
    - name: The Last Author
      ORCID: 0123-4567-8910-1112
  reference: https://doi.org/...

Error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[5], line 1
----> 1 check.summary_table()

File ~/.../certificate-2025-023/codecheck/codecheck.py:95, in Codecheck.summary_table(self)
     85         """
     86         Markdown table with the general information (title, authors, etc.) from the `codecheck.yml`
     87         file.
     88         """
     89         summary_header = """
     90 Item | Value
     91 :--- | :----
     92 """
     93         summary_rows = [
     94             f"Title | *{self.conf['paper']['title']}*",
---> 95             f"Authors | {', '.join([name_orcid(a) for a in self.conf['paper']['authors']])}",
     96             f"Reference | [{self.conf['paper']['reference'].split('://')[1]}]({self.conf['paper']['reference']})",
     97             f"Repository | [{self.conf['repository'].split('://')[1]}]({self.conf['repository']})",
     98             f"Codechecker | {name_orcid(self.conf['codechecker'])}",
     99             f"Date of check | {datetime.fromisoformat(self.conf['check_time']).date()}",
    100             f"Summary | {self.conf['summary'].strip()}",
    101         ]
    102         return Markdown(summary_header + "\n".join(summary_rows))

File ~/.../certificate-2025-023/codecheck/codecheck.py:18, in name_orcid(entry)
     16 def name_orcid(entry):
     17     """Helper function for Name + ORCID"""
---> 18     return f"{entry['name']} (ORCID: [{entry['ORCID']}](https://orcid.org/{entry['ORCID']}))"

KeyError: 'ORCID'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions