Commit 0ef24346 authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Try pushing from CI

parent 63e11643
......@@ -102,7 +102,7 @@ release_tagging:
- git config --global user.email $GITLAB_USER_EMAIL
# fresh clone
- mkdir ~/source && cd $_
- git clone ${CI_COMMIT_REF_NAME} git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git
- git clone -b ${CI_COMMIT_REF_NAME} git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git
- git branch
# - git checkout --track origin/${CI_COMMIT_REF_NAME}
# - git branch
......
......@@ -20,7 +20,15 @@ def plot_inversion(pytestconfig):
if "article" in marker and "not article" not in marker:
ax = plt.subplots(3, 1, figsize=(21, 21))
inds_titles = ["bands", "lowcorr", "highcorr"]
id_name_correspondance = {
"lowcorr": "Short correlation length",
"highcorr": "Long correlation length",
"ensrf": "EnSRF",
"ibands": "Bands",
"analytical": "Analytical"
}
inds_titles = ["ibands", "lowcorr", "highcorr"]
for test_id in pytest.test_ids:
mode, minimizer, resolution, correlations = test_id
......@@ -28,10 +36,12 @@ def plot_inversion(pytestconfig):
continue
elif resolution == "ibands":
title = "bands"
title = id_name_correspondance.get(resolution, resolution)
ind_ax = inds_titles.index(resolution)
else:
title = correlations
title = id_name_correspondance.get(correlations, correlations)
ind_ax = inds_titles.index(correlations)
dir_ref, nsimmax = pytest.test_ids[test_id]
......@@ -45,19 +55,18 @@ def plot_inversion(pytestconfig):
names=["nsim", "Jo", "Jb"])
if mode == "analytical":
label = "Analytical"
ax[1][inds_titles.index(title)].plot(
ax[1][ind_ax].plot(
2 * cost["nsim"], cost["Jo"] + cost["Jb"],
label=label, linewidth=5, linestyle='--', zorder=10)
else:
label = minimizer if mode == "4dvar" else mode
label = id_name_correspondance.get(mode, mode)
ax[1][inds_titles.index(title)].plot(
ax[1][ind_ax].plot(
cost["nsim"], cost["Jo"] + cost["Jb"],
label=label, linewidth=4)
ax[1][inds_titles.index(title)].set_title(title,
fontsize=35)
ax[1][ind_ax].set_title(title, fontsize=35)
labelsize = 30
labelx = -0.1
......
......@@ -182,6 +182,7 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
control_root = "obsoperator/fwd_-002/controlvect"
inv_setup["mode"]["minimizer"]["maxiter"] = \
max(1, int(nsim))
nsim *= 2
if os.path.isdir("{}/obsoperator/fwd_-002".format(tmpdir)):
shutil.rmtree("{}/obsoperator/fwd_-002".format(tmpdir))
elif settings.get("minimizer", None) == "M1QN3":
......@@ -192,6 +193,7 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
max(1, int(nsim))
inv_setup["mode"]["minimizer"]["nsim"] = \
max(1, int(nsim))
nsim *= 2
if os.path.isdir("{}/obsoperator/fwd_-002".format(tmpdir)):
shutil.rmtree("{}/obsoperator/fwd_-002".format(tmpdir))
elif settings["mode"] == "ensrf":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment