Fix Windows numpy build failure, swot-raster wrong default product, stale CLI test - #60
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, souv syncfell back to a source build requiring MSVC, which users don't have — reported as amesonpy.build_wheelfailure.HydroEO/cli/__init__.py: fixhydroeo fetch swot-raster's--productdefault, which wasSWOT_L2_HR_PIXC_2.0(a pixel-cloud product, invalid pervalidation.py's allowed raster products) instead ofSWOT_L2_HR_Raster_D. Running the command without--productsilently 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 switchedfetch_swot_raster/fetch_swot_pixcto setEARTHDATA_USERNAME/EARTHDATA_PASSWORDenv vars instead of passing acredentialskwarg (whichdownload_raster()/download_pixc()never accepted); add a regression test asserting the CLI's default product.Test plan
uv run pytest -m unit— 217 passeduv run ruff check HydroEO/ tests/— cleanSWOT_L2_HR_Raster_Dmatchesvalidation.py's allowedswot_raster.productlist andconfigs/swot_raster.yaml's default🤖 Generated with Claude Code