mostlyright.mode2
mostlyright.mode2
Section titled “mostlyright.mode2”Source-pinned observation dispatch (DEPRECATED module — Phase 30 D-04).
Deprecated
Section titled “Deprecated”Deprecated since version This: module and research_by_source() are deprecated. Pin observations
to a single named source with obs(source=..., granularity="observation")
from mostlyright.weather instead, and reach
assert_source_identity() from mostlyright.core. The
mostlyright.mode2 import path is retained for backward compatibility and
scheduled for removal at least two minor releases out.
The default source-blind join (mostlyright.dataset() /
mostlyright.research()) uses an internal AWC > IEM > GHCNh priority.
Source-pinned dispatch lets the caller pin observations to a single named
source — the workflow Vojtech wanted for strategies that need
source-identified training pairs that backtest the same way they trade.
Surface:
research_by_source(station, source, from_date, to_date)()— source-pinned entry point (deprecated). Returns a DataFrame where every row’ssourceis the suppliedsourceID.assert_source_identity(df, expected_source)()— raiseSourceMismatchErrorif any row’s source disagrees (canonical home is nowmostlyright.core.source_identity).
See docs/design.md §R for the source-identity invariant this surface
enforces.