The examples directory contains a few example submissions, including the TestHEPSubmission.zip file. You can also easily obtain the YAML format of any existing HEPData record by clicking “Download All” then “YAML”.

Note that libraries exist for a variety of programming languages that can parse and emit the YAML standard, linked from the YAML homepage. Use of these libraries is often easier than trying to write YAML “by hand”, where you need to be careful with the indentation and spacing, whether or not strings need to be quoted, etc.

In particular, data structures in Python can easily be dumped to YAML using libraries like PyYAML. Here is a simple example script showing how to process a YODA file into YAML files for HEPData submission. Here is a more complicated example script that downloads text files from an experiment web page and processes them into an archive file ready for HEPData submission. Here is a validation script which validates the submission.yaml file and all data files (optionally requiring the hepdata-validator package).

An alternative validation script has been written in Python 3 by Christian Holm Christensen (see #8), which reimplements (and attempts to improve) the main functionality of the hepdata-validator package.

A library called hepdata_lib (see hepdata-lib docs) has been developed independently by members of the CMS Collaboration to help with both (i) reading data into Python from common formats such as ROOT and text files, and (ii) writing data from Python into the HEPData YAML submission format. Simple example scripts using the hepdata_lib library can be found in the APEX_ins923960 and ATLAS_ins1241574 directories.

An alternative library (see cholmcc hepdata docs) with similar functionality to hepdata_lib has been developed by Christian Holm Christensen.