-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move enums to common.py; Add curve to the prepare_for_regression function; PWPA-1977
- Loading branch information
Gabriel Antão
committed
Jun 28, 2024
1 parent
4293494
commit 95e3761
Showing
8 changed files
with
424 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/alfasim_score/converter/alfacase/_tests/test_convert_nodes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import attr | ||
from alfasim_sdk import NodeCellType | ||
from pytest_regressions.data_regression import DataRegressionFixture | ||
|
||
from alfasim_score.common import prepare_for_regression | ||
from alfasim_score.converter.alfacase.convert_alfacase import ScoreAlfacaseConverter | ||
from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader | ||
|
||
|
||
def test_convert_nodes( | ||
data_regression: DataRegressionFixture, | ||
score_input_example: ScoreInputReader, | ||
) -> None: | ||
builder = ScoreAlfacaseConverter(score_input_example) | ||
nodes = builder.build_nodes() | ||
data_regression.check( | ||
[ | ||
{"name": node.name, "type": node.node_type.value, "pvt_model": node.pvt_model} | ||
for node in nodes | ||
] | ||
) |
9 changes: 9 additions & 0 deletions
9
src/alfasim_score/converter/alfacase/_tests/test_convert_nodes/test_convert_nodes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: WELBORE_TOP_NODE | ||
pvt_model: base | ||
type: mass_source_boundary | ||
- name: WELBORE_BOTTOM_NODE | ||
pvt_model: base | ||
type: pressure_boundary | ||
- name: GAS_LIFT_MASS_NODE | ||
pvt_model: gas_lift | ||
type: mass_source_boundary |
Oops, something went wrong.