diff --git a/docs/usage.rst b/docs/usage.rst index 76a5822..67940e0 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -126,6 +126,8 @@ Additional resources, hosted either externally or locally, can be linked with th sub.add_additional_resource("Some file", "root_file.root", copy_file=True) sub.add_additional_resource("Some file", "root_file.root", copy_file=True, resource_license={"name": "CC BY 4.0", "url": "https://creativecommons.org/licenses/by/4.0/", "description": "This license enables reusers to distribute, remix, adapt, and build upon the material in any medium or format, so long as attribution is given to the creator."}) sub.add_additional_resource("Archive of full likelihoods in the HistFactory JSON format", "Likelihoods.tar.gz", copy_file=True, file_type="HistFactory") + sub.add_additional_resource("Likelihood in HS3 format", "likelihood.json", copy_file=True, file_type="HS3") + sub.add_additional_resource("SimpleAnalysis code snippet", "analysis.cxx", copy_file=True, file_type="SimpleAnalysis") sub.add_additional_resource("Selection and projection function examples", "analysis.cxx", copy_file=True, file_type="ProSelecta") The first argument is a ``description`` and the second is the ``location`` of the external link or local resource file. @@ -133,8 +135,12 @@ The optional argument ``copy_file=True`` (default value of ``False``) will copy The optional argument ``resource_license`` can be used to define a data license for an additional resource. The ``resource_license`` is in the form of a dictionary with mandatory string ``name`` and ``url`` values, and an optional ``description``. The optional argument ``file_type="HistFactory"`` (default value of ``None``) can be used to identify statistical models provided in the HistFactory JSON -format rather than relying on certain trigger words in the ``description`` (see `pyhf section of submission documentation`_). -The optional argument ``file_type="ProSelecta"`` (default value of ``None``) can be used to identify C++ snippets in the ProSelecta format for use with +format (see `pyhf section of submission documentation`_). +The optional argument ``file_type="HS3"`` can be used to identify statistical models provided in the +HEP Statistics Serialization Standard (HS3) format (see `HS3 section of submission documentation`_). +The optional argument ``file_type="SimpleAnalysis"`` can be used to identify C++ code snippets in the +Simplified ATLAS SUSY analysis (SimpleAnalysis) framework (see `SimpleAnalysis section of submission documentation`_). +The optional argument ``file_type="ProSelecta"`` can be used to identify C++ snippets in the ProSelecta format for use with the NUISANCE framework for event generators in neutrino physics (see `NUISANCE section of submission documentation`_). **Please note:** The default license applied to all data uploaded to HEPData is `CC0`_. You do not @@ -151,6 +157,8 @@ The ``add_link`` function can alternatively be used to add a link to an external Again, the first argument is a ``description`` and the second is the ``location`` of the external link. .. _`pyhf section of submission documentation`: https://hepdata-submission.readthedocs.io/en/latest/analyses.html#pyhf +.. _`HS3 section of submission documentation`: https://hepdata-submission.readthedocs.io/en/latest/analyses.html#hs3 +.. _`SimpleAnalysis section of submission documentation`: https://hepdata-submission.readthedocs.io/en/latest/analyses.html#simpleanalysis .. _`NUISANCE section of submission documentation`: https://hepdata-submission.readthedocs.io/en/latest/analyses.html#nuisance Adding links to related records @@ -291,6 +299,10 @@ In the same way as for the Submission object, additional resources, hosted eithe For a description of the arguments, see :ref:`sec-usage-resource` for the Submission object. A possible use case is to attach the data for the table in its original format before it was transformed into the HEPData YAML format. +Note that additional resources intended to be highlighted as `Analyses`_ (HistFactory, HS3, SimpleAnalysis, ProSelecta) +should be attached to a Submission object and not to a Table object. + +.. _Analyses: https://hepdata-submission.readthedocs.io/en/latest/analyses.html Adding keywords to a table ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/hepdata_lib/__init__.py b/hepdata_lib/__init__.py index 23bd72d..3ddefb9 100644 --- a/hepdata_lib/__init__.py +++ b/hepdata_lib/__init__.py @@ -78,7 +78,8 @@ def add_additional_resource(self, description, location, *, copy_file=False, fil :param copy_file: If set to true, will attempt to copy a local file to the tar ball. :type copy_file: bool - :param file_type: Type of the resource file (None, "HistFactory" or "ProSelecta"). + :param file_type: Type of the resource file (None, "HistFactory", "HS3", + "SimpleAnalysis", "ProSelecta"). :type file_type: string :param resource_license: License information comprising name, url and optional description.