fast-aircraft-design / FAST-OAD

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

Issue 357 - manage dynamically shaped problem inputs #416

Closed christophe-david closed 2 years ago

christophe-david commented 2 years ago

This PR solves #357. It uses the idea of #374 of catching the setup failure, but uses the new capability of OpenMDAO to use get_io_metadata() "earlier" in setup (openmdao/openmdao#2424), making it possible to get variable information without using too much private API.

Important: To use this new capability, dependency to OpenMDAO has been changed so it depends now on the master git branch. Hopefully the new OpenMDAO version will be released soon and then, the declared dependency will have to be changed.

To do more than unit testing, the mission module has been modified so it now uses dynamically shaped polars (was needed anyway). The integration test test_non_regression_mission_only() is now actually "mission only" (no more aerodynamics) so we get an actual problem with dynamically shaped inputs. To be noted that the CeRAS notebook also has a problem defined like that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #416 (ef437fc) into master (94a6adf) will increase coverage by 0.10%. The diff coverage is 90.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #416      +/-   ##
==========================================
+ Coverage   92.02%   92.12%   +0.10%     
==========================================
  Files         204      206       +2     
  Lines        8437     8486      +49     
  Branches      921      924       +3     
==========================================
+ Hits         7764     7818      +54     
+ Misses        502      497       -5     
  Partials      171      171              
Impacted Files Coverage Δ
src/fastoad/cmd/cli.py 84.70% <ø> (ø)
src/fastoad/openmdao/variables/variable_list.py 93.71% <80.95%> (ø)
src/fastoad/openmdao/variables/variable.py 90.24% <90.24%> (ø)
src/fastoad/openmdao/problem.py 95.76% <94.02%> (-2.52%) :arrow_down:
src/fastoad/io/configuration/configuration.py 91.10% <100.00%> (-0.50%) :arrow_down:
...s/performances/mission/openmdao/mission_wrapper.py 95.34% <100.00%> (-0.06%) :arrow_down:
src/fastoad/module_management/_plugins.py 90.78% <100.00%> (+0.12%) :arrow_up:
src/fastoad/module_management/exceptions.py 100.00% <100.00%> (ø)
src/fastoad/openmdao/variables/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 94a6adf...ef437fc. Read the comment docs.