access_nri_intake.cli#
Command line interfaces for access-nri-intake
Attributes#
Exceptions#
Common base class for all non-exit exceptions. |
|
Raised when a directory already exists and the user has not specified |
Classes#
Functions#
|
Build an intake-dataframe-catalog from YAML configuration file(s). |
|
Concretize a build by moving it to the final location and updating the paths in the catalog.json files. |
|
Check provided metadata.yaml file(s) against the experiment schema |
|
Create an empty template for a metadata.yaml file using the experiment schema. |
|
Either creates, verifies, or updates the intake-esm datastore |
|
Module Contents#
- access_nri_intake.cli.STORAGE_FLAG_PATTERN = 'gdata/[a-z]{1,2}[0-9]{1,2}'#
- access_nri_intake.cli.T_catname#
- exception access_nri_intake.cli.MetadataCheckError#
Bases:
ExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception access_nri_intake.cli.DirectoryExistsError#
Bases:
ExceptionRaised when a directory already exists and the user has not specified the –force flag to overwrite it.
Initialize self. See help(type(self)) for accurate signature.
- class access_nri_intake.cli.VersionHandler(yaml_dict, catalog_base_path, build_base_path, version, use_parquet=False)#
- CSV_AND_PQ_SOURCES#
- yaml_dict#
- catalog_base_path#
- build_base_path#
- version#
- use_parquet = False#
- property cat_loc: pathlib.Path#
- property existing_cat: bool#
Memo-ised property to check for existing catalog file. If we don’t memoize, then we run into mutation issues - because __call__ will write a new catalog partway through its execution, invaliding the checks.
- set_versions_no_existing_cat()#
No existing catalog, so set min = max = current version, unless there are folders with the right names in the write directory
- set_versions_no_prev_vmin_vmax()#
Still not really sure what exactly this should be called.
- access_nri_intake.cli.build(argv=None)#
Build an intake-dataframe-catalog from YAML configuration file(s).
- access_nri_intake.cli.concretize(argv=None)#
Concretize a build by moving it to the final location and updating the paths in the catalog.json files.
- access_nri_intake.cli.metadata_validate(argv=None)#
Check provided metadata.yaml file(s) against the experiment schema
- access_nri_intake.cli.metadata_template(argv=None)#
Create an empty template for a metadata.yaml file using the experiment schema.
Writes the template to the current working directory by default.
Parameters:#
loc (str, Path, optional): The directory in which to save the template. Defaults to the current working directory.
Returns:#
None
- access_nri_intake.cli.use_esm_datastore(argv=None)#
Either creates, verifies, or updates the intake-esm datastore
- access_nri_intake.cli.scaffold_catalog_entry(argv=None)#