From a9982274d9245c214da925a68331f39cafd54c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Fri, 28 Aug 2026 15:28:36 +0200 Subject: [PATCH] Escape backslashes in RST doc strings The unescaped backslashes were interpreted by RST while rendering, which was not the intention. Also remove a poorly rendered caption that reads better without it. --- .../forward_model_steps.py | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/subscript/hook_implementations/forward_model_steps.py b/src/subscript/hook_implementations/forward_model_steps.py index 6891f9859..39379e2f4 100644 --- a/src/subscript/hook_implementations/forward_model_steps.py +++ b/src/subscript/hook_implementations/forward_model_steps.py @@ -59,8 +59,8 @@ def documentation() -> ForwardModelStepDocumentation | None: DEFINE /model.yaml DEFINE /../input/config/eclipse.tmpl - FORWARD_MODEL CASEGEN_UPCARS(=, \ - =, \ + FORWARD_MODEL CASEGEN_UPCARS(=, \\ + =, \\ =-) """, @@ -231,10 +231,9 @@ def documentation() -> ForwardModelStepDocumentation | None: FORWARD_MODEL ECLCOMPRESS(=paths_to_compress.txt) where ``paths_to_compress.txt`` contains a list of files or filepaths to -compress. +compress: .. code-block:: text - :caption: paths_to_compress.txt eclipse/include/grid/* eclipse/include/regions/* @@ -270,7 +269,7 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL ECLDIFF2ROFF(=, =SGAS, \ + FORWARD_MODEL ECLDIFF2ROFF(=, =SGAS, \\ =diff_dates.txt =share/results/grids/eclgrid) where ``ECLBASE`` is already defined in your ERT config, pointing to the Eclipse @@ -357,7 +356,7 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL ECLINIT2ROFF(=, \ + FORWARD_MODEL ECLINIT2ROFF(=, \\ =share/results/grids/eclgrid, =PORO:PERMX) where ``ECLBASE`` is already defined in your ERT config, pointing to the Eclipse @@ -411,7 +410,7 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL ECLRST2ROFF(=, \ + FORWARD_MODEL ECLRST2ROFF(=, \\ =share/results/grids/eclgrid, =SGAS:SWAT, =dates.txt) where ``ECLBASE`` is already defined in your ERT config, pointing to the Eclipse @@ -487,9 +486,9 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL GRAV_SUBS_MAPS(=.UNRST, \ + FORWARD_MODEL GRAV_SUBS_MAPS(=.UNRST, \\ =grav_subs_maps.yml) - FORWARD_MODEL GRAV_SUBS_MAPS(=.UNRST, \ + FORWARD_MODEL GRAV_SUBS_MAPS(=.UNRST, \\ =grav_subs_maps.yml, =share/results/maps) @@ -534,15 +533,15 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \ + FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \\ =grav_subs_points.yml) - FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \ - =/../input/config/grav_subs_points.yml, \ + FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \\ + =/../input/config/grav_subs_points.yml, \\ =share/results/points) - FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \ + FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \\ =grav_subs_points.yml, ="_10.txt") - FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \ + FORWARD_MODEL GRAV_SUBS_POINTS(.UNRST, \\ =grav_subs_points.yml, ="fieldA_") where ``ECLBASE`` is already defined in your ERT config, pointing to the flowsimulator @@ -584,7 +583,7 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL INTERP_RELPERM(=interp_relperm.yml, \ + FORWARD_MODEL INTERP_RELPERM(=interp_relperm.yml, \\ =) """, @@ -655,9 +654,9 @@ def documentation() -> ForwardModelStepDocumentation | None: .. code-block:: console DEFINE iter-3 - FORWARD_MODEL MERGE_UNRST_FILES(=../.UNRST, \ + FORWARD_MODEL MERGE_UNRST_FILES(=../.UNRST, \\ =.UNRST, =eclipse/model/ECLIPSE_MERGED.UNRST) - FORWARD_MODEL MERGE_UNRST_FILES(=../.UNRST, \ + FORWARD_MODEL MERGE_UNRST_FILES(=../.UNRST, \\ =.UNRST, =MERGED.UNRST, =pred) """, @@ -727,7 +726,7 @@ def documentation() -> ForwardModelStepDocumentation | None: .. code-block:: console - FORWARD_MODEL PARAMS2CSV(=parameters.txt, =parameters.csv,\ + FORWARD_MODEL PARAMS2CSV(=parameters.txt, =parameters.csv,\\ =source_file) """, @@ -771,8 +770,8 @@ def documentation() -> ForwardModelStepDocumentation | None: examples=""" .. code-block:: console - FORWARD_MODEL PRTVOL2CSV(=, =regions.yml, \ - =FIPNUM, =first, =., \ + FORWARD_MODEL PRTVOL2CSV(=, =regions.yml, \\ + =FIPNUM, =first, =., \\ =simulator_volume_fipnum.csv) where ``ECLBASE`` is already defined in your ERT config, pointing to the Eclipse @@ -867,21 +866,21 @@ def documentation() -> ForwardModelStepDocumentation | None: or - FORWARD_MODEL WELLTEST_DPDS(, =OP_1, =GAS, =1, - =dst, =OP_1) + FORWARD_MODEL WELLTEST_DPDS(, =OP_1, =GAS, \\ + =1, =dst, =OP_1) Example for cases with HM: -------------------------- :: - FORWARD_MODEL WELLTEST_DPDS(, =OP_1, =GAS, =2, - =dst, =OP_1_1, + FORWARD_MODEL WELLTEST_DPDS(, =OP_1, =GAS, \\ + =2, =dst, =OP_1_1, \\ =OP_1_dpdt_bu2_saphir.txt ) Then set-up of GEN_DATA can be :: - GEN_DATA DPDT_SIM INPUT_FORMAT:ASCII REPORT_STEPS:1 + GEN_DATA DPDT_SIM INPUT_FORMAT:ASCII REPORT_STEPS:1 \\ RESULT_FILE:dpdspt_lag2_genobs_OP_1_%d_2 result_file corresponds to dpdspt_lag2_genobs__%d_