Skip to content

Commit

Permalink
Blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Mar 13, 2020
1 parent daec7ec commit 3fc48ae
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
24 changes: 12 additions & 12 deletions src/fmu/ensemble/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,18 +543,18 @@ def load_file(self, localpath, fformat, convert_numeric=False, force_reread=Fals
distuinguishes each realizations data.
"""
self.process_batch(
batch=[
{
"load_file": {
"localpath": localpath,
"fformat": fformat,
"convert_numeric": convert_numeric,
"force_reread": force_reread,
}
}
]
)
#for index, realization in self._realizations.items():
batch=[
{
"load_file": {
"localpath": localpath,
"fformat": fformat,
"convert_numeric": convert_numeric,
"force_reread": force_reread,
}
}
]
)
# for index, realization in self._realizations.items():
# try:
# realization.load_file(localpath, fformat, convert_numeric, force_reread)
# except ValueError:
Expand Down
3 changes: 2 additions & 1 deletion src/fmu/ensemble/realization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,8 @@ def get_smryvalues(self, props_wildcard=None):
}
else: # get_values() is deprecated in newer libecl
data = {
prop: self.get_eclsum().get_values(prop, report_only=False) for prop in props
prop: self.get_eclsum().get_values(prop, report_only=False)
for prop in props
}
dates = self.get_eclsum().get_dates(report_only=False)
return pd.DataFrame(data=data, index=dates)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_batch():
{"load_scalar": {"localpath": "npv.txt"}},
{"load_smry": {"column_keys": "FOPT", "time_index": "yearly"}},
{"load_smry": {"column_keys": "*", "time_index": "daily"}},
],
]
)
assert len(ens.get_df("npv.txt")) == 5
assert len(ens.get_df("unsmry--daily")["FOPR"]) == 5490
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ecl2df.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_reek():
testdir = os.path.abspath(".")

reekens = ScratchEnsemble(
"reektest", testdir + "/data/testensemble-reek001/" + "realization-*/iter-0",
"reektest", testdir + "/data/testensemble-reek001/" + "realization-*/iter-0"
)
if not HAVE_ECL2DF:
pytest.skip()
Expand Down Expand Up @@ -93,7 +93,7 @@ def get_smry(kwargs):
testdir = os.path.abspath(".")

reekens = ScratchEnsemble(
"reektest", testdir + "/data/testensemble-reek001/" + "realization-*/iter-0",
"reektest", testdir + "/data/testensemble-reek001/" + "realization-*/iter-0"
)
if not HAVE_ECL2DF:
pytest.skip()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ensembleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def rms_vol2df(kwargs):
{"load_scalar": {"localpath": "npv.txt"}},
{"load_smry": {"column_keys": "FOPT", "time_index": "yearly"}},
{"load_smry": {"column_keys": "*", "time_index": "daily"}},
],
]
)
assert len(ensset5.get_df("npv.txt")) == 10
assert len(ensset5.get_df("unsmry--yearly")) == 50
Expand Down

0 comments on commit 3fc48ae

Please sign in to comment.