materials_commons.cli.subcommands.versions module

materials_commons.cli.subcommands.versions.diff_versions(proj, path, vers_indicator_a, vers_indicator_b, method)[source]

proj: mcapi.Project path: str, path in project vers_indicator_a: str or int,

Version number (positive or negative), or ‘local’, or ‘remote’ (==”-1”) of ‘from’ file.

vers_indicator_b: str or int,

Version number (positive or negative), or ‘local’, or ‘remote’ (==”-1”) of ‘to’ file.

method: function,

libdiff method to use to compare files

materials_commons.cli.subcommands.versions.download_version(proj, path, vers_indicator)[source]

proj: mcapi.Project path: str, path in project vers_indicator: str or int

Version number (positive or negative), or ‘local’, or ‘remote’ (==”-1”)

materials_commons.cli.subcommands.versions.list_versions(proj, path)[source]
materials_commons.cli.subcommands.versions.make_parser()[source]

Make argparse.ArgumentParser for mc versions

materials_commons.cli.subcommands.versions.make_version_record(file, is_current)[source]
materials_commons.cli.subcommands.versions.make_versions(proj, path)[source]

Make a list of versions records

materials_commons.cli.subcommands.versions.print_version(proj, path, vers_indicator)[source]

proj: mcapi.Project path: str, path in project vers_indicator: str or int,

Version number (positive or negative), or ‘local’, or ‘remote’ (==”-1”)

materials_commons.cli.subcommands.versions.version_as_str(proj, path, versions, vers_indicator)[source]

Return version as str and standardized version name

path: str, File path versions: list of version records, output from make_versions vers_indicator: int or str, version ID, or ‘local’, or ‘remote’ for current remote version

(s, verspath):

s: str, File version as a string verspath: str, Standardized version path

materials_commons.cli.subcommands.versions.versions_subcommand(argv, working_dir)[source]

List, print, download, and compare file versions

mc versions <pathspec>