Skip to content

Commit

Permalink
Finally running
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMau committed Nov 14, 2023
1 parent e2108c8 commit b574457
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions tests/test_build_datapackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from utils import PATH_TEST_FILES, check_if_csv_dirs_equal

from data_adapter_oemof.build_datapackage import DataPackage, refactor_timeseries
from oemof.tabular.datapackage import EnergySystem, Model
from oemof.tabular.facades import Dispatchable, Load, Commodity, Storage, Bus, Volatile

path_default = PATH_TEST_FILES / "_files"

Expand Down Expand Up @@ -277,22 +279,21 @@ def test_build_tabular_datapackage_from_adapter():
# FIXME: Demand is in different Format than expected.


#@pytest.mark.skip(reason="Needs period csv implementation first.")
@pytest.mark.skip(reason="Failing on timeincrements?")
def test_read_datapackage():
es = EnergySystem.from_datapackage(
"_files/build_datapackage_test/datapackage.json",
"_files/tabular_datapackage_hack_a_thon_goal/datapackage.json",
typemap={
"load": Load,
"dispatchable": Dispatchable,
"extraction_turbine": Dispatchable,
"bus": Bus,
"link": Link,
"storage": Storage,
"volatile": Volatile,
"conversion": Conversion,
"commodity": Commodity
},
)
model = Model(es)
pass


def test_period_csv_creation():
Expand Down
3 changes: 1 addition & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ def check_if_csv_files_equal(csv_file_a, csv_file_b):
csv_file_b
"""
print(csv_file_a)
df1 = pd.read_csv(csv_file_a, delimiter=";")
df2 = pd.read_csv(csv_file_b, delimiter=";")

pd.testing.assert_frame_equal(df1, df2, check_like=True)
assert pd.testing.assert_frame_equal(df1, df2, check_like=True) is None


def check_if_csv_dirs_equal(dir_a, dir_b):
Expand Down

0 comments on commit b574457

Please sign in to comment.