feat(fleet): zero-value climate results for low-altitude flights & dependency updates (v0.7.10) - #66
Merged
Merged
Conversation
…hreshold for non-co2 over co2 climate impact
…ghts [AXM-907] Add _build_zero_climate_result() to produce all-zero climate payloads for flights rejected due to low altitude. Modified _extract_results() to separate low-altitude errors from other errors and transform them into structured zero-results with the low_altitude_flight marker. New symbols: _LOW_ALTITUDE_ERROR_MARKER, _ZERO_SPECIES, _build_zero_climate_result, _separate_low_altitude_errors. Tests: 10 new (5 unit, 2 functional, 3 edge cases).
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
This PR introduces graceful handling of low-altitude flights in the fleet runner pipeline, updates core dependencies, and tunes several default parameters. Previously, flights that failed due to low-altitude trajectories were reported as raw errors; they now produce structured zero-value climate results, making downstream consumption consistent regardless of failure cause.
Changes
🚀 Feature — Low-altitude flight zero-results
FleetRunner._separate_low_altitude_errors()— new static method that splits error records into low-altitude zero-results vs other errors based on the_LOW_ALTITUDE_ERROR_MARKERsentinel._build_zero_climate_result()— builds a full climate result dict with all-zero metrics (CO2, CH4, O3, H2O, Contrails) across all time horizons, flagged withlow_altitude_flight: true._extract_results()updated to use the separation logic in both the normal and pipeline-aborted code paths, ensuring low-altitude flights always appear as structured results rather than raw errors.📦 Dependency updates
pycontrails0.60.10.60.2pybada>=0.1.11==0.1.12scipy>=1.11.0,<1.17.0>=1.11.0[tool.hatch.metadata] allow-direct-references = truefor git-sourced dependencies.⚙️ Parameter tuning
DEFAULT_FUEL_BURN_THRESHOLDDEFAULT_MIN_ALTITUDE_FLMAX_NONCO2_CO2_RATIO🧹 Minor clean-ups
Legacy,New/Integrated) ingwp.pyimports.🧪 Tests
tests/test_zero_climate_result.py(384 lines) — comprehensive test suite covering:_build_zero_climate_resultunit tests (structure, species, horizons, NaN handling)_separate_low_altitude_errorswith mixed, all-low-altitude, and no-low-altitude cases_extract_resultsfunctional tests (normal + aborted pipeline paths)Files changed (7)
CHANGELOG.mdpyproject.tomlsrc/pyneats/core/neats_default_parameters.pysrc/pyneats/runners/fleet.pysrc/pyneats/steps/climate_metrics/gwp.pytests/test_zero_climate_result.pyuv.lock