Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions tests/test_core_settings_parity.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""Contract tests guarding header/unit parity between cellpy and cellpy-core.
"""Contract tests guarding header/unit/limit parity between cellpy and cellpy-core.

``cellpy-core`` keeps verbatim copies of cellpy's authoritative settings classes
(``HeadersNormal``, ``HeadersSummary``, ``HeadersStepTable``, ``CellpyUnits``) in
``cellpycore.legacy`` so the integration seam (issue #377) produces identical column
names and units. These tests assert the copies stay field-for-field identical to
(``HeadersNormal``, ``HeadersSummary``, ``HeadersStepTable``, ``CellpyUnits``,
``CellpyLimits``) in ``cellpycore.legacy`` so the integration seam (issue #377)
produces identical column names, units, and step-type detection thresholds. These
tests assert the copies stay field-for-field identical to
``cellpy.parameters.internal_settings`` so drift in one repo fails loudly instead of
silently mismatching columns/units. See issue #378.
silently mismatching columns/units/limits. See issue #378.

The whole module is skipped when ``cellpy-core`` is not installed.
"""
Expand All @@ -19,13 +20,14 @@
from cellpy.parameters import internal_settings as cellpy_settings

# Classes that cellpy-core copies verbatim and must stay in sync with cellpy.
# NOTE: ``CellpyLimits`` is intentionally NOT yet ported to cellpy-core (the
# step-table port passes raw limits by value), so it is excluded here until ported.
# ``CellpyLimits`` (step-type detection thresholds) was ported to cellpy-core as part
# of STEP-08 and is now guarded here too.
SHARED_CLASSES = [
"HeadersNormal",
"HeadersSummary",
"HeadersStepTable",
"CellpyUnits",
"CellpyLimits",
]


Expand Down
Loading