force11 / force11-sciwg

FORCE11 Software Citation Implementation Working Group
https://www.force11.org/group/software-citation-implementation-working-group
BSD 3-Clause "New" or "Revised" License
56 stars 19 forks source link

Creating tooling which generates a citation for a code repository #26

Open npch opened 7 years ago

npch commented 7 years ago

There are many situations where we wish to generate a citation for a piece of software being developed in a code repository such as GitHub, GitLab or BitBucket.

In this case, we must decide what metadata can be automatically harvested from the repo info (following CodeMeta concepts), what format the file (CITATION.md, codemeta.json) should be in.

ljhwang commented 7 years ago

In our GitHub repo, we have created web hooks from zenodo and appreciate the ongoing efforts between the groups (CodeMeta & zenodo) so we only have to maintain one json

Best, -Lorraine


Lorraine Hwang, Ph.D. Associate Director, CIG 530.752.3656

On Oct 25, 2017, at 1:25 AM, Neil Chue Hong notifications@github.com wrote:

There are many situations where we wish to generate a citation for a piece of software being developed in a code repository such as GitHub or BitBucket.

In this case, we must decide what metadata can be automatically harvested from the repo info (following CodeMeta concepts), what format the file (CITATION.md, codemeta.json) should be in.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/force11/force11-sciwg/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AESQX_qVgvLrDcfbltUgBdG7yNbqy_7Yks5svvB8gaJpZM4QFnVU.

npch commented 7 years ago

In conversation with @lnielsen we broke this into the following tasks:

We need to take a decision as to whether this is best represented as a website or a command line tool, or both.

As added tasks, we should check that this follows the Software Citation principles by:

zuphilip commented 7 years ago

@mfenner and I created a Zotero translator for GitHub which can be used over the Wikipedia's API, e.g. https://en.wikipedia.org/api/rest_v1/data/citation/zotero/https%3A%2F%2Fgithub.com%2Faurimasv%2Fz2csl results in

[
  {
    "itemType": "computerProgram",
    "creators": [
      {
        "firstName": "Aurimas",
        "lastName": "Vinckevicius",
        "creatorType": "author"
      }
    ],
    "notes": [],
    "tags": [],
    "url": "https://github.com/aurimasv/z2csl",
    "title": "z2csl: Zotero extension for creating Zotero to CSL item type and field mappings",
    "libraryCatalog": "GitHub",
    "programmingLanguage": "JavaScript",
    "extra": "original-date: 2012-05-20T07:53:58Z",
    "date": "2017-03-24",
    "accessDate": "2017-10-25",
    "shortTitle": "z2csl"
  }
]

Not sure if this helps here directly...

danielskatz commented 7 years ago

In a blog about a month ago, I wrote:

The first time I heard this, it was suggested by Martin Fenner, based on work done in the CodeMeta project, which has the goal of creating a minimal metadata schema for science software and code, in JSON and XML. Martin provided an example of how this could be done: the codemeta.json file in the repository https://github.com/datacite/maremma. According to Martin, the process by which DataCite today could generate a DOI and a citation from this is semi-manual and involves using https://github.com/datacite/bolognese for DataCite XML generation.

It still seems like bolognese would help here. It could convert Codemeta to DataCite XML, which then seems like to could be converted to almost anything using the crosscite tools

But maybe I'm missing something from the other side of the world...

arfon commented 7 years ago
  • using GitHub API, create a tool that takes a repo URL and autogenerate a codemeta.json that can be downloaded / copied

Code-spike from ~2 years ago by yours truly to try and solve this problem https://github.com/arfon/metamatter

arfon commented 7 years ago

Also, on this point:

  • using appropriate hooks enable this to generate a pull request that adds the codemeta.json file to the repo

Please make sure you don't write an automated script to do this (e.g. a bot opening hundreds/thousands of pull requests to repos) as this would be considered spammy behaviour by GitHub. It's completely fine to generate a tool to make it easy to open pull requests but there should always be a human involved in the actual process.