Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions infra/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ resource "google_storage_bucket_iam_member" "backfill_progress_rw" {
# # resolvable station (D-28.8). run-weather-backfill.yml
# # sets the SAME TASK_COUNT=65 — keep them in LOCKSTEP
# # with the roster.
# # NOTE: the container passes no --satellites, so each shard
# # runs under the DEFAULT GOES-East/West satellites (Americas
# # / E-Pacific footprint). Shards for stations outside that
# # footprint (EU/Asia/Africa) cleanly NO-OP with a logged
# # exclusion (the CLI filters them, not fetch-empty-then-mark-
# # complete). Global native-ring coverage (Himawari/Meteosat/
# # VIIRS) is the 28-26 follow-up — add --satellites to cover it.
# parallelism = 16 # bounded concurrent Spot slices
# task_spec:
# max_run_duration = 21600s # 6h per-shard ceiling, caps a runaway (T-28.21-02)
Expand Down
19 changes: 19 additions & 0 deletions packages/weather/tests/satellite/test_roster.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
shard_roster,
)

# The station-resolution test imports satellite/_backfill, whose transport
# (_fetchers/_goes_s3) imports boto3 + s3fs + xarray at module scope — i.e. it needs
# the [satellite] optional extra. The base fast-suite (`uv sync --all-packages`,
# no extras) lacks them, so skip that one test there; the dedicated
# satellite-coverage job installs the extra and runs it. Mirrors test_cli_roster.
try:
import boto3 # noqa: F401
import s3fs # noqa: F401
import xarray # noqa: F401

_HAVE_SATELLITE_DEPS = True
except ImportError: # pragma: no cover - exercised only without the extra
_HAVE_SATELLITE_DEPS = False


def _live_kalshi_stations() -> set[str]:
from mostlyright.markets.catalog.kalshi_stations import KALSHI_SETTLEMENT_STATIONS
Expand Down Expand Up @@ -57,6 +71,11 @@ def test_non_satellite_stations_excluded_but_in_live_catalog() -> None:
assert station not in SETTLEMENT_STATION_ROSTER


@pytest.mark.skipif(
not _HAVE_SATELLITE_DEPS,
reason="station resolution imports satellite/_backfill → needs the [satellite] extra "
"(boto3/s3fs/xarray); runs in the satellite-coverage CI job",
)
def test_every_roster_station_resolves_to_a_satellite_station() -> None:
"""No silent empty shards: every roster station resolves to a StationInfo."""
from mostlyright.weather.satellite._backfill import _resolve_station_infos
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ dev = [
# dependency of any of the three published distributions. `httpx` (already a
# workspace dep) backs Starlette's TestClient.
"fastapi>=0.115,<1",
# Phase 28 (28-13): the `services/earnings/jobs/` Cloud Run entrypoints are
# NON-published monorepo services, but their tests run in the fast-suite
# (`uv sync --all-packages` installs no optional extras), so their deploy deps
# must be dev/test deps of the WORKSPACE (same pattern as fastapi above):
# google-cloud-pubsub / google-cloud-storage back the capture + STT job tests
# (the `google.cloud` namespace must import even though the clients are faked).
# NOTE: boto3 is deliberately NOT added here — it is the [satellite]-extra
# MARKER several satellite tests key their skip-guard on (e.g.
# test_satellite_leakage), so adding it would make those guards falsely fire and
# then crash on the still-absent s3fs/xarray. Tests that genuinely need boto3
# (the R2 read/sink path) guard on it themselves and run in the satellite/deploy
# lanes. NONE enter a PyPI dist (dev group only).
"google-cloud-pubsub>=2.18,<3",
"google-cloud-storage>=2.10,<4",
]

# Phase 15 W1: documentation toolchain (Sphinx + autodoc + Markdown builder).
Expand Down
16 changes: 16 additions & 0 deletions services/earnings/tests/test_serving_r2_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
from services.earnings.deps import ServingState
from services.earnings.r2_read import EarningsR2Reader, R2LedgerSource

# The R2 read path is an S3-compat (boto3/botocore) client, and these tests raise
# botocore ClientErrors to exercise the NoSuchKey-vs-real-error split. boto3 is the
# [satellite]-extra marker (deliberately NOT a base fast-suite dep — see the root
# pyproject dev group), so skip this module when it is absent; it runs in the
# satellite/deploy lanes where the extra is installed. Mirrors test_cli_roster.
try:
import boto3 # noqa: F401

_HAVE_BOTO3 = True
except ImportError: # pragma: no cover - exercised only without the extra
_HAVE_BOTO3 = False

pytestmark = pytest.mark.skipif(
not _HAVE_BOTO3, reason="serving R2 read tests need boto3/botocore ([satellite]-extra marker)"
)


def _parquet_bytes(rows: list[dict]) -> bytes:
buf = io.BytesIO()
Expand Down
63 changes: 63 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading