Repository: scikit-hep/pyhf

Issue:
Add CodeMeta JSON-LD Context File
# Description

As part of an IRIS-HEP initiative to improve the citation quality/ease for all software it has been recommended by @danielskatz that projects:
- Track authors/contributors to software as it is developed
- Create a citation metadata file in the software repo and keep it up to date
- Link Github and Zenodo to get DOIs for major releases
- In the README and docs clearly says how to cite the software

`pyhf` already does all of this, as:
- [x] There is an [`AUTHORS` file](https://github.com/scikit-hep/pyhf/blob/31d34a0edd91593d75181cc3ad71563a52600793/AUTHORS) as well as a [listing of the authors in the docs](https://scikit-hep.org/pyhf/index.html#authors)
- [x] There is a [`.zenodo.json`](https://github.com/scikit-hep/pyhf/blob/2b0a1e2ba41a2aa1233511524e3aa78e696ead34/.zenodo.json) that formats Zenodo with the correct metadata and adds the ORCID of the authors
- [x] There is a Zenodo DOI that is kept in sync with our release schedule (almost) fully automatically (almost as it requires 1 button click). [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1169739.svg)](https://doi.org/10.5281/zenodo.1169739)
- [x] There is a Citation section in both the [`README`](https://github.com/scikit-hep/pyhf/blob/2b0a1e2ba41a2aa1233511524e3aa78e696ead34/README.rst#citation) and the [docs webpage](https://scikit-hep.org/pyhf/citations.html) with the preferred citation

It has been pointed out though that we should also look into adding a [CodeMeta Project JSON-LD Context File](https://codemeta.github.io/jsonld/) as with it

> zenodo will read [it] and will be basically the same as [schema.org](http://schema.org/) so that this will help google index software, and tools be able to use the metadata file in [softwareheritage.org](http://softwareheritage.org/) to automatically build a citation for a particular commit.

(cc @gordonwatts as this might be of interest)


Discussion:
As an example, the [`parsl` library has a `codemeta.json` file](https://github.com/Parsl/parsl/blob/master/codemeta.json).
tools to generate CodeMeta files are in https://codemeta.github.io/tools/
While it doesn't look to be very actively developed, it should be possible to add a GHA workflow to use [`codemetapy`](https://github.com/proycon/codemetapy) to automatically update the `codemeta.json` on release merges in the same way that we run `bumpversion`.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -65,7 +65,15 @@
         extras_require['docs']
         + extras_require['lint']
         + extras_require['test']
-        + ['nbdime', 'bump2version', 'ipython', 'pre-commit', 'check-manifest', 'twine']
+        + [
+            'nbdime',
+            'bump2version',
+            'ipython',
+            'pre-commit',
+            'check-manifest',
+            'codemetapy>=0.3.4',
+            'twine',
+        ]
     )
 )
 extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))


Test patch:
diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml
--- a/.github/workflows/release_tests.yml
+++ b/.github/workflows/release_tests.yml
@@ -32,3 +32,8 @@ jobs:
     - name: Canary test public API
       run: |
         python -m pytest -r sx tests/test_public_api.py
+    - name: Verify requirements in codemeta.json
+      run: |
+        python -m pip install jq "codemetapy>=0.3.4"
+        codemetapy --no-extras pyhf > codemeta_generated.json
+        diff <(jq -S .softwareRequirements codemeta_generated.json) <(jq -S .softwareRequirements codemeta.json)