Closed zebengberg closed 11 months ago
Cool 🚀 Will this be released as 0.49.2?
[EDIT] -- disregard below, sorry! I take "independent of our API work" to mean that these changes aren't fixes for the failing 0.49.1 upgrade sitting in pycontrails-api"...
Sorry for the confusion! Originally I was thinking that the fixes here were necessary for work on the API, but I don't think they're actually needed.
You're absolutely right that pycontrails should have more unit tests, and that the API doubles as an integration test. Like you've pieced together, I discover the pycontrails issues fixed in this PR while debugging some other stuff in the API. Typically when this happens, I create a minimal unit test over here to reproduce the issue.
I won't create a new 0.49.2 release yet unless it turns out the API needs these updates.
some of these files may have been pre-auto-formatter.
The formatting changes are from black 23.12. A lot of the recent black minor releases have included these sorts of breaking changes.
This PR fixes a few small bugs.
Fixes
Flight.fuel
attribute is preserved for theFlight.filter
method.Fleet.fl_attrs
attribute is preserved for theFleet.filter
method.ValueError
whenFlight.sort
orFleet.sort
is called. Both of these subclasses assume a custom sorting order that is enforced in their constructors.Internals
Fuel
and its subclassesJetA
,SAFBlend
, andHydrogenFuel
frozen.Tests
make test
)@nickmasson -- FYI, I think this is independent of our API work.