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

Moved OpenVSP version check to fix API docs #210

Merged
merged 4 commits into from
Jul 20, 2023
Merged

Moved OpenVSP version check to fix API docs #210

merged 4 commits into from
Jul 20, 2023

Conversation

sseraj
Copy link
Contributor

@sseraj sseraj commented Jul 14, 2023

Purpose

#198 broke the API docs for DVGeometryVSP, the modules that follow it in __init__.py (DVGeometryESP, DVGeometryMulti), and the MPhys wrapper. The problem is that the openvsp.GetVSPVersion() call occurs outside the class, which does not work when we have mock imports for the doc build. To fix this, I moved the version check into the __init__ function.

Expected time until merged

1 week

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

Check the API docs for the latest docs build and compare to the PR build. All the API docs should be working on the PR build.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • 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

@sseraj sseraj requested a review from a team as a code owner July 14, 2023 17:40
@sseraj sseraj requested review from hajdik and ArshSaja July 14, 2023 17:40
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #210 (12482d0) into main (dc41b1f) will not change coverage.
The diff coverage is 91.66%.

@@           Coverage Diff           @@
##             main     #210   +/-   ##
=======================================
  Coverage   64.76%   64.76%           
=======================================
  Files          47       47           
  Lines       12018    12018           
=======================================
  Hits         7784     7784           
  Misses       4234     4234           
Impacted Files Coverage Δ
pygeo/parameterization/DVGeoESP.py 66.57% <ø> (ø)
pygeo/parameterization/DVGeoVSP.py 81.97% <91.66%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@hajdik hajdik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but @ArshSaja or @lamkina should make sure VSP still works with one of their cases

@hajdik hajdik requested a review from lamkina July 17, 2023 17:26
Copy link
Contributor

@lamkina lamkina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sseraj there is a unit test for the out of date features, but can you expand it to check the different version conditions? I think the machinery is there to do it fairly easily.

@sseraj
Copy link
Contributor Author

sseraj commented Jul 17, 2023

@sseraj there is a unit test for the out of date features, but can you expand it to check the different version conditions? I think the machinery is there to do it fairly easily.

I don't think there is a good way of doing this with a dummy OpenVSP module. The other version conditions don't raise an error, so the entire __init__ function runs when I try to test it. To properly test multiple versions of OpenVSP, we would have to set different stable and latest versions in our Docker images.

@lamkina
Copy link
Contributor

lamkina commented Jul 20, 2023

Okay, I guess it's fine. We're throwing a descriptive error message about the version so the user will be made aware of the problem.

@sseraj sseraj merged commit a786045 into main Jul 20, 2023
12 checks passed
@sseraj sseraj deleted the vsp-docs-fix branch July 20, 2023 19:08
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