Repository navigation
Preserve string-bearing NetCDF input files - #370
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Fixes nasa#369. Preserve existing behavior outside the corrected error path.
3 of 4 tasks
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.
Fixes #369.
Description
Keep nonempty NetCDF inputs that contain text variables. Empty-file detection currently applies
numpy.isnanto text; the resulting TypeError is caught byvalidate_workable_files, which silently drops the input. A station-name variable preceding populated measurements is enough to produce an empty workable-file list and no concatenated output.Handle variable-length strings and character arrays separately, checking their unmasked values against the fill value. Zero-size, fill-only, and fully masked string variables remain empty. Numeric handling and the concatenation algorithms are unchanged. Includes an unreleased changelog entry.
This is newly reproduced on develop
581d7d41. Issue #369 was opened on 24 September 2026. Before submission it was unassigned, with no other claimant or matching open PR.Local test steps
data_vars="all"because its root is empty; the ordinary root-level fixtures use the default options.python -m pytest -q tests/unit --cov=stitchee --tb=short, passes 42 tests on macOS arm64/Python 3.12.11, with 91% total coverage.uv.lockdependencies on Python 3.13.5 (xarray 2025.12.0, NumPy 2.3.5, netCDF4 1.7.3).ruff check stitchee, syntax checks, andgit diff --checkpass. No test, dependency, or CI configuration was weakened.Overview of integration done
The new tests exercise local NetCDF creation, validation, concatenation, and output reading without Harmony credentials. The existing unit suite's local Harmony adapter tests also pass. Live Harmony requests were not submitted.
The additional
tests/localrun requires datasets absent from the repository: five tests fail with missing TEMPO/CERES input directories on both this branch and unchanged upstream; its synthetic-data control passes. These are not CI unit-suite failures. Character-array operations on the newer NumPy stack emit dependency deprecation warnings, while the frozen dependency run retains the existing warning types. Other operating systems and remote-service integration were not run locally.PR Acceptance Checklist