mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
131 stars 55 forks source link

preFoil import fix #148

Closed eytanadler closed 2 years ago

eytanadler commented 2 years ago

Purpose

This PR changes the DVGeometryCST imports and tests to behave like the other specialized parameterizations. The purpose is to avoid adding prefoil as a dependency even though it is required for DVGeometryCST (same idea as pyOCSM for DVGeometryESP, for example). Addresses #147.

Expected time until merged

Yesterday

Type of change

Testing

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #148 (d75370f) into main (d786ca8) will decrease coverage by 10.50%. The diff coverage is 53.84%.

@@             Coverage Diff             @@
##             main     #148       +/-   ##
===========================================
- Coverage   63.75%   53.24%   -10.51%     
===========================================
  Files          47       47               
  Lines       11667    11676        +9     
===========================================
- Hits         7438     6217     -1221     
- Misses       4229     5459     +1230     
Impacted Files Coverage Δ
pygeo/__init__.py 91.30% <50.00%> (+1.30%) :arrow_up:
pygeo/parameterization/__init__.py 88.88% <50.00%> (+2.22%) :arrow_up:
pygeo/parameterization/DVGeoCST.py 88.78% <60.00%> (-0.41%) :arrow_down:
pygeo/parameterization/DVGeoMulti.py 0.40% <0.00%> (-89.42%) :arrow_down:
pygeo/constraints/areaConstraint.py 50.50% <0.00%> (-25.42%) :arrow_down:
pygeo/constraints/DVCon.py 68.04% <0.00%> (-3.69%) :arrow_down:
pygeo/pyBlock.py 45.37% <0.00%> (-1.65%) :arrow_down:
pygeo/parameterization/DVGeo.py 64.15% <0.00%> (-0.50%) :arrow_down:
pygeo/topology.py 54.92% <0.00%> (-0.23%) :arrow_down:
... and 1 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

eytanadler commented 2 years ago

Thanks for the prompt PR. To get this to work though, this file also has to be changed:

https://github.com/mdolab/pygeo/blob/d786ca844e8bb2de82de9ec52ebb7d1ddf3504e5/pygeo/parameterization/__init__.py#L3

Good catch