-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from DHI/bug/result_data_filters
Fix for res1d location filtering.
- Loading branch information
Showing
27 changed files
with
289 additions
and
59 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
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
|
||
setuptools.setup( | ||
name="mikeio1d", | ||
version="0.4.0", | ||
version="0.4.1", | ||
install_requires=[ | ||
'pythonnet<=2.5.2; python_version < "3.7.0"', | ||
'pythonnet>=3.0.0a2; python_version >= "3.7.0"', | ||
|
@@ -41,7 +41,7 @@ | |
"matplotlib", | ||
"jupyterlab", | ||
], | ||
"test": ["pytest", "matplotlib"], | ||
"test": ["pytest", "matplotlib", "pyarrow"], | ||
}, | ||
author="Gediminas Kirsanskas", | ||
author_email="[email protected]", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
from .testdata import testdata | ||
|
||
from pandas.testing import assert_frame_equal | ||
|
||
from mikeio1d import Res1D | ||
|
||
|
||
def testdata_name(): | ||
import dataclasses | ||
|
||
return list(dataclasses.asdict(testdata).keys()) | ||
|
||
|
||
@pytest.mark.parametrize("extension", [".res1d", ".res", ".resx", ".out"]) | ||
def test_mikeio1d_generates_expected_dataframe_for_filetype(extension): | ||
for name in testdata_name(): | ||
path = getattr(testdata, name) | ||
if not path.endswith(extension): | ||
continue | ||
df = Res1D(path).read() | ||
df = df.loc[ | ||
:, ~df.columns.duplicated() | ||
] # TODO: Remove this when column names are guaranteed unique | ||
df_expected = testdata.get_expected_dataframe(name) | ||
assert_frame_equal(df, df_expected) |
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
Oops, something went wrong.