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

Make nsga2 tests optional + docs update #351

Merged
merged 5 commits into from
Aug 22, 2023

Conversation

ewu63
Copy link
Collaborator

@ewu63 ewu63 commented Aug 15, 2023

Purpose

Closes #345. Also updated docs slightly + added an nsga2 test to the Rosenbrock problem.

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

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

@ewu63 ewu63 requested a review from a team as a code owner August 15, 2023 23:15
@ewu63 ewu63 requested review from lamkina and sseraj August 15, 2023 23:15
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #351 (7391afb) into main (7e01f2c) will decrease coverage by 11.92%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #351       +/-   ##
===========================================
- Coverage   84.42%   72.51%   -11.92%     
===========================================
  Files          22       22               
  Lines        3307     3307               
===========================================
- Hits         2792     2398      -394     
- Misses        515      909      +394     

see 7 files with indirect coverage changes

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

@ewu63
Copy link
Collaborator Author

ewu63 commented Aug 22, 2023

Bump @lamkina

@lamkina lamkina merged commit 304177c into mdolab:main Aug 22, 2023
12 of 13 checks passed
@ewu63 ewu63 deleted the update-nsga2-tests branch August 22, 2023 17:18
@@ -43,6 +50,9 @@ def setup_optProb(self, n_obj):
if n_obj == 2:
self.optProb.addObj("obj2")

@unittest.skipIf(
Copy link
Contributor

Choose a reason for hiding this comment

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

I am sorry to have checked this too late @nwu63 , but I don't really get the point of this step here. Can't we remove this altogether? We are already skipping all n_obj == 2 tests by default on all platforms. Is this related to an additional test that testflo runs on windows?
Locally I only have the last two tests of this stack:

about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt .\test_nsga2_multi_objective.py:TestNSGA2.test_opt  ... SKIP (00:00:0.00, 0 MB)
test_nsga2_multi_objective.py fails on windows with two objectives! Skipping for now.
    about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt_0 .\test_nsga2_multi_objective.py:TestNSGA2.test_opt_0 ... OK (00:00:4.17, 0 MB)
    about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt_1 .\test_nsga2_multi_objective.py:TestNSGA2.test_opt_1  ... SKIP (00:00:0.00, 0 MB)
skip flaky NSGA2 tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This skips all tests on Windows, the below skips all multiobjective tests, so the only tests being run are the single-objective tests on linux.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand the idea (and that is what I was expecting) but that printout in my comment is from the Windows test log - apparently the single-objective test is running on Windows? Or is it a Testflo fluke?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is possible that the skipIf doesn't play nicely with parameterized. However this is actually what we want---the single objective test should pass on Windows and we should test it, while the multi-objective test appears to be flat out broken. Let me throw together a PR to update this.

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.

NSGA2 tests should be optional
4 participants