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

Bugfix for TriangulatedSurfaceConstraint #142

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

hajdik
Copy link
Contributor

@hajdik hajdik commented Jun 9, 2022

Purpose

In #112, DVCon.addConstraintsPyOpt() started calling each constraint.addConstraintsPyOpt() with an extra parameter, exclude_wrt, but this was not added to TriangulatedSurfaceConstraint.addConstraintsPyOpt() so packing optimizations failed.

The tests still passed because this function is not covered, another item for the pyGeo maintenance todo list.

Other instances of this function either have been updated with the additional parameter or are not called by DVCon in the same way and are fine.

Expected time until merged

Should be fast unless we need a test to cover this.

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

Adding a triangulated surface constraint without this argument added raises the error TypeError: addConstraintsPyOpt() got an unexpected keyword argument 'exclude_wrt', with this argument it works.

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 June 9, 2022 16:10
@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #142 (c9f5e1b) into main (e36d675) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   62.77%   62.77%           
=======================================
  Files          46       46           
  Lines       11263    11263           
=======================================
  Hits         7070     7070           
  Misses       4193     4193           
Impacted Files Coverage Δ
pygeo/constraints/areaConstraint.py 75.91% <100.00%> (ø)

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

@marcomangano
Copy link
Contributor

@hajdik can you link to the other parts of the code where the argument is missing?

@hajdik
Copy link
Contributor Author

hajdik commented Jun 9, 2022

@hajdik can you link to the other parts of the code where the argument is missing?

Neil and I just looked over them, it's not an issue in the other places because they aren't being called by that DVCon function or are used in different ways.

@marcomangano marcomangano merged commit 53494a8 into main Jun 9, 2022
@marcomangano marcomangano deleted the constraint-bug branch June 9, 2022 18:11
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

3 participants