, output_directory, force=False, compress=False)[source]#

Download the patchset archive from the remote URL and extract it in a directory at the path given.


>>> from pyhf.contrib.utils import download
>>> download("", "1Lbb-likelihoods")  
>>> import os
>>> sorted(os.listdir("1Lbb-likelihoods"))  
['BkgOnly.json', '', 'patchset.json']
>>> download("", "1Lbb-likelihoods.tar.gz", compress=True)  
>>> import glob
>>> glob.glob("1Lbb-likelihoods.tar.gz")  
  • archive_url (str) – The URL of the PatchSet archive to download.

  • output_directory (str) – Name of the directory to unpack the archive into.

  • force (bool) – Force download from non-approved host. Default is False.

  • compress (bool) – Keep the archive in a compressed tar.gz form. Default is False.


InvalidArchiveHost – if the provided archive host name is not known to be valid