diff --git a/edisgo/io/db.py b/edisgo/io/db.py index dd5db2b3..fa3d77bc 100644 --- a/edisgo/io/db.py +++ b/edisgo/io/db.py @@ -171,7 +171,7 @@ def engine(path: Path | str, ssh: bool = False) -> Engine: if not ssh: return create_engine( - "postgresql+oedialect//@toep.iks.cs.ovgu.de", + "postgresql+oedialect://:@toep.iks.cs.ovgu.de", echo=False, ) diff --git a/tests/io/test_dsm_import.py b/tests/io/test_dsm_import.py index f079ec04..d2f595e6 100644 --- a/tests/io/test_dsm_import.py +++ b/tests/io/test_dsm_import.py @@ -5,7 +5,6 @@ class TestDSMImport: - @pytest.mark.local def test_oedb(self): # test without industrial load edisgo_object = EDisGo( @@ -40,7 +39,6 @@ def test_oedb(self): assert (dsm_profiles["p_max"] >= 0.0).all().all() assert (dsm_profiles["e_max"] >= 0.0).all().all() - @pytest.mark.local def test_get_profiles_per_industrial_load(self): dsm_profiles = dsm_import.get_profiles_per_industrial_load( load_ids=[15388, 241, 1], scenario="eGon2035", engine=pytest.engine @@ -58,7 +56,6 @@ def test_get_profiles_per_industrial_load(self): ) assert dsm_profiles["p_min"].empty - @pytest.mark.local def test_get_profile_cts(self): edisgo = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False diff --git a/tests/io/test_electromobility_import.py b/tests/io/test_electromobility_import.py index 0c35c719..f4c67eb3 100644 --- a/tests/io/test_electromobility_import.py +++ b/tests/io/test_electromobility_import.py @@ -191,7 +191,6 @@ def test_integrate_charging_parks(self): assert edisgo_ids_cp == edisgo_ids_topology - @pytest.mark.local def test_simbev_config_from_oedb(self): config_df = electromobility_import.simbev_config_from_oedb( engine=pytest.engine, scenario="eGon2035" @@ -201,7 +200,6 @@ def test_simbev_config_from_oedb(self): assert config_df["stepsize"][0] == 15 assert config_df["days"][0] == 365 - @pytest.mark.local def test_potential_charging_parks_from_oedb(self): edisgo_obj = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False @@ -215,7 +213,6 @@ def test_potential_charging_parks_from_oedb(self): assert all(potential_parks_df.geom.iloc[10].within(grid_gdf.geometry)) assert all(potential_parks_df.geom.iloc[100].within(grid_gdf.geometry)) - @pytest.mark.local def test_charging_processes_from_oedb(self): edisgo_obj = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False diff --git a/tests/io/test_generators_import.py b/tests/io/test_generators_import.py index 51ee4b5e..47765f70 100644 --- a/tests/io/test_generators_import.py +++ b/tests/io/test_generators_import.py @@ -484,7 +484,6 @@ class TestGeneratorsImportOEDB: """ @pytest.mark.slow - @pytest.mark.oedbtest def test_oedb_legacy_without_timeseries(self): edisgo = EDisGo( ding0_grid=pytest.ding0_test_network_2_path, @@ -498,7 +497,6 @@ def test_oedb_legacy_without_timeseries(self): assert np.isclose(edisgo.topology.generators_df.p_nom.sum(), 20.18783) @pytest.mark.slow - @pytest.mark.oedbtest def test_oedb_legacy_with_worst_case_timeseries(self): edisgo = EDisGo(ding0_grid=pytest.ding0_test_network_2_path) edisgo.set_time_series_worst_case_analysis() @@ -570,7 +568,6 @@ def test_oedb_legacy_with_worst_case_timeseries(self): # :, new_solar_gen.name] / new_solar_gen.p_nom).all() @pytest.mark.slow - @pytest.mark.oedbtest def test_oedb_legacy_with_timeseries_by_technology(self): timeindex = pd.date_range("1/1/2012", periods=3, freq="H") ts_gen_dispatchable = pd.DataFrame( @@ -650,7 +647,6 @@ def test_oedb_legacy_with_timeseries_by_technology(self): # :, new_solar_gen.name] / new_solar_gen.p_nom).all() @pytest.mark.slow - @pytest.mark.oedbtest def test_target_capacity(self): edisgo = EDisGo( ding0_grid=pytest.ding0_test_network_2_path, @@ -710,7 +706,6 @@ def test_target_capacity(self): p_biomass_before * 1.0, ) - @pytest.mark.local def test_oedb(self): edisgo = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False diff --git a/tests/io/test_heat_pump_import.py b/tests/io/test_heat_pump_import.py index 12a327b4..5748afbe 100644 --- a/tests/io/test_heat_pump_import.py +++ b/tests/io/test_heat_pump_import.py @@ -57,7 +57,7 @@ def setup_resistive_heater_data_dh(self): ) return hp_df - @pytest.mark.local + @pytest.mark.oedbtest def test_oedb(self, caplog): with caplog.at_level(logging.DEBUG): heat_pump_import.oedb( @@ -196,7 +196,6 @@ def test__grid_integration(self, caplog): bus_rh = hp_df[hp_df.p_set == 0.17].bus[0] assert determine_bus_voltage_level(self.edisgo, bus_rh) == 6 - @pytest.mark.local def test_efficiency_resistive_heaters_oedb(self): eta_dict = heat_pump_import.efficiency_resistive_heaters_oedb( scenario="eGon2035", engine=pytest.engine diff --git a/tests/io/test_storage_import.py b/tests/io/test_storage_import.py index 010fc02c..941cdc62 100644 --- a/tests/io/test_storage_import.py +++ b/tests/io/test_storage_import.py @@ -26,7 +26,6 @@ def setup_home_batteries_data(self): ) return df - @pytest.mark.local def test_oedb(self, caplog): # test without new PV rooftop plants with caplog.at_level(logging.DEBUG): diff --git a/tests/io/test_timeseries_import.py b/tests/io/test_timeseries_import.py index c6abb872..ca0cef72 100644 --- a/tests/io/test_timeseries_import.py +++ b/tests/io/test_timeseries_import.py @@ -59,7 +59,6 @@ def test__timeindex_helper_func(self): assert_index_equal(ind, given_index) assert_index_equal(ind_full, timeindex) - @pytest.mark.oedbtest def test_feedin_oedb_legacy(self): edisgo = EDisGo(ding0_grid=pytest.ding0_test_network_path) timeindex = pd.date_range("1/1/2010", periods=3000, freq="H") @@ -73,7 +72,6 @@ def test_feedin_oedb_legacy(self): assert np.isclose(feedin["solar"][1122075][timeindex[61]], 0.423823) assert np.isclose(feedin["wind"][1122075][timeindex[1356]], 0.106361) - @pytest.mark.local def test_feedin_oedb(self): edisgo_object = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False @@ -104,7 +102,6 @@ def test_load_time_series_demandlib(self): assert np.isclose(load.sum()["agricultural"], 1.0) assert np.isclose(load.sum()["industrial"], 1.0) - @pytest.mark.local def test_cop_oedb(self): edisgo = EDisGo(ding0_grid=pytest.ding0_test_network_path) cop_df = timeseries_import.cop_oedb( @@ -140,7 +137,6 @@ def setup_egon_heat_pump_data(self): ) return hp_df - @pytest.mark.local def test_heat_demand_oedb(self, caplog): edisgo_object = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False @@ -169,7 +165,6 @@ def test_heat_demand_oedb(self, caplog): # ToDo add further tests - @pytest.mark.local def test_electricity_demand_oedb(self, caplog): # test with one load each and without year edisgo_object = EDisGo( @@ -216,7 +211,6 @@ def test_electricity_demand_oedb(self, caplog): # ToDo add further tests to check values - @pytest.mark.local def test_get_residential_heat_profiles_per_building(self): df = timeseries_import.get_residential_heat_profiles_per_building( [442081, 430859], "eGon2035", pytest.engine @@ -224,7 +218,6 @@ def test_get_residential_heat_profiles_per_building(self): assert df.shape == (8760, 2) # ToDo add further tests - @pytest.mark.local def test_get_district_heating_heat_demand_profiles(self): df = timeseries_import.get_district_heating_heat_demand_profiles( [6], "eGon2035", pytest.engine @@ -232,7 +225,6 @@ def test_get_district_heating_heat_demand_profiles(self): assert df.shape == (8760, 1) # ToDo add further tests - @pytest.mark.local def test_get_cts_profiles_per_building(self): edisgo_object = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False @@ -253,7 +245,6 @@ def test_get_cts_profiles_per_building(self): assert df.shape == (8760, len(cts_loads)) # ToDo add further tests - @pytest.mark.local def test_get_cts_profiles_per_grid(self): df = timeseries_import.get_cts_profiles_per_grid( 33535, "eGon2035", "heat", pytest.engine @@ -265,7 +256,6 @@ def test_get_cts_profiles_per_grid(self): assert df.shape == (8760, 85) # ToDo add further tests - @pytest.mark.local def test_get_residential_electricity_profiles_per_building(self): df = timeseries_import.get_residential_electricity_profiles_per_building( [-1, 442081], "eGon2035", pytest.engine @@ -280,7 +270,6 @@ def test_get_residential_electricity_profiles_per_building(self): assert df.shape == (8760, 1) assert np.isclose(df.loc[:, 442081].sum(), 4.288845, atol=1e-3) - @pytest.mark.local def test_get_industrial_electricity_profiles_per_site(self): # test with one site and one OSM area df = timeseries_import.get_industrial_electricity_profiles_per_site( diff --git a/tests/network/test_heat.py b/tests/network/test_heat.py index c1a59ae8..6ed384be 100644 --- a/tests/network/test_heat.py +++ b/tests/network/test_heat.py @@ -101,7 +101,6 @@ def test_set_cop(self): check_freq=False, ) - @pytest.mark.local def test_set_cop_oedb(self, caplog): # ################### test with oedb ################### edisgo_object = EDisGo( @@ -209,7 +208,6 @@ def test_set_heat_demand(self): check_freq=False, ) - @pytest.mark.local def test_set_heat_demand_oedb(self): # test with oedb edisgo_object = EDisGo( diff --git a/tests/network/test_timeseries.py b/tests/network/test_timeseries.py index 2e8b717b..76807a7f 100644 --- a/tests/network/test_timeseries.py +++ b/tests/network/test_timeseries.py @@ -1235,7 +1235,6 @@ def test_worst_case_storage_units(self): ) @pytest.mark.slow - @pytest.mark.oedbtest def test_predefined_fluctuating_generators_by_technology(self): timeindex = pd.date_range("1/1/2011 12:00", periods=2, freq="H") self.edisgo.timeseries.timeindex = timeindex @@ -1404,7 +1403,6 @@ def test_predefined_fluctuating_generators_by_technology(self): ) # fmt: on - @pytest.mark.local def test_predefined_fluctuating_generators_by_technology_oedb(self): edisgo_object = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False diff --git a/tests/test_edisgo.py b/tests/test_edisgo.py index dbfa03a3..a7411e68 100755 --- a/tests/test_edisgo.py +++ b/tests/test_edisgo.py @@ -257,7 +257,6 @@ def test_set_time_series_active_power_predefined(self, caplog): assert self.edisgo.timeseries.storage_units_active_power.shape == (2, 0) assert self.edisgo.timeseries.storage_units_reactive_power.shape == (2, 0) - @pytest.mark.local def test_set_time_series_active_power_predefined_oedb(self): # test conventional_loads_ts="oedb" for all loads in grid edisgo_object = EDisGo( @@ -382,7 +381,6 @@ def test_to_graph(self): ) @pytest.mark.slow - @pytest.mark.oedbtest def test_generator_import(self): edisgo = EDisGo(ding0_grid=pytest.ding0_test_network_2_path) edisgo.import_generators("nep2035") @@ -1296,7 +1294,6 @@ def test_import_electromobility(self): ) # fmt: on - @pytest.mark.local def test_import_electromobility_oedb(self): """ Test import from oedb. @@ -1354,7 +1351,7 @@ def test_import_electromobility_oedb(self): ) # fmt: on - @pytest.mark.local + @pytest.mark.oedbtest def test_import_heat_pumps(self): edisgo_object = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False diff --git a/tests/test_examples.py b/tests/test_examples.py index 9f0a862e..8e31d88d 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -26,7 +26,6 @@ def test_plot_example_ipynb(self): assert result.exec_error is None @pytest.mark.slow - @pytest.mark.oedbtest def test_electromobility_example_ipynb(self): path = os.path.join(self.examples_dir_path, "electromobility_example.ipynb") notebook = pytest_notebook.notebook.load_notebook(path=path) @@ -40,7 +39,6 @@ def test_electromobility_example_ipynb(self): assert result.exec_error is None @pytest.mark.slow - @pytest.mark.oedbtest def test_edisgo_simple_example_ipynb(self): path = os.path.join(self.examples_dir_path, "edisgo_simple_example.ipynb") notebook = pytest_notebook.notebook.load_notebook(path=path) diff --git a/tests/tools/test_tools.py b/tests/tools/test_tools.py index 66216ca6..f6d08f72 100644 --- a/tests/tools/test_tools.py +++ b/tests/tools/test_tools.py @@ -431,7 +431,6 @@ def test_determine_bus_voltage_level(self): assert tools.determine_bus_voltage_level(self.edisgo, bus_voltage_level_6) == 6 assert tools.determine_bus_voltage_level(self.edisgo, bus_voltage_level_7) == 7 - @pytest.mark.oedbtest def test_get_weather_cells_intersecting_with_grid_district(self): weather_cells = tools.get_weather_cells_intersecting_with_grid_district( self.edisgo @@ -445,7 +444,6 @@ def test_get_weather_cells_intersecting_with_grid_district(self): # for some reason.. assert 1122074 in weather_cells - @pytest.mark.local def test_get_weather_cells_intersecting_with_grid_district_egon(self): edisgo_obj = EDisGo( ding0_grid=pytest.ding0_test_network_3_path, legacy_ding0_grids=False