Migration
Upgrade guide
One page, newest first, actions only. Every 1.x release is additive-plus-shims: existing calls keep returning the same bytes, deprecations warn for at least two minors, removals happen at 2.0. The changelog has the full detail per release; this page has what to do.
1.18: the domain-first map
Section titled “1.18: the domain-first map”A curation release finishing 1.17’s move. Zero call-site changes required; names re-map, bytes never change (live parity stays byte-green against the 0.14.1 fixtures).
- The root is the product now.
sorted(mostlyright.__all__)is exactly["ContractError", "LeakageError", "NoDataError", "__version__", "align", "econ", "markets", "spine", "weather"].mr.econfinally resolves at the root (it shipped in 1.16 but was never wired in), and it speaks the uniform grammar:econ.pairs(entity, from_date, to_date). - Stray root modules went private behind a runtime finder.
mostlyright.research/dataset/live/stations/snapshot/qc/international/forecasts/mode2/discoveryall keep working through 1.x with a once-per-sessionDeprecationWarningnaming the new home (mostlymostlyright.weather.*). Static tooling (pyright, IDE auto-import) stops offering the legacy paths immediately: that pressure is by design. - Transforms and preprocessing are exiting with NO replacement.
mostlyright.transforms(lag/diff/rolling/heat_index/…),mostlyright.preprocessing(clip_outliers/PHYSICS_BOUNDS/…), andcontracts.feature_catalogare removed at 2.0 and nothing replaces them: pandas/polars own transforms, features are user-land. Migrate to.shift/.diff/.rollingand your own winsorize. discoverydissolved into its domains:climate_gaps,availability,settlement_date_for,settlement_window_utcnow live onmostlyright.weather;describe/DataVersiononmostlyright.contracts.- Markets curated its surface:
markets.__all__is["__version__", "econ_trades", "kalshi", "polymarket"]; the standalone trade-history modules were privatized (no shim; they had no external importers). Trades enter viapairs(include_trades=True)andmarkets.econ_trades. discover,provenance,registry,contractsstay importable and documented but leavedir(mr): reference-tier machinery, no deprecation.- TypeScript: the meta barrel exports the domain namespaces (
import { weather, econ, markets, core } from "mostlyright"), fixing the missing econ dependency; the ~70 flat machinery re-exports are@deprecated(reach them via the namespaces), whiledatasetandresearchstay exported untouched in 1.x. - Frozen apps (PyInstaller and friends): legacy names resolve via a
MetaPathFinder, not on-disk files; either migrate off legacy imports or add the private impls (mostlyright._legacy_finder,mostlyright._research, …) as hidden imports.
1.17: compose with align and spine
Section titled “1.17: compose with align and spine”The composition redesign. Nothing you run today breaks.
- Move off root shims.
from mostlyright import research, dataset, Station, CATALOGandmostlyright.livenow emitDeprecationWarningand are removed at 2.0. New homes:weather.pairs()for the quickstart one-liner,mr.align/mr.spinefor composition,mostlyright.weather.stationsfor the registry,from mostlyright.weather import livefor live. - Markets naming:
markets.kalshi.dataset()andmarkets.polymarket.dataset()are shims for.pairs(). - The D-22 label warning is gone in Python. The planned “label default flips at 2.0” was cancelled:
pairs(..., label="cli")is an explicit, stable default with no deprecation path. Only the TypeScriptdataset()still fires the D-22 notice. features=[...]has no equivalent on the new surface: the sources you pass toalignare the feature list. Migrating a pinned feature set is a retrain event, not a find-replace.- Full mapping of all 26 old
dataset()kwargs to their new homes: Compose a dataset.
1.16: floors and packaging
Section titled “1.16: floors and packaging”- Node 20+ is the floor for all TypeScript packages (was 18). Python stays 3.11+.
- The econ domain began landing across 1.16 and 1.17; see the Econ guide for the shipped surface.
- No API changes requiring action.
1.15: the label axis and markets delegators
Section titled “1.15: the label axis and markets delegators”dataset()gained the explicitlabel=axis ("cli","daily_extremes",None, or a BYO frame). Passing it explicitly was and remains the right call; at 1.17 the explicit form became the only teaching.include_forecast/include_satellite/include_cwop/include_tradesbecame deprecated aliases offeatures=[...](andfeaturesitself retired at 1.17 in favor ofalignsources; skip straight to the current form).contract=/contracts=on coredataset()deprecated toward the markets layer: usemarkets.kalshi.pairs(ticker)today.- Multi-station panels (
stations=[...]) and the experimental contributor registry landed here; panels are now a list entity onpairs().
1.14: additive granularity
Section titled “1.14: additive granularity”granularity="observation"arrived ondataset()/obs()(per-report rows; the schema changes with granularity). Daily output stayed byte-identical to 1.13.settlement_dateappeared on per-reportobs()rows. If you cross-validate on sub-daily rows, group folds bysettlement_dateso one settlement day never spans train and test.
1.13: dataset() era begins
Section titled “1.13: dataset() era begins”dataset()became the primary composer withresearch()as its alias (both are shims as of 1.17: compose withpairs/alignin new code).- Per-report
obs()grain, standaloneclimate(), covariate columns, and the numbered-mode deprecation train landed. - If you run
-W errorin production, allowlistDeprecationWarningfrommostlyright.*during any migration window instead of muting warnings globally.
Coming from the decommissioned 0.14.1 hosted client (pip install mostlyright, the Client object, client.pairs()): that is a different product generation with its own page: Legacy 0.14.1 migration.
See also
Section titled “See also”- Changelog: every release in full detail
- Compose a dataset: the current composition surface
- Packages & versioning: deprecation policy and support floors