fast-aircraft-design / FAST-OAD

FAST-OAD: An open source framework for rapid Overall Aircraft Design
GNU General Public License v3.0
47 stars 25 forks source link

New mission registering mechanism #485

Closed christophe-david closed 1 year ago

christophe-david commented 1 year ago

In preparation for the integration of ground effects into mission definition files, the flight segment recording mechanism has been modified.

It is now based on decorators, while retaining the previous inheritance-based method.

The use of decorators could allow this mechanism to be used for FAST-OAD modules, which could provide some simplification.

Additionally, FlightSequence class no longer inherits from list. In the first place, this is because a list-derived class does not mix well with the deprecated library. But anyway, it seems safer to have only the desired methods for the FlightSequence class instead of having all methods of list.

codecov[bot] commented 1 year ago

Codecov Report

Merging #485 (27ca43e) into master (f95d25c) will increase coverage by 0.10%. The diff coverage is 91.07%.

@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
+ Coverage   84.16%   84.27%   +0.10%     
==========================================
  Files         129      128       -1     
  Lines        5893     5946      +53     
  Branches      872      874       +2     
==========================================
+ Hits         4960     5011      +51     
- Misses        780      781       +1     
- Partials      153      154       +1     
Impacted Files Coverage Δ
.../fastoad/models/performances/mission/exceptions.py 66.66% <40.00%> (-33.34%) :arrow_down:
...stoad/models/performances/mission/segments/base.py 91.89% <81.81%> (+0.91%) :arrow_up:
src/fastoad/models/performances/mission/base.py 94.00% <89.79%> (-4.22%) :arrow_down:
...sion_definition/mission_builder/mission_builder.py 88.20% <100.00%> (ø)
...n_definition/mission_builder/structure_builders.py 94.11% <100.00%> (ø)
...toad/models/performances/mission/polar_modifier.py 100.00% <100.00%> (ø)
...s/performances/mission/segments/altitude_change.py 89.55% <100.00%> (+0.15%) :arrow_up:
...oad/models/performances/mission/segments/cruise.py 96.51% <100.00%> (+0.12%) :arrow_up:
...rformances/mission/segments/ground_speed_change.py 80.95% <100.00%> (+0.95%) :arrow_up:
...stoad/models/performances/mission/segments/hold.py 100.00% <100.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.