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

Modify input reading #531

Closed christophe-david closed 1 week ago

christophe-david commented 3 weeks ago

This PR streamlines the way input files are read.

More in details, FASTOADProblem.read_inputs() is still callable before or after setup(), but the file is now read only once, and before setup, only input variables with shape_by_conn==True are put in an IVC. Other variable values are provided through Problem.set_val() after Problem.setup().

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.22%. Comparing base (345e3ca) to head (f96acbc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #531 +/- ## ========================================== + Coverage 85.21% 85.22% +0.01% ========================================== Files 138 138 Lines 6378 6377 -1 Branches 932 932 ========================================== Hits 5435 5435 Misses 785 785 + Partials 158 157 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

florentLutz commented 1 week ago

Outputs are still not set from input file.

Reading the original description of the PR I thought this would be the case because of that line

This PR allows setting values of output variables from input files, which is useful to initialize loop variables.

christophe-david commented 1 week ago

Outputs are still not set from input file.

Reading the original description of the PR I thought this would be the case because of that line

This PR allows setting values of output variables from input files, which is useful to initialize loop variables.

Indeed. I lowered the scope of this PR, but incorrectly modified the description.