STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_model_catalog Namespace Reference

Functions

Catalog catalog (Path tmp_path)
None test_a_part_number_resolves_to_a_configured_component (Catalog catalog)
None test_a_measurement_overrides_the_datasheet (Catalog catalog)
None test_the_datasheet_value_is_not_erased (Catalog catalog)
None test_agreement_within_tolerance_is_not_flagged (Catalog catalog)
None test_per_instance_overrides_beat_the_catalog (Catalog catalog)
None test_a_catalog_entry_missing_a_required_parameter_fails_at_load (Path tmp_path)
None test_an_unknown_part_lists_what_is_available (Catalog catalog)
None test_a_part_must_declare_its_type (Path tmp_path)
None test_catalog_params_still_require_a_source (Path tmp_path)
None test_catalogs_layer (Path tmp_path, Catalog catalog)
None test_parts_can_be_listed_and_filtered (Catalog catalog)
None test_a_catalog_round_trips_through_dicts (Catalog catalog)
None test_measured_helper_tags_provenance ()

Variables

 CATALOG_TOML

Detailed Description

The parts database: resolving a part number into a configured component.

Phase 02's second exit criterion. The behaviour worth protecting beyond that is
the separation of datasheet values from measured ones: a measurement overrides
a claim without erasing it, so "this valve flows 5% under its rating" stays a
question anyone can ask later.

Function Documentation

◆ catalog()

Catalog test_model_catalog.catalog ( Path tmp_path)

Definition at line 71 of file test_model_catalog.py.

◆ test_a_catalog_entry_missing_a_required_parameter_fails_at_load()

None test_model_catalog.test_a_catalog_entry_missing_a_required_parameter_fails_at_load ( Path tmp_path)
With the parameter named, rather than as a missing key mid-solve.

Definition at line 133 of file test_model_catalog.py.

◆ test_a_catalog_round_trips_through_dicts()

None test_model_catalog.test_a_catalog_round_trips_through_dicts ( Catalog catalog)

Definition at line 230 of file test_model_catalog.py.

◆ test_a_measurement_overrides_the_datasheet()

None test_model_catalog.test_a_measurement_overrides_the_datasheet ( Catalog catalog)

Definition at line 90 of file test_model_catalog.py.

◆ test_a_part_must_declare_its_type()

None test_model_catalog.test_a_part_must_declare_its_type ( Path tmp_path)

Definition at line 161 of file test_model_catalog.py.

◆ test_a_part_number_resolves_to_a_configured_component()

None test_model_catalog.test_a_part_number_resolves_to_a_configured_component ( Catalog catalog)
Phase 02's exit criterion, stated directly.

Definition at line 77 of file test_model_catalog.py.

◆ test_agreement_within_tolerance_is_not_flagged()

None test_model_catalog.test_agreement_within_tolerance_is_not_flagged ( Catalog catalog)

Definition at line 115 of file test_model_catalog.py.

◆ test_an_unknown_part_lists_what_is_available()

None test_model_catalog.test_an_unknown_part_lists_what_is_available ( Catalog catalog)

Definition at line 156 of file test_model_catalog.py.

◆ test_catalog_params_still_require_a_source()

None test_model_catalog.test_catalog_params_still_require_a_source ( Path tmp_path)
The rule holds inside a catalog file too, not only in code.

Definition at line 168 of file test_model_catalog.py.

◆ test_catalogs_layer()

None test_model_catalog.test_catalogs_layer ( Path tmp_path,
Catalog catalog )
A shipped catalog, a team catalog, a campaign catalog -- in that order.

Definition at line 187 of file test_model_catalog.py.

◆ test_measured_helper_tags_provenance()

None test_model_catalog.test_measured_helper_tags_provenance ( )
What Phase 12 writes back when it fits a parameter to a flow test.

Definition at line 236 of file test_model_catalog.py.

◆ test_parts_can_be_listed_and_filtered()

None test_model_catalog.test_parts_can_be_listed_and_filtered ( Catalog catalog)

Definition at line 223 of file test_model_catalog.py.

◆ test_per_instance_overrides_beat_the_catalog()

None test_model_catalog.test_per_instance_overrides_beat_the_catalog ( Catalog catalog)
One valve was trimmed; this run of tube is longer. No new part number.

Definition at line 120 of file test_model_catalog.py.

◆ test_the_datasheet_value_is_not_erased()

None test_model_catalog.test_the_datasheet_value_is_not_erased ( Catalog catalog)
Overwriting would destroy the only record that a discrepancy exists.

A part measuring consistently below its rating is a finding -- mis-specified,
installed wrong, or an optimistic datasheet -- and all three become invisible
if the override replaces the original in place.

Definition at line 97 of file test_model_catalog.py.

Variable Documentation

◆ CATALOG_TOML

test_model_catalog.CATALOG_TOML
Initial value:
1= textwrap.dedent(
2
3)

Definition at line 25 of file test_model_catalog.py.