Skip to content

Commit

Permalink
Add deprecation warning for MaStRMirror class #487
Browse files Browse the repository at this point in the history
Additionally, black did reformatting.
  • Loading branch information
FlorianK13 committed Mar 8, 2024
1 parent 491d223 commit e2f6d3f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions open_mastr/soap_api/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

class MaStRMirror:
"""
!!! warning
**This class is deprecated** and will not be maintained from version 0.15.0 onwards.
Instead use [`Mastr.download`][open_mastr.Mastr.download] with parameter
`method` = "bulk" to mirror the MaStR dataset to a local database.
Mirror the Marktstammdatenregister database and keep it up-to-date.
A PostgreSQL database is used to mirror the MaStR database. It builds
Expand Down Expand Up @@ -93,6 +99,18 @@ def __init__(
Number of parallel processes used to download additional data.
Defaults to `None`.
"""
log.warn(
"""
The `MaStRMirror` class is deprecated and will not be maintained in the future.
To get a full table of the Marktstammdatenregister, use the open_mastr.Mastr.download
method.
If this change causes problems for you, please comment in this issue on github:
https://github.com/OpenEnergyPlatform/open-MaStR/issues/487
"""
)

self._engine = engine

# Associate downloader
Expand Down Expand Up @@ -979,6 +997,7 @@ def restore(self, dumpfile):
!!! warning
If tables that are restored from the dump contain data, restore doesn't work!
"""
Expand Down

0 comments on commit e2f6d3f

Please sign in to comment.