-
Notifications
You must be signed in to change notification settings - Fork 108
Better test skipping and basic project linting #643
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,8 @@ | |
| mou_exe_path = get_exe_path("pestpp-mou") | ||
|
|
||
| def dsi_freyberg(tmp_d,transforms=None,tag=""): | ||
| if not ies_exe_path: | ||
| pytest.skip("missing ies_exe_path") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. assume we will throw a fail elsewhere in the CI if bins are missing -- might be worth checking this. |
||
|
|
||
| test_d = "ends_master" | ||
| test_d = setup_tmp(test_d, tmp_d) | ||
|
|
@@ -92,6 +94,8 @@ def test_dsi_mixed(tmp_path): | |
|
|
||
| # @pytest.mark.timeout(method="thread", timeout=1000) | ||
| def test_dsivc(tmp_path): | ||
| if not mou_exe_path: | ||
| pytest.skip("missing mou_exe_path") | ||
| # basic quick as so can re-run here | ||
| dsi_freyberg(tmp_path, transforms=None) | ||
| # now test dsicv | ||
|
|
@@ -205,6 +209,7 @@ def plot_freyberg_dsi(): | |
|
|
||
|
|
||
| def lpfa_freyberg(tmp_d="temp",transforms=None): | ||
| pytest.importorskip("sklearn") | ||
|
|
||
| test_d = "ends_master" | ||
| test_d = setup_tmp(test_d, tmp_d) | ||
|
|
@@ -331,6 +336,8 @@ def test_lpfa_std(tmp_path): | |
|
|
||
|
|
||
| def gpr_compare_invest(): | ||
| if not mou_exe_path: | ||
| pytest.skip("missing mou_exe_path") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These "invest" funcs shouldn't be collected by pytest in the first place, so the "skip" probs ineffective. |
||
| import numpy as np | ||
| from sklearn.gaussian_process import GaussianProcessRegressor | ||
| case = "zdt1" | ||
|
|
@@ -492,6 +499,8 @@ def gpr_compare_invest(): | |
|
|
||
|
|
||
| def gpr_constr_invest(): | ||
| if not mou_exe_path: | ||
| pytest.skip("missing mou_exe_path") | ||
| import numpy as np | ||
| from sklearn.gaussian_process import GaussianProcessRegressor | ||
| case = "constr" | ||
|
|
@@ -812,14 +821,13 @@ def gpr_zdt1_test(): | |
| gpr_t_d = os.path.join(case + "_gpr_template") | ||
|
|
||
| data, input_names, output_names = collate_training_data(pst,m_d,case) | ||
| from pyemu.emulators.gpr import GPR | ||
| gpr = GPR(data=data.copy(), | ||
| input_names=input_names, | ||
| output_names=output_names, | ||
| #transforms=transforms, | ||
| #kernel=gp_kernel, | ||
| n_restarts_optimizer=20, | ||
| ); | ||
| ) | ||
| gpr.fit() | ||
| gpr.prepare_pestpp(m_d,case,gpr_t_d=gpr_t_d) | ||
|
|
||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is also mostly legacy func testing -- at some point we should check and remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this notebook wrapper is no longer hit -- at some point, we should check and remove,