diff --git a/.gitignore b/.gitignore index 1b89707..1dca73b 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,8 @@ dmypy.json # sphinx documentation docs/_build -docs/_generated \ No newline at end of file +docs/_generated +_old/* +notebooks/* +bin/* +docs/ZENODO.rst diff --git a/.zenodo.json b/.zenodo.json new file mode 100644 index 0000000..85ab00d --- /dev/null +++ b/.zenodo.json @@ -0,0 +1,41 @@ +{ + "description": "smooth inference for reinterpretation studies", + "license": "MIT", + "title": "SpeysideHEP/spey: v0.1.5", + "version": "v0.1.5", + "upload_type": "software", + "creators": [ + { + "affiliation": "Thomas Jefferson National Accelerator Facility", + "name": "Araz, Jack Y.", + "orcid": "0000-0001-8721-8042" + } + ], + "access_right": "open", + "keywords": [ + "physics", + "bsm", + "statistics", + "fitting", + "scipy", + "auto-differentiation" + ], + "related_identifiers": [ + { + "scheme": "url", + "identifier": "https://github.com/SpeysideHEP/spey/tree/v0.1.5", + "relation": "isSupplementTo" + }, + { + "scheme": "url", + "identifier": "https://spey.readthedocs.io/", + "relation": "isDocumentedBy" + }, + { + "scheme": "doi", + "identifier": "10.48550/arXiv.2307.06996", + "relation": "isDocumentedBy", + "resource_type": "publication-article" + } + ] +} \ No newline at end of file diff --git a/docs/citations.rst b/docs/citations.rst index 08b8053..601596c 100644 --- a/docs/citations.rst +++ b/docs/citations.rst @@ -6,7 +6,7 @@ Citation The BibTeX entry for citing ``spey`` including latest zenodo archive: -.. code-block:: BibTeX +.. code-block:: bibtex @article{Araz:2023bwx, author = "Araz, Jack Y.", @@ -19,16 +19,7 @@ The BibTeX entry for citing ``spey`` including latest zenodo archive: year = "2023" } - @software{spey_zenodo, - author = {Jack Y. Araz}, - title = {SpeysideHEP/spey: v0.1.5}, - month = jan, - year = 2024, - publisher = {Zenodo}, - version = {v0.1.5}, - doi = {10.5281/zenodo.10569099}, - url = {https://doi.org/10.5281/zenodo.10569099} - } +.. include:: ZENODO.rst Use in Publications ------------------- diff --git a/docs/conf.py b/docs/conf.py index 204b7e1..845c6a5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,8 +6,11 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -from pathlib import Path +import re import sys +import warnings +from pathlib import Path + from pkg_resources import get_distribution sys.path.insert(0, str(Path("./ext").resolve())) @@ -43,7 +46,7 @@ "sphinx_togglebutton", "xref", # "myst_parser", - "sphinx_rtd_size", + # "sphinx_rtd_size", "myst_nb", ] nb_execution_mode = "off" @@ -176,3 +179,30 @@ "manual", ) ] + +# adapted from https://astrodata.nyc/posts/2021-04-23-zenodo-sphinx/ +zenodo_path = Path("ZENODO.rst") +if not zenodo_path.exists(): + import textwrap + + try: + import requests + + headers = {"accept": "application/x-bibtex"} + response = requests.get( + "https://zenodo.org/api/records/10156353", headers=headers, timeout=5 + ) + response.encoding = "utf-8" + + txt = response.text + linker = re.search("@software{(.+?),\n", txt).group(1) + txt = txt.replace(linker, "spey_zenodo") + zenodo_record = ".. code-block:: bibtex\n\n" + textwrap.indent(txt, " " * 4) + except Exception as e: + warnings.warn("Failed to retrieve Zenodo record for Spey: " f"{str(e)}") + zenodo_record = ( + "`Retrieve the Zenodo record here. `_" + ) + + with open(zenodo_path, "w", encoding="utf-8") as f: + f.write(zenodo_record) diff --git a/docs/outreach.rst b/docs/outreach.rst index fe89df1..6c55c58 100644 --- a/docs/outreach.rst +++ b/docs/outreach.rst @@ -9,6 +9,8 @@ Talks * - Date - Event + * - February 15, 2024 + - `Electroweak and Beyond the Standard Model Physics at the EIC `_ * - December 5, 2023 - `pyhf Users and Developers Workshop 2023 `_ * - October 12, 2023