Skip to content

Commit

Permalink
Update documentation (useage.rst)
Browse files Browse the repository at this point in the history
Updates the documentation in usage.rst to describe use of the bidirectional linking feature.
  • Loading branch information
ItIsJordan committed Aug 23, 2023
1 parent 7a810ab commit 5bece38
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ The ``create_files`` function writes all the YAML output files you need and pack

**Please note**: creating the output files also creates a ``submission`` folder containing the individual files going into the tarball. This folder exists merely for convenience, in order to make it easy to inspect each individual file. It is not recommended to attempt to manually manage or edit the files in the folder, and there is no guarantee that ``hepdata_lib`` will handle any of the changes you make in a graceful manner. As far as we are aware, there is no use case where manual editing of the files is necessary. If you have such a use case, please report it in a Github issue.

Adding links to related records
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To add a link to a related record object, you can use the `add_related_recid` function of the Submission object.

**Please note**: Values must be entered as integers.

::

sub.add_related_recid(1)

In this example, we are adding a link to the submission with the record ID value of `"1"`.

The documentation for this feature can be found here: (`Linking Records`_).

.. _`Linking Records` : https://hepdata-submission.readthedocs.io/en/latest/bidirectional.html#linking-records
.. _sec-usage-tab-var:

Expand Down Expand Up @@ -239,6 +256,22 @@ Lists of recognized keywords are available from the hepdata documentation for `O
.. _`Particles`: https://hepdata-submission.readthedocs.io/en/latest/keywords/partlist.html


Adding links to related tables
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To add a link to a related table object, you can use the `add_related_doi` function of the Table class.

**Please note**: Your DOIs must match the format: `10.17182/hepdata.[RecordID].v[Version]/t[Table]`

::

table.add_related_doi("10.17182/hepdata.1.v2/t3")

In this example, we are adding a link to the table with a DOI of: `"10.17182/hepdata.1.v2/t3"`.

The documentation for this feature can be found here: (`Linking Tables`_).

.. _`Linking Tables` : https://hepdata-submission.readthedocs.io/en/latest/bidirectional.html#linking-tables
Uncertainties
++++++++++++++++++++++++++++++++
Expand Down

0 comments on commit 5bece38

Please sign in to comment.