Skip to content

Upgrade the SDK

Mostly Right 3.0 removes the old daily-summary names, adds one market-data grammar across Kalshi and Polymarket, and changes satellite routing in Europe, Africa, and the Indian Ocean. Update both runtimes together and verify the returned sources and fields before deployment.

Terminal window
pip install --upgrade mostlyrightmd
pnpm add mostlyright@latest

The Python distribution is mostlyrightmd; the import remains mostlyright.

Before 3.03.0
Python weather.climate(...)weather.daily_summaries(...)
TypeScript climate(...) from @mostlyrightmd/weather/climatedailySummaries(...) from @mostlyrightmd/weather/daily-summaries
Python weather.label.cli(...)weather.label.daily_summary(...)
training_table(label="cli")training_table(label="daily_summary")
Python weather.climate_gaps(...)weather.daily_summary_gaps(...)
TypeScript climateGaps(...)dailySummaryGaps(...)

The old names have no compatibility aliases. Schema ids, source values such as cli.archive, and daily_summary_* row fields do not change.

Python now exposes series, events, markets, market, candles, trades, and orderbook directly under mostlyright.markets.kalshi and mostlyright.markets.polymarket. Polymarket has no series tier and raises VenueCapabilityError for that verb.

TypeScript uses the same verbs in camel case from @mostlyrightmd/markets/market-data:

import {
kalshiCandles,
polymarketTrades,
} from "@mostlyrightmd/markets/market-data";

Replace old economy_trades.candles() and /trades examples with the venue verbs. Deep Kalshi windows now switch to the historical tier after a live-tier 404 instead of returning a placeholder empty frame.

weather.satellite() now accepts either a station or lat and lon. Station resolution uses the full 6,419-station catalog.

Europe, Africa, and the Indian Ocean now route to Meteosat. Without EUMETSAT credentials, the call raises MeteosatCredentialsRequiredError. Pass satellite="viirs-n20" explicitly if you need the former VIIRS behavior. Do not let the selected source depend silently on whether a credential happens to be present.

  1. Replace the removed daily-summary imports and functions.
  2. Update market-data imports and check price units. Canonical prices now use probabilities from 0 to 1.
  3. Confirm satellite requests return the intended source in every deployment region.
  4. Re-run representative historical windows and compare row counts, fields, nulls, and sources.
  5. Deploy Python and TypeScript 3.0 together when your application shares their row schemas.

Version 2.0 was also a hard naming break. Apply this map before the 3.0 changes above.

1.x2.0
weather.obs(...)weather.observations(...)
weather.pairs(...)weather.training_table(...)
research(...), dataset(...)the relevant domain’s training_table(...)
econeconomy
economy.history(...)economy.series(...)
root align / spinemostlyright.experimental.align / mostlyright.experimental.spine
TypeScript dataset(...), research(...), pairs(...)trainingTable(...)
from datetime import date
from mostlyright import weather
df = weather.training_table(
"KNYC",
date(2025, 1, 6),
date(2025, 1, 9),
)

Per-report weather history now uses weather.observations(). Economic data lives under from mostlyright import economy.

import { trainingTable } from "mostlyright";
const { rows } = await trainingTable(
"KNYC",
"2025-01-06",
"2025-01-09",
);

Use the domain namespaces for lower-level reads, including weather.observations() and weather.latest().

Version 2.0 renames the main training-table prefixes:

1.x2.0
datelocal_standard_date
cli_*daily_summary_*
obs_*observed_*

Python and TypeScript use the same snake_case vocabulary. Verify the exact fields returned by the package version you deploy before freezing a model contract.

The SDK no longer ships transforms, preprocessing, or the old feature flags. Apply lags, rolling windows, clipping, and other feature engineering after the training table is returned, using pandas, Polars, or your own TypeScript code.

  1. Pin both SDK versions in your lockfiles.
  2. Re-run representative historical windows.
  3. Compare row counts, dates, labels, and null handling.
  4. Confirm live calls raise or return exactly as your application expects.
  5. Retrain any model whose input columns changed.