femic.cli.main Module

The femic.cli.main module is the main operator-facing entry surface for FEMIC. It defines the top-level femic Typer application, wires all subcommands, and translates CLI options into the lower-level workflow, pipeline, export, rebuild, and Patchworks runtime calls.

If you are trying to understand how a user-facing command reaches the rest of the codebase, this is the first module to read. In practice it owns:

  • top-level command and subcommand registration

  • shared CLI option declarations

  • instance-root resolution and operator-facing path defaults

  • command-level handoff into the legacy workflow layer

  • command-level handoff into Patchworks, export, rebuild, and evidence helpers

Start Here If…

Use this page first if you are trying to:

  • add a new femic subcommand

  • understand which function powers an existing CLI command

  • trace how run profiles, instance roots, and external-data paths are resolved

  • debug whether a failure belongs to the CLI layer or to the lower-level workflow/runtime helpers

Typical navigation path:

  1. Find the Typer app or command decorator for the subcommand you care about.

  2. Read the command function body to see which lower-level helper it calls.

  3. Jump from there into the relevant module: - femic.workflows.legacy - femic.pipeline.io - femic.patchworks_runtime - femic.rebuild_runner - femic.release_packaging

Typical Usage

For operator-driven work, the CLI is usually the narrowest stable entrypoint:

femic prep validate-case --instance-root external/femic-k3z-instance --run-config config/run_profile.k3z.yaml
femic run --instance-root external/femic-k3z-instance --run-config config/run_profile.k3z.yaml --run-id k3z_docs_example
femic tsa btc-post-tipsy --instance-root external/femic-k3z-instance --run-config config/run_profile.k3z.yaml --tsa k3z --run-id k3z_docs_example

When you are extending the CLI itself, the common maintenance pattern is:

from femic.cli.main import app, export_app

# Existing sub-apps are registered near the bottom of the module.
app.add_typer(export_app, name="export")

Command Structure

The module defines one root Typer app and several sub-apps:

  • app: top-level femic command

  • prep_app: input preparation and preflight commands

  • vdyp_app: VDYP execution and reporting commands

  • tsa_app: legacy-named FMU/code stage commands, especially BTC/post-TIPSY resume

  • tipsy_app: TIPSY/BTC config, report-template, and runtime helpers

  • export_app: Patchworks, Woodstock, dual-export, and release packaging

  • patchworks_app: proprietary Patchworks runtime helpers

  • instance_app: instance bootstrap, rebuild, evidence, and ws3 smoke tools

Those sub-apps are attached near the end of the module with app.add_typer. That is the quickest place to orient yourself if you need the full command tree.

Common Entry Surfaces

The highest-value command functions in this module are:

  • run_all() - top-level end-to-end run entrypoint

  • prep_validate_case() - case/runtime prerequisite validation

  • prep_geospatial_preflight() - geospatial toolchain and dataset readiness checks

  • tsa_btc_post_tipsy() - resume path after unattended BTC output refresh

  • export_patchworks() - Patchworks package generation

  • patchworks_preflight() - Patchworks runtime dependency checks

  • patchworks_matrix_build() - Matrix Builder execution

  • instance_rebuild() - rebuild-spec-driven validation and execution

These functions are good first rewrite targets because they sit at the seams that operators and coding agents hit most often.

Shared Option Model

One reason this module is large is that it centralizes a lot of reusable Typer Option definitions instead of scattering them across subcommands. That is the right tradeoff for consistency, but it means this file contains both:

  • structural command wiring, and

  • a large constant surface for shared CLI options

When reading the file, it helps to treat those as two layers:

  1. option declarations and reusable defaults

  2. the actual command implementations

The shared option layer is where many important runtime contracts become visible, including:

  • default instance-relative paths

  • run-id/log-dir conventions

  • Patchworks runtime config defaults

  • export/output directory conventions

  • rebuild-spec and baseline diff inputs

Pipeline Role and Boundaries

This module does not implement the heavy modeling logic itself. Its job is to:

  • validate and normalize operator input

  • resolve instance/runtime context

  • choose the right lower-level helper

  • render operator-facing output and failures cleanly

In other words, if a bug is about:

  • command names

  • option wiring

  • instance-root handling

  • which helper gets called

  • user-facing error/report formatting

then femic.cli.main is probably the right place to investigate.

If the bug is about:

  • actual Stage 00 / 01a / 01b behavior

  • TIPSY/VDYP internals

  • SiteProd handling

  • Patchworks XML/fragments synthesis

then this module is usually just the entry seam, not the real owner.

Cross-References

Guides that pair especially closely with this module:

Related API pages:

Typer-based CLI entry point for FEMIC.

femic.cli.main.data_bcdc_fetch(queries=<typer.models.ArgumentInfo object>, query_file=<typer.models.OptionInfo object>, manifest_path=<typer.models.OptionInfo object>, download_root=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, bbox=<typer.models.OptionInfo object>, geomark=<typer.models.OptionInfo object>, output_format=<typer.models.OptionInfo object>, plan_only=<typer.models.OptionInfo object>, allow_bulk=<typer.models.OptionInfo object>)[source]

Fetch AOI-scoped WFS-backed BCDC layers into local vector files.

Parameters:
  • queries (list[str] | None)

  • query_file (Path | None)

  • manifest_path (Path | None)

  • download_root (Path | None)

  • limit (int)

  • instance_root (Path | None)

  • bbox (str | None)

  • geomark (str | None)

  • output_format (str)

  • plan_only (bool)

  • allow_bulk (bool)

Return type:

None

femic.cli.main.data_bcdc_order(queries=<typer.models.ArgumentInfo object>, query_file=<typer.models.OptionInfo object>, manifest_path=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, bbox=<typer.models.OptionInfo object>, geomark=<typer.models.OptionInfo object>, output_format=<typer.models.OptionInfo object>, email=<typer.models.OptionInfo object>, clip=<typer.models.OptionInfo object>, plan_only=<typer.models.OptionInfo object>, allow_bulk=<typer.models.OptionInfo object>)[source]

Submit DWDS fallback orders for BCGW-backed BCDC layers.

Parameters:
  • queries (list[str] | None)

  • query_file (Path | None)

  • manifest_path (Path | None)

  • limit (int)

  • instance_root (Path | None)

  • bbox (str | None)

  • geomark (str | None)

  • output_format (str)

  • email (str | None)

  • clip (bool)

  • plan_only (bool)

  • allow_bulk (bool)

Return type:

None

femic.cli.main.data_bcdc_order_followup(order_manifest=<typer.models.ArgumentInfo object>, manifest_path=<typer.models.OptionInfo object>, download_root=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, download=<typer.models.OptionInfo object>, poll_status=<typer.models.OptionInfo object>)[source]

Re-probe a DWDS order manifest and materialize ready artifacts.

Parameters:
  • order_manifest (Path)

  • manifest_path (Path | None)

  • download_root (Path | None)

  • instance_root (Path | None)

  • download (bool)

  • poll_status (bool)

Return type:

None

femic.cli.main.data_bcdc_resolve(queries=<typer.models.ArgumentInfo object>, query_file=<typer.models.OptionInfo object>, summary_csv=<typer.models.OptionInfo object>, manifest_path=<typer.models.OptionInfo object>, download_direct=<typer.models.OptionInfo object>, download_root=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, plan_only=<typer.models.OptionInfo object>, allow_bulk=<typer.models.OptionInfo object>)[source]

Resolve BC Data Catalogue candidates from explicit layer names or keywords.

Parameters:
  • queries (list[str] | None)

  • query_file (Path | None)

  • summary_csv (Path | None)

  • manifest_path (Path | None)

  • download_direct (bool)

  • download_root (Path | None)

  • limit (int)

  • instance_root (Path | None)

  • plan_only (bool)

  • allow_bulk (bool)

Return type:

None

femic.cli.main.doc_figures_preflight()[source]

Check optional figrecover dependencies without processing documents.

Return type:

None

femic.cli.main.doc_figures_prepare_corpus(corpus_id=<typer.models.ArgumentInfo object>, pdfs=<typer.models.OptionInfo object>, input_dir=<typer.models.OptionInfo object>, pdf_glob=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, pages=<typer.models.OptionInfo object>, dpi=<typer.models.OptionInfo object>, image_format=<typer.models.OptionInfo object>, figure_manifest=<typer.models.OptionInfo object>, overwrite=<typer.models.OptionInfo object>)[source]

Prepare a FEMIC document-figure corpus with optional figrecover rendering.

Parameters:
  • corpus_id (str)

  • pdfs (list[Path] | None)

  • input_dir (Path | None)

  • pdf_glob (str)

  • output_root (Path | None)

  • pages (str | None)

  • dpi (int)

  • image_format (str)

  • figure_manifest (Path | None)

  • overwrite (bool)

Return type:

None

femic.cli.main.doc_figures_register_table(corpus_id=<typer.models.ArgumentInfo object>, table_path=<typer.models.ArgumentInfo object>, document_title=<typer.models.OptionInfo object>, page_number=<typer.models.OptionInfo object>, figure_id=<typer.models.OptionInfo object>, table_id=<typer.models.OptionInfo object>, series_name=<typer.models.OptionInfo object>, visual_selection_rule=<typer.models.OptionInfo object>, calibration_spec=<typer.models.OptionInfo object>, extraction_method=<typer.models.OptionInfo object>, extraction_parameters=<typer.models.OptionInfo object>, source_url=<typer.models.OptionInfo object>, source_path=<typer.models.OptionInfo object>, source_checksum=<typer.models.OptionInfo object>, crop_path=<typer.models.OptionInfo object>, crop_checksum=<typer.models.OptionInfo object>, package_component=<typer.models.OptionInfo object>, figrecover_version=<typer.models.OptionInfo object>, review_status=<typer.models.OptionInfo object>, downstream_use_classification=<typer.models.OptionInfo object>, reviewer=<typer.models.OptionInfo object>, review_timestamp=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, provenance_json=<typer.models.OptionInfo object>)[source]

Register a recovered table with FEMIC provenance and review status.

Parameters:
  • corpus_id (str)

  • table_path (Path)

  • document_title (str)

  • page_number (int)

  • figure_id (str | None)

  • table_id (str | None)

  • series_name (str)

  • visual_selection_rule (str)

  • calibration_spec (Path)

  • extraction_method (str)

  • extraction_parameters (Path | None)

  • source_url (str | None)

  • source_path (Path | None)

  • source_checksum (str | None)

  • crop_path (Path | None)

  • crop_checksum (str | None)

  • package_component (str | None)

  • figrecover_version (str | None)

  • review_status (str)

  • downstream_use_classification (str)

  • reviewer (str | None)

  • review_timestamp (str | None)

  • output_root (Path | None)

  • provenance_json (Path | None)

Return type:

None

femic.cli.main.export_dual(tsa=<typer.models.OptionInfo object>, bundle_dir=<typer.models.OptionInfo object>, checkpoint=<typer.models.OptionInfo object>, patchworks_output_dir=<typer.models.OptionInfo object>, woodstock_output_dir=<typer.models.OptionInfo object>, start_year=<typer.models.OptionInfo object>, horizon_years=<typer.models.OptionInfo object>, cc_min_age=<typer.models.OptionInfo object>, cc_max_age=<typer.models.OptionInfo object>, cc_transition_ifm=<typer.models.OptionInfo object>, fragments_crs=<typer.models.OptionInfo object>, ifm_mode=<typer.models.OptionInfo object>, ifm_source_col=<typer.models.OptionInfo object>, ifm_threshold=<typer.models.OptionInfo object>, ifm_target_managed_share=<typer.models.OptionInfo object>, seral_stage_config=<typer.models.OptionInfo object>, silviculture_config=<typer.models.OptionInfo object>, legacy_input_variables_config=<typer.models.OptionInfo object>, with_ws3_smoke=<typer.models.OptionInfo object>, ws3_command=<typer.models.OptionInfo object>, ws3_workdir=<typer.models.OptionInfo object>, ws3_report=<typer.models.OptionInfo object>, ws3_require_command=<typer.models.OptionInfo object>, ws3_timeout_seconds=<typer.models.OptionInfo object>, ws3_repo_path=<typer.models.OptionInfo object>, ws3_builtin_smoke=<typer.models.OptionInfo object>, ws3_bridge_dir=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Export both Patchworks and Woodstock artifacts, then optionally run ws3 smoke.

Parameters:
  • tsa (list[str] | None)

  • bundle_dir (Path)

  • checkpoint (Path)

  • patchworks_output_dir (Path)

  • woodstock_output_dir (Path)

  • start_year (int)

  • horizon_years (int)

  • cc_min_age (int)

  • cc_max_age (int)

  • cc_transition_ifm (str | None)

  • fragments_crs (str)

  • ifm_mode (str)

  • ifm_source_col (str | None)

  • ifm_threshold (float | None)

  • ifm_target_managed_share (float | None)

  • seral_stage_config (Path | None)

  • silviculture_config (Path | None)

  • legacy_input_variables_config (Path | None)

  • with_ws3_smoke (bool)

  • ws3_command (str | None)

  • ws3_workdir (Path | None)

  • ws3_report (Path)

  • ws3_require_command (bool)

  • ws3_timeout_seconds (int)

  • ws3_repo_path (Path | None)

  • ws3_builtin_smoke (bool)

  • ws3_bridge_dir (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.export_patchworks(tsa=<typer.models.OptionInfo object>, bundle_dir=<typer.models.OptionInfo object>, checkpoint=<typer.models.OptionInfo object>, output_dir=<typer.models.OptionInfo object>, start_year=<typer.models.OptionInfo object>, horizon_years=<typer.models.OptionInfo object>, cc_min_age=<typer.models.OptionInfo object>, cc_max_age=<typer.models.OptionInfo object>, cc_transition_ifm=<typer.models.OptionInfo object>, fragments_crs=<typer.models.OptionInfo object>, ifm_mode=<typer.models.OptionInfo object>, ifm_source_col=<typer.models.OptionInfo object>, ifm_threshold=<typer.models.OptionInfo object>, ifm_target_managed_share=<typer.models.OptionInfo object>, seral_stage_config=<typer.models.OptionInfo object>, silviculture_config=<typer.models.OptionInfo object>, legacy_input_variables_config=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Export a Patchworks model package for the selected FMU/code targets.

Parameters:
  • tsa (list[str] | None)

  • bundle_dir (Path)

  • checkpoint (Path)

  • output_dir (Path)

  • start_year (int)

  • horizon_years (int)

  • cc_min_age (int)

  • cc_max_age (int)

  • cc_transition_ifm (str | None)

  • fragments_crs (str)

  • ifm_mode (str)

  • ifm_source_col (str | None)

  • ifm_threshold (float | None)

  • ifm_target_managed_share (float | None)

  • seral_stage_config (Path | None)

  • silviculture_config (Path | None)

  • legacy_input_variables_config (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.export_release(case_id=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, bundle_dir=<typer.models.OptionInfo object>, patchworks_dir=<typer.models.OptionInfo object>, woodstock_dir=<typer.models.OptionInfo object>, logs_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, strict=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Assemble and validate a user-facing release bundle.

Parameters:
  • case_id (str | None)

  • output_root (Path)

  • bundle_dir (Path)

  • patchworks_dir (Path)

  • woodstock_dir (Path | None)

  • logs_dir (Path)

  • run_id (str | None)

  • strict (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.export_woodstock(tsa=<typer.models.OptionInfo object>, bundle_dir=<typer.models.OptionInfo object>, checkpoint=<typer.models.OptionInfo object>, output_dir=<typer.models.OptionInfo object>, cc_min_age=<typer.models.OptionInfo object>, cc_max_age=<typer.models.OptionInfo object>, fragments_crs=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Export Woodstock CSV artifacts for the selected FMU/code targets.

Parameters:
  • tsa (list[str] | None)

  • bundle_dir (Path)

  • checkpoint (Path)

  • output_dir (Path)

  • cc_min_age (int)

  • cc_max_age (int)

  • fragments_crs (str)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.fansier_parse_batch_output(report_dir=<typer.models.ArgumentInfo object>, out_dir=<typer.models.OptionInfo object>, report_glob=<typer.models.OptionInfo object>)[source]

Parse FAN$IER batch text outputs into normalized CSV tables.

Parameters:
  • report_dir (Path)

  • out_dir (Path)

  • report_glob (str)

Return type:

None

femic.cli.main.fansier_run_and_parse(rgm_path=<typer.models.ArgumentInfo object>, out_dir=<typer.models.OptionInfo object>, parsed_out_dir=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, fansier_exe=<typer.models.OptionInfo object>, discount_name=<typer.models.OptionInfo object>, discount_dis_path=<typer.models.OptionInfo object>, report_type=<typer.models.OptionInfo object>, long_report=<typer.models.OptionInfo object>, product_cols=<typer.models.OptionInfo object>, activity_cols=<typer.models.OptionInfo object>, select_all_products=<typer.models.OptionInfo object>, select_all_ages=<typer.models.OptionInfo object>, product_name=<typer.models.OptionInfo object>, age_name=<typer.models.OptionInfo object>)[source]

Run FAN$IER batch extraction and immediately parse the resulting text outputs.

Parameters:
  • rgm_path (Path)

  • out_dir (Path)

  • parsed_out_dir (Path)

  • log_dir (Path)

  • run_id (str)

  • fansier_exe (Path)

  • discount_name (str)

  • discount_dis_path (Path | None)

  • report_type (str)

  • long_report (bool)

  • product_cols (bool)

  • activity_cols (bool)

  • select_all_products (bool)

  • select_all_ages (bool)

  • product_name (str)

  • age_name (str)

Return type:

None

femic.cli.main.fansier_run_batch(rgm_path=<typer.models.ArgumentInfo object>, out_dir=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, fansier_exe=<typer.models.OptionInfo object>, discount_name=<typer.models.OptionInfo object>, discount_dis_path=<typer.models.OptionInfo object>, report_type=<typer.models.OptionInfo object>, long_report=<typer.models.OptionInfo object>, product_cols=<typer.models.OptionInfo object>, activity_cols=<typer.models.OptionInfo object>, select_all_products=<typer.models.OptionInfo object>, select_all_ages=<typer.models.OptionInfo object>, product_name=<typer.models.OptionInfo object>, age_name=<typer.models.OptionInfo object>)[source]

Run unattended FAN$IER batch extraction on Windows.

Parameters:
  • rgm_path (Path)

  • out_dir (Path)

  • log_dir (Path)

  • run_id (str)

  • fansier_exe (Path)

  • discount_name (str)

  • discount_dis_path (Path | None)

  • report_type (str)

  • long_report (bool)

  • product_cols (bool)

  • activity_cols (bool)

  • select_all_products (bool)

  • select_all_ages (bool)

  • product_name (str)

  • age_name (str)

Return type:

None

femic.cli.main.freshforge_workflows_commands(workflow_path=<typer.models.ArgumentInfo object>, namespace=<typer.models.OptionInfo object>, workdir=<typer.models.OptionInfo object>)[source]

Print copy-paste FreshForge commands for a workflow document.

Parameters:
  • workflow_path (Path)

  • namespace (str | None)

  • workdir (Path)

Return type:

None

femic.cli.main.freshforge_workflows_list(json_output=<typer.models.OptionInfo object>)[source]

List FreshForge workflow documents discoverable from this checkout.

Parameters:

json_output (bool)

Return type:

None

femic.cli.main.instance_account_surface(config=<typer.models.OptionInfo object>, output=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Summarize species/AU account coverage from tracks/accounts.csv.

Parameters:
  • config (Path)

  • output (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.instance_catalog_install(instance_id=<typer.models.ArgumentInfo object>)[source]

Install one or all registered FEMIC instances into the managed user root.

Parameters:

instance_id (str)

Return type:

None

femic.cli.main.instance_catalog_list()[source]

List registered FEMIC instances available for source or package installs.

Return type:

None

femic.cli.main.instance_config_set_managed_external_root(path=<typer.models.ArgumentInfo object>)[source]

Persist the managed registered-instance root in the FEMIC user config.

Parameters:

path (Path)

Return type:

None

femic.cli.main.instance_config_set_user_instance_root(path=<typer.models.ArgumentInfo object>)[source]

Persist the visible user instance workspace root in the FEMIC user config.

Parameters:

path (Path)

Return type:

None

femic.cli.main.instance_config_show()[source]

Show the resolved FEMIC user config and default workspace roots.

Return type:

None

femic.cli.main.instance_init(instance_root=<typer.models.OptionInfo object>, instance_name=<typer.models.OptionInfo object>, overwrite=<typer.models.OptionInfo object>, download_bc_vri=<typer.models.OptionInfo object>, yes=<typer.models.OptionInfo object>)[source]

Create and initialize an instance workspace from packaged templates.

Parameters:
  • instance_root (Path | None)

  • instance_name (str | None)

  • overwrite (bool)

  • download_bc_vri (bool)

  • yes (bool)

Return type:

None

femic.cli.main.instance_promote_evidence(report=<typer.models.OptionInfo object>, output=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, max_warn_increase=<typer.models.OptionInfo object>, max_baseline_diff_increase=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Promote a rebuild report into normalized release-gate evidence JSON.

Parameters:
  • report (Path | None)

  • output (Path)

  • log_dir (Path)

  • max_warn_increase (int | None)

  • max_baseline_diff_increase (int | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.instance_rebuild(spec=<typer.models.OptionInfo object>, run_config=<typer.models.OptionInfo object>, tipsy_config_dir=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, with_patchworks=<typer.models.OptionInfo object>, dry_run=<typer.models.OptionInfo object>, patchworks_config=<typer.models.OptionInfo object>, baseline=<typer.models.OptionInfo object>, write_baseline=<typer.models.OptionInfo object>, allowlist=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Execute the reproducible instance rebuild flow and write evidence artifacts.

Parameters:
  • spec (Path)

  • run_config (Path)

  • tipsy_config_dir (Path)

  • log_dir (Path)

  • run_id (str | None)

  • with_patchworks (bool)

  • dry_run (bool)

  • patchworks_config (Path)

  • baseline (Path)

  • write_baseline (bool)

  • allowlist (Path)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.instance_refresh_reference_evidence(report=<typer.models.OptionInfo object>, reference_root=<typer.models.OptionInfo object>, max_warn_increase=<typer.models.OptionInfo object>, max_baseline_diff_increase=<typer.models.OptionInfo object>)[source]

Refresh maintainer reference evidence artifact from latest rebuild report.

Parameters:
  • report (Path | None)

  • reference_root (Path)

  • max_warn_increase (int | None)

  • max_baseline_diff_increase (int | None)

Return type:

None

femic.cli.main.instance_validate_spec(spec=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Validate rebuild-spec structure and required fields for an instance.

Parameters:
  • spec (Path)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.instance_ws3_smoke(woodstock_dir=<typer.models.OptionInfo object>, output=<typer.models.OptionInfo object>, ws3_command=<typer.models.OptionInfo object>, ws3_workdir=<typer.models.OptionInfo object>, require_command=<typer.models.OptionInfo object>, timeout_seconds=<typer.models.OptionInfo object>, ws3_repo_path=<typer.models.OptionInfo object>, builtin_model_smoke=<typer.models.OptionInfo object>, ws3_bridge_dir=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run ws3 smoke validation for Woodstock outputs and emit a JSON report.

Parameters:
  • woodstock_dir (Path)

  • output (Path)

  • ws3_command (str | None)

  • ws3_workdir (Path | None)

  • require_command (bool)

  • timeout_seconds (int)

  • ws3_repo_path (Path | None)

  • builtin_model_smoke (bool)

  • ws3_bridge_dir (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.main(version=<typer.models.OptionInfo object>, debug=<typer.models.OptionInfo object>)[source]

Handle top-level CLI flags before delegating to subcommands.

Parameters:
  • version (bool)

  • debug (bool)

Return type:

None

femic.cli.main.patchworks_build_blocks(config=<typer.models.OptionInfo object>, model_dir=<typer.models.OptionInfo object>, fragments_shp=<typer.models.OptionInfo object>, topology_radius=<typer.models.OptionInfo object>, topology_backend=<typer.models.OptionInfo object>, with_topology=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Generate model-local Patchworks blocks (and optional topology) artifacts.

Parameters:
  • config (Path)

  • model_dir (Path | None)

  • fragments_shp (Path | None)

  • topology_radius (float)

  • topology_backend (Literal['python', 'patchworks-raster'])

  • with_topology (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.patchworks_instances_list(registry=<typer.models.OptionInfo object>)[source]

List Patchworks instances available through the FEMIC variant registry.

Parameters:

registry (Path)

Return type:

None

femic.cli.main.patchworks_matrix_build(config=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, interactive=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run Patchworks matrix-builder and emit logs/manifests.

Parameters:
  • config (Path)

  • log_dir (Path)

  • run_id (str | None)

  • interactive (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.patchworks_preflight(config=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run Patchworks runtime preflight checks from a config file.

Parameters:
  • config (Path)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.patchworks_run_default_scenario(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, allow_large_download=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Run the default registry-backed Patchworks scenario for one variant.

Parameters:
  • variant_id (str)

  • registry (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • allow_large_download (bool)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_run_default_scenario_set(instance_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, allow_large_download=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Run the default registry-backed Patchworks scenario set for one instance.

Parameters:
  • instance_id (str)

  • registry (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • allow_large_download (bool)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_run_headless(pin=<typer.models.ArgumentInfo object>, config=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, iterations=<typer.models.OptionInfo object>, improvement=<typer.models.OptionInfo object>, scenario_mode=<typer.models.OptionInfo object>, scenario_target=<typer.models.OptionInfo object>, scenario_min_annual=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run a Patchworks PIN unattended via the no-GUI BeanShell/AppChooser seam.

Parameters:
  • pin (Path)

  • config (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • iterations (int)

  • improvement (float)

  • scenario_mode (str)

  • scenario_target (str | None)

  • scenario_min_annual (float | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.patchworks_run_scenario(variant_id=<typer.models.ArgumentInfo object>, scenario_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, allow_large_download=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Run one named registry-backed Patchworks scenario.

Parameters:
  • variant_id (str)

  • scenario_id (str)

  • registry (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • allow_large_download (bool)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_run_scenario_set(scenario_set_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, allow_large_download=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Run one named registry-backed Patchworks scenario set sequentially.

Parameters:
  • scenario_set_id (str)

  • registry (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • allow_large_download (bool)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_run_variant(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, stage_label=<typer.models.OptionInfo object>, iterations=<typer.models.OptionInfo object>, improvement=<typer.models.OptionInfo object>, scenario_mode=<typer.models.OptionInfo object>, scenario_target=<typer.models.OptionInfo object>, scenario_min_annual=<typer.models.OptionInfo object>, allow_large_download=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Resolve a registered Patchworks variant and delegate to the headless runner.

Parameters:
  • variant_id (str)

  • registry (Path)

  • log_dir (Path)

  • run_id (str | None)

  • stage_label (str | None)

  • iterations (int)

  • improvement (float)

  • scenario_mode (str)

  • scenario_target (str | None)

  • scenario_min_annual (float | None)

  • allow_large_download (bool)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_scenario_sets_list(registry=<typer.models.OptionInfo object>, instance_id=<typer.models.OptionInfo object>)[source]

List named Patchworks scenario sets available through the FEMIC registry.

Parameters:
  • registry (Path)

  • instance_id (str | None)

Return type:

None

femic.cli.main.patchworks_scenario_sets_show(scenario_set_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>)[source]

Show one resolved Patchworks scenario-set entry.

Parameters:
  • scenario_set_id (str)

  • registry (Path)

Return type:

None

femic.cli.main.patchworks_scenarios_list(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>)[source]

List named scenarios attached to one Patchworks registry variant.

Parameters:
  • variant_id (str)

  • registry (Path)

Return type:

None

femic.cli.main.patchworks_variants_list(registry=<typer.models.OptionInfo object>, instance_id=<typer.models.OptionInfo object>)[source]

List Patchworks variants available through the FEMIC registry.

Parameters:
  • registry (Path)

  • instance_id (str | None)

Return type:

None

femic.cli.main.patchworks_variants_materialization_plan(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Show the prelaunch materialization plan for one Patchworks variant.

Parameters:
  • variant_id (str)

  • registry (Path)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_variants_register(variant_id=<typer.models.ArgumentInfo object>, label=<typer.models.OptionInfo object>, instance_id=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, analysis_pin=<typer.models.OptionInfo object>, runtime_config=<typer.models.OptionInfo object>, variant_family=<typer.models.OptionInfo object>, kind=<typer.models.OptionInfo object>, default=<typer.models.OptionInfo object>, instance_label=<typer.models.OptionInfo object>, registry=<typer.models.OptionInfo object>)[source]

Register one new user-managed Patchworks variant entry.

Parameters:
  • variant_id (str)

  • label (str)

  • instance_id (str)

  • instance_root (Path)

  • analysis_pin (Path)

  • runtime_config (Path)

  • variant_family (str)

  • kind (str)

  • default (bool)

  • instance_label (str | None)

  • registry (Path)

Return type:

None

femic.cli.main.patchworks_variants_remove(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>)[source]

Remove one user-managed Patchworks variant entry from the overlay registry.

Parameters:
  • variant_id (str)

  • registry (Path)

Return type:

None

femic.cli.main.patchworks_variants_show(variant_id=<typer.models.ArgumentInfo object>, registry=<typer.models.OptionInfo object>, materialization_threshold_mib=<typer.models.OptionInfo object>)[source]

Show one resolved Patchworks variant entry.

Parameters:
  • variant_id (str)

  • registry (Path)

  • materialization_threshold_mib (int)

Return type:

None

femic.cli.main.patchworks_variants_update(variant_id=<typer.models.ArgumentInfo object>, label=<typer.models.OptionInfo object>, instance_id=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, analysis_pin=<typer.models.OptionInfo object>, runtime_config=<typer.models.OptionInfo object>, variant_family=<typer.models.OptionInfo object>, kind=<typer.models.OptionInfo object>, default=<typer.models.OptionInfo object>, instance_label=<typer.models.OptionInfo object>, registry=<typer.models.OptionInfo object>)[source]

Update one Patchworks variant through the writable user overlay registry.

Parameters:
  • variant_id (str)

  • label (str | None)

  • instance_id (str | None)

  • instance_root (Path | None)

  • analysis_pin (Path | None)

  • runtime_config (Path | None)

  • variant_family (str | None)

  • kind (str | None)

  • default (bool | None)

  • instance_label (str | None)

  • registry (Path)

Return type:

None

femic.cli.main.pipelines_run(runbook=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run the first named-pipeline proof surface from a machine-readable runbook.

Parameters:
  • runbook (Path)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.prep_accepted_btc_handoff(btc_input=<typer.models.OptionInfo object>, btc_output=<typer.models.OptionInfo object>, treated_curves=<typer.models.OptionInfo object>, btc_error=<typer.models.OptionInfo object>, treated_curve_diagnostics=<typer.models.OptionInfo object>, tipsy_parameter_crosswalk=<typer.models.OptionInfo object>, curve_id_map=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Validate accepted BTC handoff artifacts before post-TIPSY assembly.

Parameters:
  • btc_input (Path)

  • btc_output (Path)

  • treated_curves (Path)

  • btc_error (Path | None)

  • treated_curve_diagnostics (Path | None)

  • tipsy_parameter_crosswalk (Path | None)

  • curve_id_map (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.prep_arbutus_auth_init(profile=<typer.models.OptionInfo object>, bucket=<typer.models.OptionInfo object>, dataset=<typer.models.OptionInfo object>, remote=<typer.models.OptionInfo object>, force_refresh_loaders=<typer.models.OptionInfo object>)[source]

Scaffold, validate, and persist Windows Arbutus auth/profile state.

Parameters:
  • profile (str | None)

  • bucket (str | None)

  • dataset (Path | None)

  • remote (str)

  • force_refresh_loaders (bool)

Return type:

None

femic.cli.main.prep_arbutus_auth_status(profile=<typer.models.OptionInfo object>, dataset=<typer.models.OptionInfo object>, remote=<typer.models.OptionInfo object>)[source]

Report Windows Arbutus auth/profile/marker status without mutating it.

Parameters:
  • profile (str | None)

  • dataset (Path | None)

  • remote (str | None)

Return type:

None

femic.cli.main.prep_arcgis_review_project(instance_root=<typer.models.OptionInfo object>, output_dir=<typer.models.OptionInfo object>, project_name=<typer.models.OptionInfo object>)[source]

Emit a ready-to-open ArcGIS Pro review project for one FEMIC instance.

Parameters:
  • instance_root (Path | None)

  • output_dir (Path | None)

  • project_name (str | None)

Return type:

None

femic.cli.main.prep_geospatial_preflight(strict_warnings=<typer.models.OptionInfo object>, skip_shapefile_smoke=<typer.models.OptionInfo object>)[source]

Verify geospatial runtime dependencies and optional shapefile smoke checks.

Parameters:
  • strict_warnings (bool)

  • skip_shapefile_smoke (bool)

Return type:

None

femic.cli.main.prep_glb_build(tsa=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, output_dir=<typer.models.OptionInfo object>, source_zip_path=<typer.models.OptionInfo object>, boundary_path=<typer.models.OptionInfo object>, force_rebuild_glb=<typer.models.OptionInfo object>, no_stash_public_data_glb=<typer.models.OptionInfo object>, force_update_public_data_glb=<typer.models.OptionInfo object>)[source]

Build and report a clean raw-source GLB clip for one TSA.

Parameters:
  • tsa (str)

  • instance_root (Path | None)

  • output_dir (Path | None)

  • source_zip_path (Path | None)

  • boundary_path (Path | None)

  • force_rebuild_glb (bool)

  • no_stash_public_data_glb (bool)

  • force_update_public_data_glb (bool)

Return type:

None

femic.cli.main.prep_run(data_root=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, resume=<typer.models.OptionInfo object>, dry_run=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Placeholder prep command retained for CLI compatibility.

Parameters:
  • data_root (Path)

  • output_root (Path)

  • tsa (list[str] | None)

  • resume (bool)

  • dry_run (bool)

  • verbose (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.prep_validate_case(run_config=<typer.models.OptionInfo object>, tipsy_config_dir=<typer.models.OptionInfo object>, strict_warnings=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Validate run config, case selections, and required input paths.

Parameters:
  • run_config (Path)

  • tipsy_config_dir (Path)

  • strict_warnings (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.run_all(data_root=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, resume=<typer.models.OptionInfo object>, dry_run=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, skip_checks=<typer.models.OptionInfo object>, debug_rows=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_config=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run the end-to-end data-prep pipeline from current CLI inputs/profile.

Parameters:
  • data_root (Path)

  • output_root (Path)

  • tsa (list[str] | None)

  • resume (bool)

  • dry_run (bool)

  • verbose (bool)

  • skip_checks (bool)

  • debug_rows (int | None)

  • run_id (str | None)

  • log_dir (Path)

  • run_config (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tipsy_probe_btc_columns(input_csv=<typer.models.ArgumentInfo object>, column=<typer.models.OptionInfo object>, indicator_bank=<typer.models.OptionInfo object>, source_rpt=<typer.models.OptionInfo object>, preset=<typer.models.OptionInfo object>, btc_exe=<typer.models.OptionInfo object>, scratch_dir=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id_prefix=<typer.models.OptionInfo object>, summary_json=<typer.models.OptionInfo object>, variant_strategy=<typer.models.OptionInfo object>, runtime_layout=<typer.models.OptionInfo object>, alias_override=<typer.models.OptionInfo object>, attempt_timeout_seconds=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Probe BTC report-column compatibility token-by-token or bank-by-bank.

Parameters:
  • input_csv (Path)

  • column (list[str])

  • indicator_bank (list[str])

  • source_rpt (Path | None)

  • preset (str | None)

  • btc_exe (Path | None)

  • scratch_dir (Path | None)

  • log_dir (Path)

  • run_id_prefix (str)

  • summary_json (Path | None)

  • variant_strategy (str)

  • runtime_layout (str)

  • alias_override (list[str])

  • attempt_timeout_seconds (float)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tipsy_run_btc(input_csv=<typer.models.ArgumentInfo object>, mode=<typer.models.OptionInfo object>, output_csv=<typer.models.OptionInfo object>, error_csv=<typer.models.OptionInfo object>, btc_exe=<typer.models.OptionInfo object>, report_template=<typer.models.OptionInfo object>, report_preset=<typer.models.OptionInfo object>, indicator_bank=<typer.models.OptionInfo object>, copy_install=<typer.models.OptionInfo object>, scratch_dir=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run BTC in supervised CLI mode with optional copied-install report override.

Parameters:
  • input_csv (Path)

  • mode (str)

  • output_csv (Path | None)

  • error_csv (Path | None)

  • btc_exe (Path | None)

  • report_template (Path | None)

  • report_preset (str | None)

  • indicator_bank (list[str] | None)

  • copy_install (bool)

  • scratch_dir (Path | None)

  • log_dir (Path)

  • run_id (str | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tipsy_validate(config_dir=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Validate per-case/per-FMU TIPSY YAML config availability and parseability.

Parameters:
  • config_dir (Path)

  • tsa (list[str] | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tipsy_write_btc_report_template(output=<typer.models.ArgumentInfo object>, source_rpt=<typer.models.OptionInfo object>, preset=<typer.models.OptionInfo object>, name=<typer.models.OptionInfo object>, clear_columns=<typer.models.OptionInfo object>, column=<typer.models.OptionInfo object>, indicator_bank=<typer.models.OptionInfo object>, header_flag=<typer.models.OptionInfo object>, report_type=<typer.models.OptionInfo object>, identifier=<typer.models.OptionInfo object>, identifier_integer=<typer.models.OptionInfo object>, output_format=<typer.models.OptionInfo object>, icon_id=<typer.models.OptionInfo object>, border=<typer.models.OptionInfo object>, header_height=<typer.models.OptionInfo object>, footer_height=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Write a BTC custom-report template from a preset or existing .rpt file.

Parameters:
  • output (Path)

  • source_rpt (Path | None)

  • preset (str | None)

  • name (str | None)

  • clear_columns (bool)

  • column (list[str] | None)

  • indicator_bank (list[str] | None)

  • header_flag (list[str] | None)

  • report_type (str | None)

  • identifier (str | None)

  • identifier_integer (bool | None)

  • output_format (str | None)

  • icon_id (int | None)

  • border (int | None)

  • header_height (int | None)

  • footer_height (int | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tsa_btc_post_tipsy(tsa=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_config=<typer.models.OptionInfo object>, yield_assumptions_path=<typer.models.OptionInfo object>, btc_exe=<typer.models.OptionInfo object>, scratch_dir=<typer.models.OptionInfo object>, report_preset=<typer.models.OptionInfo object>, indicator_bank=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Run unattended BTC for selected FMU/code targets, then resume post-TIPSY bundle assembly.

Parameters:
  • tsa (list[str] | None)

  • verbose (bool)

  • run_id (str | None)

  • log_dir (Path)

  • run_config (Path | None)

  • yield_assumptions_path (Path | None)

  • btc_exe (Path | None)

  • scratch_dir (Path | None)

  • report_preset (str)

  • indicator_bank (list[str] | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tsa_post_tipsy(tsa=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, run_id=<typer.models.OptionInfo object>, log_dir=<typer.models.OptionInfo object>, run_config=<typer.models.OptionInfo object>, yield_assumptions_path=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Build post-TIPSY bundle tables for selected FMU/code targets.

Parameters:
  • tsa (list[str] | None)

  • verbose (bool)

  • run_id (str | None)

  • log_dir (Path)

  • run_config (Path | None)

  • yield_assumptions_path (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tsa_run(data_root=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, resume=<typer.models.OptionInfo object>, dry_run=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Placeholder FMU/code command retained behind the legacy tsa CLI seam.

Parameters:
  • data_root (Path)

  • output_root (Path)

  • tsa (list[str] | None)

  • resume (bool)

  • dry_run (bool)

  • verbose (bool)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tsr_build_yield_bridge(tsa=<typer.models.OptionInfo object>, run_config=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Build the bounded AFLB -> strata/AU yield-bridge artifacts.

Parameters:
  • tsa (list[str] | None)

  • run_config (Path | None)

  • instance_root (Path | None)

Return type:

None

femic.cli.main.tsr_extract(documents_path=<typer.models.OptionInfo object>, corpus_root=<typer.models.OptionInfo object>, output_path=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, max_documents=<typer.models.OptionInfo object>)[source]

Extract reviewable TSR candidate facts from cached PDFs.

Parameters:
  • documents_path (Path | None)

  • corpus_root (Path | None)

  • output_path (Path | None)

  • tsa (list[str] | None)

  • max_documents (int | None)

Return type:

None

femic.cli.main.tsr_facts_report(tsa=<typer.models.OptionInfo object>, fact_family=<typer.models.OptionInfo object>, candidate_facts_path=<typer.models.OptionInfo object>, output_csv=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>)[source]

Render review-friendly TSR fact rows from the canonical candidate pool.

Parameters:
  • tsa (str)

  • fact_family (list[str])

  • candidate_facts_path (Path | None)

  • output_csv (Path | None)

  • limit (int | None)

Return type:

None

femic.cli.main.tsr_fetch(documents_path=<typer.models.OptionInfo object>, corpus_root=<typer.models.OptionInfo object>, manifest_path=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, max_documents=<typer.models.OptionInfo object>)[source]

Fetch/cache TSR PDFs referenced by the canonical TSA documents inventory.

Parameters:
  • documents_path (Path | None)

  • corpus_root (Path | None)

  • manifest_path (Path | None)

  • tsa (list[str] | None)

  • max_documents (int | None)

Return type:

None

femic.cli.main.tsr_index(output_root=<typer.models.OptionInfo object>)[source]

Index BC TSR TSA document surfaces into canonical registry JSON artifacts.

Parameters:

output_root (Path | None)

Return type:

None

femic.cli.main.tsr_overlay_init(tsa=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, registry_path=<typer.models.OptionInfo object>, documents_path=<typer.models.OptionInfo object>, candidate_facts_path=<typer.models.OptionInfo object>, overlay_path=<typer.models.OptionInfo object>, overwrite=<typer.models.OptionInfo object>)[source]

Initialize a reviewed/adopted TSR overlay YAML for one instance.

Parameters:
  • tsa (str)

  • instance_root (Path | None)

  • registry_path (Path | None)

  • documents_path (Path | None)

  • candidate_facts_path (Path | None)

  • overlay_path (Path | None)

  • overwrite (bool)

Return type:

None

femic.cli.main.tsr_overlay_report(instance_root=<typer.models.OptionInfo object>, overlay_path=<typer.models.OptionInfo object>)[source]

Report reviewed/adopted TSR overlay state for one instance.

Parameters:
  • instance_root (Path | None)

  • overlay_path (Path | None)

Return type:

None

femic.cli.main.tsr_override_init(instance_root=<typer.models.OptionInfo object>, overlay_path=<typer.models.OptionInfo object>, overrides_path=<typer.models.OptionInfo object>, overwrite=<typer.models.OptionInfo object>)[source]

Initialize a per-instance TSR source-layer override template.

Parameters:
  • instance_root (Path | None)

  • overlay_path (Path | None)

  • overrides_path (Path | None)

  • overwrite (bool)

Return type:

None

femic.cli.main.tsr_override_report(instance_root=<typer.models.OptionInfo object>, overlay_path=<typer.models.OptionInfo object>, overrides_path=<typer.models.OptionInfo object>)[source]

Report per-instance TSR source-layer override coverage.

Parameters:
  • instance_root (Path | None)

  • overlay_path (Path | None)

  • overrides_path (Path | None)

Return type:

None

femic.cli.main.tsr_recipe_init(tsa=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>, registry_path=<typer.models.OptionInfo object>, documents_path=<typer.models.OptionInfo object>, candidate_facts_path=<typer.models.OptionInfo object>, overlay_path=<typer.models.OptionInfo object>, overrides_path=<typer.models.OptionInfo object>, source_layers_recipe_path=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, overwrite=<typer.models.OptionInfo object>)[source]

Initialize instance-local TSR source-layer and THLB recipe YAML files.

Parameters:
  • tsa (str)

  • instance_root (Path | None)

  • registry_path (Path | None)

  • documents_path (Path | None)

  • candidate_facts_path (Path | None)

  • overlay_path (Path | None)

  • overrides_path (Path | None)

  • source_layers_recipe_path (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • overwrite (bool)

Return type:

None

femic.cli.main.tsr_source_layers_build(instance_root=<typer.models.OptionInfo object>, source_layers_recipe_path=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>)[source]

Build the reviewed source-layer recipe from TSR facts and BCDC knowledge.

Parameters:
  • instance_root (Path | None)

  • source_layers_recipe_path (Path | None)

  • limit (int)

Return type:

None

femic.cli.main.tsr_source_layers_run(instance_root=<typer.models.OptionInfo object>, source_layers_recipe_path=<typer.models.OptionInfo object>, bbox=<typer.models.OptionInfo object>, geomark=<typer.models.OptionInfo object>, limit=<typer.models.OptionInfo object>, allow_order=<typer.models.OptionInfo object>)[source]

Execute safe acquisition steps from the reviewed source-layer recipe.

Parameters:
  • instance_root (Path | None)

  • source_layers_recipe_path (Path | None)

  • bbox (str | None)

  • geomark (str | None)

  • limit (int)

  • allow_order (bool)

Return type:

None

femic.cli.main.tsr_thlb_netdown_build(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>)[source]

Build the reviewed THLB netdown recipe from TSR facts and source-layer state.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_parallel_benchmark(instance_root=<typer.models.OptionInfo object>, parent_step_id=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, checkpoint_path=<typer.models.OptionInfo object>, landscape_unit=<typer.models.OptionInfo object>, worker_count=<typer.models.OptionInfo object>)[source]

Benchmark serial vs LU-parallel THLB parent-step execution.

Parameters:
  • instance_root (Path | None)

  • parent_step_id (list[str])

  • thlb_netdown_recipe_path (Path | None)

  • checkpoint_path (Path | None)

  • landscape_unit (list[str] | None)

  • worker_count (list[int] | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_run(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, checkpoint_path=<typer.models.OptionInfo object>, output_path=<typer.models.OptionInfo object>, audit_path=<typer.models.OptionInfo object>, execution_mode=<typer.models.OptionInfo object>, map_id=<typer.models.OptionInfo object>, auto_map_id_smoke_subset=<typer.models.OptionInfo object>, allow_stand_binary_fallback=<typer.models.OptionInfo object>, no_aflb_gpkg=<typer.models.OptionInfo object>, no_lhlb_gpkg=<typer.models.OptionInfo object>, no_lhlb_curve_ready_gpkg=<typer.models.OptionInfo object>, parallel_mode='auto', max_workers=<typer.models.OptionInfo object>, lu_bundle_count=<typer.models.OptionInfo object>)[source]

Execute the reviewed THLB netdown recipe in hybrid or reconstructed mode.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • checkpoint_path (Path | None)

  • output_path (Path | None)

  • audit_path (Path | None)

  • execution_mode (str)

  • map_id (list[str] | None)

  • auto_map_id_smoke_subset (bool)

  • allow_stand_binary_fallback (bool)

  • no_aflb_gpkg (bool)

  • no_lhlb_gpkg (bool)

  • no_lhlb_curve_ready_gpkg (bool)

  • parallel_mode (str)

  • max_workers (int | None)

  • lu_bundle_count (int | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_step_run(instance_root=<typer.models.OptionInfo object>, parent_step_id=<typer.models.ArgumentInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, checkpoint_path=<typer.models.OptionInfo object>, map_id=<typer.models.OptionInfo object>, landscape_unit=<typer.models.OptionInfo object>, auto_map_id_smoke_subset=<typer.models.OptionInfo object>, execution_mode=<typer.models.OptionInfo object>, max_workers=<typer.models.OptionInfo object>, lu_bundle_count=<typer.models.OptionInfo object>, progress_root=<typer.models.OptionInfo object>)[source]

Execute one THLB parent step cumulatively on the smoke subset.

Parameters:
  • instance_root (Path | None)

  • parent_step_id (str)

  • thlb_netdown_recipe_path (Path | None)

  • checkpoint_path (Path | None)

  • map_id (list[str] | None)

  • landscape_unit (list[str] | None)

  • auto_map_id_smoke_subset (bool)

  • execution_mode (str)

  • max_workers (int | None)

  • lu_bundle_count (int | None)

  • progress_root (Path | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_warmstart_build(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, output_markdown=<typer.models.OptionInfo object>, output_yaml=<typer.models.OptionInfo object>)[source]

Generate non-canonical THLB warm-start checklist/template artifacts.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • output_markdown (Path | None)

  • output_yaml (Path | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_workbench_build(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, workbench_path=<typer.models.OptionInfo object>)[source]

Generate the instance-local THLB workbench notebook from the current recipe.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • workbench_path (Path | None)

Return type:

None

femic.cli.main.tsr_thlb_netdown_workbench_lock(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, workbench_path=<typer.models.OptionInfo object>, lock_scope=<typer.models.OptionInfo object>)[source]

Freeze the current THLB workbench into a locked script + frozen report bundle.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • workbench_path (Path | None)

  • lock_scope (str)

Return type:

None

femic.cli.main.tsr_thlb_reconstruction_compare(instance_root=<typer.models.OptionInfo object>, thlb_netdown_recipe_path=<typer.models.OptionInfo object>, reconstructed_audit_path=<typer.models.OptionInfo object>, reviewed_status_path=<typer.models.OptionInfo object>, output_markdown=<typer.models.OptionInfo object>, output_json=<typer.models.OptionInfo object>)[source]

Emit a strict-vs-reviewed THLB comparison report.

Parameters:
  • instance_root (Path | None)

  • thlb_netdown_recipe_path (Path | None)

  • reconstructed_audit_path (Path | None)

  • reviewed_status_path (Path | None)

  • output_markdown (Path | None)

  • output_json (Path | None)

Return type:

None

femic.cli.main.tsr_thlb_step13_compile_attributes(instance_root=<typer.models.OptionInfo object>, checkpoint_path=<typer.models.OptionInfo object>, output_path=<typer.models.OptionInfo object>)[source]

Compile the stand attributes needed to execute TSR step 13 directly.

Parameters:
  • instance_root (Path | None)

  • checkpoint_path (Path | None)

  • output_path (Path | None)

Return type:

None

femic.cli.main.vdyp_report(curve_log=<typer.models.OptionInfo object>, run_log=<typer.models.OptionInfo object>, expected_first_age=<typer.models.OptionInfo object>, expected_first_volume=<typer.models.OptionInfo object>, tolerance=<typer.models.OptionInfo object>, mismatch_limit=<typer.models.OptionInfo object>, max_curve_warnings=<typer.models.OptionInfo object>, max_first_point_mismatches=<typer.models.OptionInfo object>, max_curve_parse_errors=<typer.models.OptionInfo object>, max_run_parse_errors=<typer.models.OptionInfo object>, min_curve_events=<typer.models.OptionInfo object>, min_run_events=<typer.models.OptionInfo object>, selection_summary_out=<typer.models.OptionInfo object>)[source]

Summarize VDYP logs and enforce warning/error budget thresholds.

Parameters:
  • curve_log (Path)

  • run_log (Path)

  • expected_first_age (float)

  • expected_first_volume (float)

  • tolerance (float)

  • mismatch_limit (int)

  • max_curve_warnings (int | None)

  • max_first_point_mismatches (int | None)

  • max_curve_parse_errors (int | None)

  • max_run_parse_errors (int | None)

  • min_curve_events (int | None)

  • min_run_events (int | None)

  • selection_summary_out (Path | None)

Return type:

None

femic.cli.main.vdyp_run(data_root=<typer.models.OptionInfo object>, output_root=<typer.models.OptionInfo object>, tsa=<typer.models.OptionInfo object>, resume=<typer.models.OptionInfo object>, dry_run=<typer.models.OptionInfo object>, verbose=<typer.models.OptionInfo object>, instance_root=<typer.models.OptionInfo object>)[source]

Placeholder VDYP command retained for CLI compatibility.

Parameters:
  • data_root (Path)

  • output_root (Path)

  • tsa (list[str] | None)

  • resume (bool)

  • dry_run (bool)

  • verbose (bool)

  • instance_root (Path | None)

Return type:

None