Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed initialization in base DV class #140

Merged
merged 2 commits into from
May 9, 2022
Merged

Conversation

hajdik
Copy link
Contributor

@hajdik hajdik commented May 6, 2022

Purpose

I found another issue I introduced when merging DVs into one base class in #130. Some parameters (upper, lower, scale) were not being set when a DV is created with their values as None, so there was an error when addVarGroup was called.

Expected time until merged

Should be quick, just one line and it fixes a bug

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Without this, some DVs will not run without bounds.

Checklist

  • I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@hajdik hajdik requested a review from a team as a code owner May 6, 2022 18:18
@hajdik hajdik requested review from joanibal and ArshSaja May 6, 2022 18:18
@hajdik hajdik changed the title added initialization to base DV Fixed initialization in base DV Class May 6, 2022
@hajdik hajdik changed the title Fixed initialization in base DV Class Fixed initialization in base DV class May 6, 2022
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #140 (b0e1e46) into main (06948e7) will decrease coverage by 10.86%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main     #140       +/-   ##
===========================================
- Coverage   62.76%   51.90%   -10.87%     
===========================================
  Files          46       46               
  Lines       11262    11263        +1     
===========================================
- Hits         7069     5846     -1223     
- Misses       4193     5417     +1224     
Impacted Files Coverage Δ
pygeo/parameterization/designVars.py 77.17% <100.00%> (+0.12%) ⬆️
pygeo/parameterization/DVGeoMulti.py 0.40% <0.00%> (-89.42%) ⬇️
pygeo/constraints/areaConstraint.py 50.50% <0.00%> (-25.42%) ⬇️
pygeo/constraints/DVCon.py 68.04% <0.00%> (-3.69%) ⬇️
pygeo/pyBlock.py 45.37% <0.00%> (-1.65%) ⬇️
pygeo/parameterization/DVGeo.py 63.91% <0.00%> (-0.50%) ⬇️
pygeo/topology.py 54.92% <0.00%> (-0.23%) ⬇️
pygeo/__init__.py 100.00% <0.00%> (+10.52%) ⬆️
pygeo/parameterization/__init__.py 100.00% <0.00%> (+14.28%) ⬆️

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

@sseraj
Copy link
Contributor

sseraj commented May 6, 2022

We should consider testing the optimization related parts of the code.

@ewu63
Copy link
Collaborator

ewu63 commented May 6, 2022

Why didn't our MACH-Aero tests catch any of these?

@joanibal joanibal merged commit 98986f1 into mdolab:main May 9, 2022
@hajdik hajdik deleted the dv-bugfix2 branch May 9, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants