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” or “YAML with resource files”.

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.

The hepdata-validator package provides a hepdata-validate command to validate a local archive file (.zip, .tar, .tar.gz, .tgz), directory or single YAML file. See the hepdata-validator docs for more details.

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 (py)HEPData docs) with similar functionality to hepdata_lib has been developed by Christian Holm Christensen.