gedih3.cli.gh3_build#
Functions#
|
Return |
|
Return the subset of |
|
Module Contents#
- gedih3.cli.gh3_build.explicit_vars_missing_in_sample(product_vars, default_products, sample_dict)[source]#
Return
{product: [bad_names]}for explicit-list products whose requested variables are absent from the sample HDF5.Pure function over its inputs — extracted from the gh3_build CLI so the pre-flight typo check can be unit-tested without invoking
main().- Parameters:
- product_varsdict
Mapping
{product: list-or-None}.Nonemeans “everything” (*/all) and is skipped.default-sourced lists are identified bydefault_productsand skipped (they are validated against the static manifest instead).- default_productsset
Products the user requested as
default(skipped — manifest is the contract).- sample_dictdict
One
{product: hdf5_path}mapping fromgedidriver.soc_file_tree(). Pass an empty dict to short-circuit.
- Returns:
- dict
Empty when every explicit-list variable was found (or no explicit lists exist). Otherwise
{product: [missing_names]}. Wildcards that match nothing in the sample HDF5 are surfaced as a singleGediValidationErrorstring entry under their product.
- gedih3.cli.gh3_build.manifest_check_scope(h3_logger, product_vars)[source]#
Return the subset of
product_varsthat should be validated against the shipped static manifest, per the regime rule:Regime A (fresh build): every product the user passed that was requested via
default/def.Regime C (resume + explicit
defaultre-request): only products inh3_logger.default_productsthat also appear inh3_logger.new_product_vars(i.e. produced a delta).Regimes B & D (resume with granules-only or explicit-list expansion): empty — the build log is authoritative.
An empty return signals the caller to skip validation entirely.
Pure function over logger state so the regime gate can be unit-tested without the full CLI pipeline.