Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Feb 23, 2023
1 parent 7eed7fa commit 8c84a8a
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion semeio/jobs/overburden_timeshift/ots.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def ots_run(parameter_file):
)
line = "{}, {}, {}" + ", {}" * num_pairs + "\n"
with open(parms.vintages_export_file, "w", encoding="utf-8") as f:

for point, (x_index, y_index) in enumerate(
product(
range(1, surface_horizon.get_nx() + 1),
Expand Down
1 change: 0 additions & 1 deletion semeio/jobs/overburden_timeshift/ots_vel_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def __len__(self):
return len(self.x)

def __str__(self):

s = "x: " + str(self.x)
s += "\ny: " + str(self.y)
s += "\nz: " + str(self.z)
Expand Down
1 change: 0 additions & 1 deletion semeio/jobs/scripts/fm_stea.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


def _get_args_parser():

parser = argparse.ArgumentParser(description=description)

parser.add_argument(
Expand Down
1 change: 0 additions & 1 deletion semeio/jobs/scripts/replace_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


def _get_args_parser():

parser = argparse.ArgumentParser(description=description)

parser.add_argument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def test_expand_input_modification():
],
)
def test_valid_config_setup(valid_config):

schema = _CORRELATED_OBSERVATIONS_SCHEMA
config = configsuite.ConfigSuite(
valid_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def test_failed_wildcard_expansion(config_dict, obs_list, expected_fails, err_ms


def test_create_observation_vectors(snake_oil_facade):

valid_config_data = {
"CALCULATE_KEYS": {"keys": [{"key": "WPR_DIFF_1"}]},
"UPDATE_KEYS": {"keys": [{"key": "WPR_DIFF_1"}]},
Expand All @@ -153,7 +152,6 @@ def test_create_observation_vectors(snake_oil_facade):

@pytest.mark.usefixtures("setup_tmpdir")
def test_add_observation_vectors(test_data_root):

valid_config_data = {"UPDATE_KEYS": {"keys": [{"key": "WOPR_OP1_108"}]}}

# pylint: disable=protected-access
Expand Down
1 change: 0 additions & 1 deletion tests/jobs/overburden_timeshift/ots_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def create_segy_file(name, spec, trace=None, il=None, xl=None, cdp_x=None, cdp_y
cdp_y = int_val

with segyio.create(name, spec) as f:

scalar = 1
trno = 0
for i, i_cdp_x in enumerate(cdp_x):
Expand Down
1 change: 0 additions & 1 deletion tests/jobs/replace_string/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
)
def test_replace_string(tmpdir, input_text, replace_from, replace_to, expected):
with tmpdir.as_cwd():

ert_config_fname = "test.ert"
Path(ert_config_fname).write_text(
ert_config.format(FROM=replace_from, TO=replace_to), encoding="utf-8"
Expand Down
6 changes: 0 additions & 6 deletions tests/jobs/rft/test_gendata_rft.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def test_gendata_rft_directory(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_rft_entry_point_wrong_well_file(tmpdir, monkeypatch):

arguments = [
"script_name",
"-e",
Expand All @@ -150,7 +149,6 @@ def test_gendata_rft_entry_point_wrong_well_file(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_rft_entry_point(tmpdir, monkeypatch):

arguments = [
"script_name",
"-e",
Expand Down Expand Up @@ -227,7 +225,6 @@ def test_multiple_report_steps(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_inactive_info_point_not_in_grid(tmpdir, monkeypatch):

with open("B-1AH.txt", "a+", encoding="utf-8") as fh:
fh.write("0 1 2 3\n")

Expand Down Expand Up @@ -257,7 +254,6 @@ def test_gendata_inactive_info_point_not_in_grid(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_inactive_info_zone_mismatch(tmpdir, monkeypatch):

with open("well_and_time.txt", "w+", encoding="utf-8") as fh:
fh.write("B-1AH 2005-12-01 0\n")

Expand Down Expand Up @@ -291,7 +287,6 @@ def test_gendata_inactive_info_zone_mismatch(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_inactive_info_not_in_rft(tmpdir, monkeypatch):

with open("well_and_time.txt", "w+", encoding="utf-8") as fh:
fh.write("B-1AH 2005-12-01 0\n")

Expand Down Expand Up @@ -325,7 +320,6 @@ def test_gendata_inactive_info_not_in_rft(tmpdir, monkeypatch):

@pytest.mark.usefixtures("norne_data")
def test_gendata_inactive_info_zone_missing_value(tmpdir, monkeypatch):

with open("well_and_time.txt", "w+", encoding="utf-8") as fh:
fh.write("B-1AH 2005-12-01 0\n")

Expand Down
2 changes: 0 additions & 2 deletions tests/jobs/rft/test_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def test_validate_non_existing_zone():
"ijk, pressure, validation", itertools.product(ijks, pressures, validations)
)
def test_is_active(ijk, pressure, validation):

point = TrajectoryPoint(0, 1, 2, 3, "Zone1")
point.set_ijk(ijk)
point.pressure = pressure
Expand Down Expand Up @@ -245,6 +244,5 @@ def test_tuple_column_splitter_explicit():


def test_non_existing_file():

with pytest.raises(IOError, match="Trajectory file non_existing not found!"):
Trajectory.load_from_file("non_existing")
1 change: 0 additions & 1 deletion tests/jobs/rft/test_zonemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def initdir(tmpdir):

@pytest.mark.usefixtures("initdir")
def test_load_data():

for fname in [
"valid_zonemap.txt",
"valid_zonemap_with_comments.txt",
Expand Down
3 changes: 0 additions & 3 deletions tests/jobs/test_scale_observations/test_scale_observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def fixture_snake_oil_obs(snake_oil_facade):

@pytest.mark.parametrize("index_list", [None, [0, 1, 2, 3]])
def test_scale_history_summary_obs(snake_oil_obs, index_list):

scale_observations(snake_oil_obs, 1.2345, [Config("FOPR", index_list)])

obs_vector = snake_oil_obs["FOPR"]
Expand All @@ -31,7 +30,6 @@ def test_scale_history_summary_obs(snake_oil_obs, index_list):

@pytest.mark.parametrize("index_list", [None, [35]])
def test_scale_summary_obs(snake_oil_obs, index_list):

scale_observations(snake_oil_obs, 1.2345, [Config("WOPR_OP1_36", index_list)])

obs_vector = snake_oil_obs["WOPR_OP1_36"]
Expand All @@ -41,7 +39,6 @@ def test_scale_summary_obs(snake_oil_obs, index_list):

@pytest.mark.parametrize("index_list", [None, [400, 800]])
def test_scale_gen_obs(snake_oil_obs, index_list):

scale_observations(snake_oil_obs, 1.2345, [Config("WPR_DIFF_1", index_list)])

obs_vector = snake_oil_obs["WPR_DIFF_1"]
Expand Down

0 comments on commit 8c84a8a

Please sign in to comment.