pyneuroml.archive package#

Utilities for exporting NeuroML models into archives

File: pyneuroml/archive/__init__.py

Copyright 2023 NeuroML contributors

pyneuroml.archive.cli(a: Any | None = None, **kwargs: str)#

Main cli caller method

pyneuroml.archive.create_combine_archive(rootfile: str, zipfile_name: str | None = None, zipfile_extension='.neux', filelist: List[str] = [], extra_files: List[str] = [])#

Create a combine archive that includes all files referred to (included recursively) by the provided rootfile. If a file list is provided, it will attempt to create an archive of the provided files. Note that it is for the user to ensure that the paths in the provided file list are correct.

All file paths must be relative to the provided rootfile.

For more information, see:

Bergmann, F.T., Adams, R., Moodie, S. et al. COMBINE archive and OMEX format: one file to share all information to reproduce a modeling project. BMC Bioinformatics 15, 369 (2014). https://doi.org/10.1186/s12859-014-0369-z

Parameters:
  • zipfile_name (str) – name of zip file without extension: rootfile if not provided

  • rootfile (str) – full path to main root file (SED-ML/LEMS/NeuroML2)

  • zipfile_extension (str) – extension for zip file, starting with “.”.

  • filelist (list of strings) – explicit list of files to create archive of if given, the function will not attempt to list model files itself

  • extra_files (list of strings) – extra files to include in archive

Returns:

None

Raises:

ValueError – if a root file is not provided

pyneuroml.archive.create_combine_archive_manifest(rootfile: str, filelist: List[str], rootdir: str = '.')#

Create a combine archive manifest file called manifest.xml

Parameters:
  • rootfile (str) – the root file for this archive; marked as “master”

  • filelist (list of strings) – list of files to be included in the manifest

  • rootdir (str) – directory where root file lives