diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d646f7..1a4d7c73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/ - Update list for english column translation [#715](https://github.com/OpenEnergyPlatform/open-MaStR/pull/715) ### Changed +- Replace Marktrollen with MarktakteureUndRollen + [#722](https://github.com/OpenEnergyPlatform/open-MaStR/pull/722) ### Removed diff --git a/docs/dataset.md b/docs/dataset.md index 772395bf..3cf4a0af 100644 --- a/docs/dataset.md +++ b/docs/dataset.md @@ -77,7 +77,7 @@ After downloading the MaStR, you will find a database with a large number of tab | grids | *Does not contain geoinformation* | | locations_extended | *Connects units with grids - to get coordinates of units use the _extended tables*| | market_actors | | - | market_roles | | + | market_actors_and_roles | | | permit | | | storage_units | | | kwk | *short for: Combined heat and power (CHP)* | diff --git a/open_mastr/mastr.py b/open_mastr/mastr.py index c45ad4be..a6588c4f 100644 --- a/open_mastr/mastr.py +++ b/open_mastr/mastr.py @@ -270,7 +270,7 @@ def to_csv( ["wind", "solar", "biomass", "hydro", "gsgk", "combustion", "nuclear", "storage", "balancing_area", "electricity_consumer", "gas_consumer", "gas_producer", "gas_storage", "gas_storage_extended", - "grid_connections", "grids", "market_actors", "market_roles", + "grid_connections", "grids", "market_actors", "market_actors_and_roles", "locations_extended", "permit", "deleted_units", "storage_units"] chunksize: int Defines the chunksize of the tables export. diff --git a/open_mastr/utils/constants.py b/open_mastr/utils/constants.py index 490ec294..5059df5b 100644 --- a/open_mastr/utils/constants.py +++ b/open_mastr/utils/constants.py @@ -49,6 +49,7 @@ "locations_extended", "market_actors", "market_roles", + "market_actors_and_roles", "permit", "deleted_units", "deleted_market_actors", @@ -87,7 +88,7 @@ ], "electricity_consumer": ["einheitenstromverbraucher"], "location": ["lokationen"], - "market": ["marktakteure", "marktrollen"], + "market": ["marktakteure", "marktakteureundrollen"], "grid": ["netzanschlusspunkte", "netze"], "balancing_area": ["bilanzierungsgebiete"], "permit": ["einheitengenehmigung"], @@ -107,7 +108,7 @@ ], "electricity_consumer": ["electricity_consumer"], "location": ["locations_extended"], - "market": ["market_actors", "market_roles"], + "market": ["market_actors", "market_actors_and_roles"], "grid": ["grid_connections", "grids"], "balancing_area": ["balancing_area"], "permit": ["permit"], @@ -165,6 +166,7 @@ "locations_extended": "LocationExtended", "market_actors": "MarketActors", "market_roles": "MarketRoles", + "market_actors_and_roles": "MarketActorsAndRoles", "grid_connections": "GridConnections", "grids": "Grids", "balancing_area": "BalancingArea", diff --git a/open_mastr/utils/orm.py b/open_mastr/utils/orm.py index 70890ecb..3d4c9f19 100644 --- a/open_mastr/utils/orm.py +++ b/open_mastr/utils/orm.py @@ -612,8 +612,8 @@ class ElectricityConsumer(ParentAllTables, Base): GeplantesInbetriebnahmedatum = Column(Date) -class MarketRoles(ParentAllTables, Base): - __tablename__ = "market_roles" +class MarketActorsAndRoles(ParentAllTables, Base): + __tablename__ = "market_actors_and_roles" MastrNummer = Column(String, primary_key=True) MarktakteurMastrNummer = Column(String) @@ -977,16 +977,16 @@ class ChangedDSOAssignment(ParentAllTables, Base): "__class__": DeletedMarketActors, "replace_column_names": None, }, - "marktrollen": { - "__name__": MarketRoles.__tablename__, - "__class__": MarketRoles, - "replace_column_names": None, - }, "marktakteure": { "__name__": MarketActors.__tablename__, "__class__": MarketActors, "replace_column_names": None, }, + "marktakteureundrollen": { + "__name__": MarketActorsAndRoles.__tablename__, + "__class__": MarketActorsAndRoles, + "replace_column_names": None, + }, "netze": { "__name__": Grids.__tablename__, "__class__": Grids, diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 5f8cfa81..df9de681 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -153,7 +153,7 @@ def test_data_to_include_tables(): ] include_tables_str = ["einheitenstromverbraucher"] - map_to_db_table_list = ["market_actors", "market_roles"] + map_to_db_table_list = ["market_actors", "market_actors_and_roles"] map_to_db_table_str = ["locations_extended"] # Assert