BUG: Fix the handling of reference pressure for older rpy files. by phmbressan · Pull Request #808 · RocketPy-Team/RocketPy
Pull request type
- Code changes (bugfix, features)
Checklist
- Lint (
make format) has passed locally - All tests (
pytest tests -m slow --runslow) have passed locally- Note: all the standard tests have passed locally, the
--runslowneeds BUG: LSODA solver not being detected correctly. #807 and Bug: Fix StochasticFlight time_overshoot None bug #805
- Note: all the standard tests have passed locally, the
-
CHANGELOG.mdhas been updated (if relevant)
Current behavior
Currently, the introduction of net_thrust is the first addition of an attribute that impacts the behavior of the motor and flight classes. Therefore, the .rpy of version 1.8.0 does not have this parameters, which should be handled.
One notable point is that the tests are working as expected and caught this "file breaking change".
New behavior
This PR adds custom handling for the new attributes. Unfortunately, I did not find other ways beside manual handling (i.e. pinpointing in code the necessary attribute).
I am open to suggestions on how to deal with those parameter changes between older file versions.
Breaking change
- Yes
- No