completor 1.3.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {completor-1.3.0 → completor-1.4.0}/PKG-INFO +1 -1
  2. completor-1.4.0/completor/hook_implementations/__init__.py +5 -0
  3. completor-1.4.0/completor/hook_implementations/forward_model_steps.py +32 -0
  4. completor-1.4.0/completor/hook_implementations/run_completor.py +61 -0
  5. {completor-1.3.0 → completor-1.4.0}/pyproject.toml +2 -2
  6. completor-1.3.0/completor/hook_implementations/jobs.py +0 -71
  7. {completor-1.3.0 → completor-1.4.0}/LICENSE +0 -0
  8. {completor-1.3.0 → completor-1.4.0}/README.md +0 -0
  9. {completor-1.3.0 → completor-1.4.0}/completor/__init__.py +0 -0
  10. {completor-1.3.0 → completor-1.4.0}/completor/completion.py +0 -0
  11. {completor-1.3.0 → completor-1.4.0}/completor/config_jobs/run_completor +0 -0
  12. {completor-1.3.0 → completor-1.4.0}/completor/constants.py +0 -0
  13. {completor-1.3.0 → completor-1.4.0}/completor/create_output.py +0 -0
  14. {completor-1.3.0 → completor-1.4.0}/completor/exceptions/__init__.py +0 -0
  15. {completor-1.3.0 → completor-1.4.0}/completor/exceptions/clean_exceptions.py +0 -0
  16. {completor-1.3.0 → completor-1.4.0}/completor/exceptions/exceptions.py +0 -0
  17. {completor-1.3.0 → completor-1.4.0}/completor/get_version.py +0 -0
  18. {completor-1.3.0 → completor-1.4.0}/completor/input_validation.py +0 -0
  19. {completor-1.3.0 → completor-1.4.0}/completor/launch_args_parser.py +0 -0
  20. {completor-1.3.0 → completor-1.4.0}/completor/logger.py +0 -0
  21. {completor-1.3.0 → completor-1.4.0}/completor/main.py +0 -0
  22. {completor-1.3.0 → completor-1.4.0}/completor/parse.py +0 -0
  23. {completor-1.3.0 → completor-1.4.0}/completor/prepare_outputs.py +0 -0
  24. {completor-1.3.0 → completor-1.4.0}/completor/read_casefile.py +0 -0
  25. {completor-1.3.0 → completor-1.4.0}/completor/read_schedule.py +0 -0
  26. {completor-1.3.0 → completor-1.4.0}/completor/utils.py +0 -0
  27. {completor-1.3.0 → completor-1.4.0}/completor/visualization.py +0 -0
  28. {completor-1.3.0 → completor-1.4.0}/completor/visualize_well.py +0 -0
  29. {completor-1.3.0 → completor-1.4.0}/completor/wells.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: completor
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Advanced multi-segmented well completion tool.
5
5
  Home-page: https://github.com/equinor/completor
6
6
  License: LGPL-3.0-only
@@ -0,0 +1,5 @@
1
+ from __future__ import annotations
2
+
3
+ from .run_completor import RunCompletor
4
+
5
+ __all__ = ["RunCompletor"]
@@ -0,0 +1,32 @@
1
+ from __future__ import annotations
2
+
3
+ import ert # type: ignore
4
+
5
+ from completor.hook_implementations import RunCompletor
6
+ from completor.logger import logger
7
+
8
+ PLUGIN_NAME = "completor"
9
+
10
+ try:
11
+ from ert.plugins.plugin_manager import ErtPluginManager # type: ignore # noqa: F401
12
+ except ModuleNotFoundError:
13
+
14
+ def ert_plugin(name: str = ""):
15
+ """Dummy decorator"""
16
+
17
+ def decorator(func):
18
+ return func
19
+
20
+ return decorator
21
+
22
+ logger.warning("Cannot import ERT, did you install Completor with ert option enabled?")
23
+
24
+
25
+ @ert.plugin(name=PLUGIN_NAME)
26
+ def installable_workflow_jobs() -> dict[str, str]:
27
+ return {}
28
+
29
+
30
+ @ert.plugin(name=PLUGIN_NAME)
31
+ def installable_forward_model_steps() -> list[ert.ForwardModelStepPlugin]:
32
+ return [RunCompletor]
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+
3
+ from ert import ForwardModelStepDocumentation, ForwardModelStepJSON, ForwardModelStepPlugin # type: ignore
4
+
5
+ desc = """Completor is a script for modelling
6
+ wells with advanced completion.
7
+ It generates a well schedule to be included in reservoir simulator,
8
+ by combining the multi-segment tubing definition (from pre-processor reservoir modelling tools)
9
+ with a user defined file specifying the completion design.
10
+ The resulting well schedule comprises all keywords and parameters required by
11
+ reservoir simulator. See the Completor documentation for details.
12
+
13
+ Required:
14
+ ---------
15
+ -i : followed by name of file specifying completion design (e.g. completion.case).
16
+ -s : followed by name of schedule file with multi-segment tubing definition,
17
+ including COMPDAT, COMPSEGS and WELSEGS (required if not specified in case file).
18
+
19
+ Optional:
20
+ ---------
21
+ --help : how to run completor.
22
+ --about : about completor.
23
+ -o : followed by name of completor output file.
24
+ --figure : generates a pdf file with a schematics of the well segment structure.
25
+
26
+ """
27
+
28
+
29
+ class RunCompletor(ForwardModelStepPlugin):
30
+ def __init__(self) -> None:
31
+ super().__init__(
32
+ name="run_completor",
33
+ command=[
34
+ "completor",
35
+ "-i",
36
+ "<CASE>",
37
+ "-s",
38
+ "<INPUT_SCH>",
39
+ "-o",
40
+ "<OUTPUT_SCH>",
41
+ ],
42
+ )
43
+
44
+ def validate_pre_realization_run(self, fm_step_json: ForwardModelStepJSON) -> ForwardModelStepJSON:
45
+ return fm_step_json
46
+
47
+ def validate_pre_experiment(self, fm_step_json: ForwardModelStepJSON) -> None:
48
+ pass
49
+
50
+ @staticmethod
51
+ def documentation() -> ForwardModelStepDocumentation | None:
52
+ return ForwardModelStepDocumentation(
53
+ category="modelling.reservoir",
54
+ source_package="completor",
55
+ source_function_name="RunCompletor",
56
+ description=desc,
57
+ examples="""
58
+ .. code-block:: console
59
+ FORWARD_MODEL run_completor(<CASE>=case_completor.case, <INPUT_SCH>=drogon_pred.sch, <OUTPUT_SCH>=drogon_pred_ict.sch)
60
+ """,
61
+ )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "completor"
3
- version = "1.3.0"
3
+ version = "1.4.0"
4
4
  description = "Advanced multi-segmented well completion tool."
5
5
  authors = ["Equinor ASA <opensource@equinor.com>"]
6
6
  repository = "https://github.com/equinor/completor"
@@ -54,7 +54,7 @@ requires = ["poetry-core"]
54
54
  build-backend = "poetry.core.masonry.api"
55
55
 
56
56
  [tool.poetry.plugins."ert"]
57
- run_completor = "completor.hook_implementations.jobs"
57
+ run_completor = "completor.hook_implementations.forward_model_steps"
58
58
 
59
59
  [tool.black]
60
60
  line-length = 120
@@ -1,71 +0,0 @@
1
- import sys
2
- from pathlib import Path
3
-
4
- from completor.logger import logger
5
-
6
- try:
7
- from ert import plugin as ert_plugin # type: ignore
8
- except ModuleNotFoundError:
9
-
10
- def ert_plugin(name: str = ""):
11
- """Dummy decorator"""
12
-
13
- def decorator(func):
14
- return func
15
-
16
- return decorator
17
-
18
- logger.warning("Cannot import ERT, did you install Completor with ert option enabled?")
19
-
20
-
21
- def _get_jobs_from_directory(directory):
22
- resources = Path(sys.modules["completor"].__file__).parent / directory
23
-
24
- all_files = [resources / filename for filename in resources.glob("*") if (resources / filename).exists()]
25
- return {path.name: str(path) for path in all_files}
26
-
27
-
28
- @ert_plugin(name="completor")
29
- def installable_jobs():
30
- return _get_jobs_from_directory("config_jobs")
31
-
32
-
33
- @ert_plugin(name="completor")
34
- def job_documentation(job_name):
35
- if job_name != "run_completor":
36
- return None
37
-
38
- description = """Completor is a script for modelling
39
- wells with advanced completion.
40
- It generates a well schedule to be included in reservoir simulator,
41
- by combining the multi-segment tubing definition (from pre-processor reservoir modelling tools)
42
- with a user defined file specifying the completion design.
43
- The resulting well schedule comprises all keywords and parameters required by
44
- reservoir simulator. See the Completor documentation for details.
45
-
46
- Required:
47
- ---------
48
- -i : followed by name of file specifying completion design (e.g. completion.case).
49
- -s : followed by name of schedule file with multi-segment tubing definition,
50
- including COMPDAT, COMPSEGS and WELSEGS (required if not specified in case file).
51
-
52
- Optional:
53
- ---------
54
- --help : how to run completor.
55
- --about : about completor.
56
- -o : followed by name of completor output file.
57
- --figure : generates a pdf file with a schematics of the well segment structure.
58
-
59
- """
60
-
61
- examples = """.. code-block:: console
62
- FORWARD_MODEL run_completor(
63
- <CASE>=path/to/completion.case,
64
- <INPUT_SCH>=path/to/input.sch,
65
- <OUTPUT_SCH>path/to/output.sch
66
- )
67
- """
68
-
69
- category = "modelling.reservoir"
70
-
71
- return {"description": description, "examples": examples, "category": category}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes