Skip to content

Fix Windows numpy build failure, swot-raster wrong default product, stale CLI test - #60

Merged
kzalite merged 5 commits into
mainfrom
fix/cli-swot-raster-and-lock
Sep 3, 2026
Merged

Fix Windows numpy build failure, swot-raster wrong default product, stale CLI test#60
kzalite merged 5 commits into
mainfrom
fix/cli-swot-raster-and-lock

Conversation

@kzalite

@kzalite kzalite commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • uv.lock: re-lock numpy so it resolves to 2.4.6 (Python <3.12) / 2.5.2 (Python >=3.12) instead of 2.0.2 for Python >=3.12 on non-ARM64 Windows. 2.0.2 has no cp313/cp314 wheels, so uv sync fell back to a source build requiring MSVC, which users don't have — reported as a mesonpy.build_wheel failure.
  • HydroEO/cli/__init__.py: fix hydroeo fetch swot-raster's --product default, which was SWOT_L2_HR_PIXC_2.0 (a pixel-cloud product, invalid per validation.py's allowed raster products) instead of SWOT_L2_HR_Raster_D. Running the command without --product silently searched for a PIXC granule name via the raster query path and returned zero granules (granule_name must be of type string or Iterable of strings). The equivalent YAML config path was unaffected — its own default was always correct.
  • tests/unit/test_cli.py: fix two tests left stale by PR Fix/dwn pixc #57, which switched fetch_swot_raster/fetch_swot_pixc to set EARTHDATA_USERNAME/EARTHDATA_PASSWORD env vars instead of passing a credentials kwarg (which download_raster()/download_pixc() never accepted); add a regression test asserting the CLI's default product.

Test plan

  • uv run pytest -m unit — 217 passed
  • uv run ruff check HydroEO/ tests/ — clean
  • Confirmed numpy 2.4.6/2.5.2 both ship win_amd64/win32 wheels for cp311-cp314
  • Confirmed SWOT_L2_HR_Raster_D matches validation.py's allowed swot_raster.product list and configs/swot_raster.yaml's default

🤖 Generated with Claude Code

kzalite and others added 5 commits September 3, 2026 13:25
PR #57 switched fetch_swot_raster to set EARTHDATA_USERNAME/PASSWORD env
vars instead of passing a credentials kwarg to download_raster() (which
never accepted one), but left two tests still asserting on that kwarg.
Update them to check the env vars the CLI actually sets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The CLI's --product default for `fetch swot-raster` was
SWOT_L2_HR_PIXC_2.0 (a pixel-cloud product), not a valid raster
product per validation.py's allowed list
(SWOT_L2_HR_Raster_D/SWOT_L2_LR_SSH_2.0/SWOT_L2_HR_RIVERSP_2.0) or the
config default in configs/swot_raster.yaml. Running the command
without --product sent a PIXC granule name through the raster query
path, which errored ("granule_name must be of type string or
Iterable of strings") and silently returned zero granules. Default
now matches the YAML config path, which was unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Old lock pinned numpy 2.0.2 for Python >=3.12 on non-ARM64 Windows, which
has no prebuilt wheel for cp313/cp314 and forced a meson source build
requiring an MSVC compiler users don't have. Relocking picks numpy 2.4.6
(Python <3.12) / 2.5.2 (Python >=3.12), both with full wheel coverage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
chartboost/ruff-action@v1 installs the latest ruff from PyPI with no
version pin. Ruff 0.16.x changed its default rule selection (when a
project config sets no explicit lint.select) from a narrow default
set to effectively every ruleset, so CI's lint job was failing with
hundreds of errors (N999, TRY004, I001, ...) unrelated to this
project's actual style config, blocking the gated unit-tests job on
every PR. Pin to 0.15.7, the version already locked as this project's
dev dependency, and scope src to HydroEO to match `make lint`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kzalite
kzalite merged commit 581e79a into main Sep 3, 2026
8 checks passed
@kzalite
kzalite deleted the fix/cli-swot-raster-and-lock branch September 3, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant