Skip to content

Commit f18ecac

Browse files
authored
Merge pull request #514 from OpenEnergyPlatform/release-v0.14.3
Release v0.14.3
2 parents 2f623f3 + d2d2dec commit f18ecac

File tree

18 files changed

+230
-145
lines changed

18 files changed

+230
-145
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.14.2
2+
current_version = 0.14.3
33
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>(a|na))+(?P<build>\d+))?
44
serialize =
55
{major}.{minor}.{patch}{release}{build}
@@ -15,7 +15,7 @@ values =
1515
[bumpversion:part:build]
1616
first_value = 1
1717

18-
[bumpversion:file:setup.py]
18+
[bumpversion:file:pyproject.toml]
1919

2020
[bumpversion:file:./.github/workflows/ci-production.yml]
2121

.github/workflows/ci-develop.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI - Pytest Develop
22

33
on:
44
workflow_dispatch:
@@ -15,14 +15,14 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [macos-latest, ubuntu-latest, windows-latest]
18-
python-version: [3.9, '3.10']
18+
python-version: ['3.10', '3.11', '3.12']
1919
name: pytest (Python ${{ matrix.python-version }}) (OS ${{ matrix.os }})
2020

2121
# Configure tests
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install dependencies

.github/workflows/ci-production.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI - Pytest Production
22

33
on:
44
workflow_dispatch:
@@ -15,23 +15,24 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [macos-latest, ubuntu-latest, windows-latest]
18-
python-version: [3.9, '3.10']
18+
python-version: ['3.10', '3.11', '3.12']
1919
name: pytest (Python ${{ matrix.python-version }}) (OS ${{ matrix.os }})
2020

2121
# Configure tests
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31+
pip install build
3132
- name: create package
32-
run: python setup.py sdist
33+
run: python -m build --sdist
3334
- name: import open-mastr
34-
run: python -m pip install ./dist/open_mastr-0.14.2.tar.gz
35+
run: python -m pip install ./dist/open_mastr-0.14.3.tar.gz
3536
- name: Create credentials file
3637
env:
3738
MASTR_TOKEN: ${{ secrets.MASTR_TOKEN }}

.github/workflows/test-pypi-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- test-release # update setup.py version number with bump2version (implemented in #407)
7+
- test-release # update pyproject.toml version number
88

99
jobs:
1010
build-n-publish:

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ For each version important additions, changes and removals are listed here.
66
The format is inspired from [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
77
and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
10+
## [v0.14.3] Fix Pypi Release - 2024-04-24
11+
### Added
12+
- Add new table `changed_dso_assignment` [#510](https://github.com/OpenEnergyPlatform/open-MaStR/pull/510)
13+
- Add deprecation warning for `MaStRMirror` and `MaStRDownload` [#492](https://github.com/OpenEnergyPlatform/open-MaStR/pull/492)
14+
### Changed
15+
- Change from `setup.py` to `pyproject.toml` based installation [#513](https://github.com/OpenEnergyPlatform/open-MaStR/pull/513)
16+
### Removed
17+
- Remove outdated and deprecated dependencies [#506](https://github.com/OpenEnergyPlatform/open-MaStR/pull/506)
18+
919
## [v0.14.2] Maintenance - 2024-04-10
1020
### Changed
1121
- Fix and add URLs of example projects in readme [#481](https://github.com/OpenEnergyPlatform/open-MaStR/pull/481)
@@ -16,6 +26,7 @@ and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/
1626
### Removed
1727
- Remove unused Docker File [#501](https://github.com/OpenEnergyPlatform/open-MaStR/pull/501)
1828

29+
1930
## [v0.14.1] Hotfix - 2024-01-17
2031
### Changed
2132
- Change data type of NetzbetreiberpruefungStatus to string [#483](https://github.com/OpenEnergyPlatform/open-MaStR/pull/483)

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ authors:
2828
title: "open-MaStR"
2929
type: software
3030
license: AGPL-3.0
31-
version: 0.14.2
31+
version: 0.14.3
3232
doi:
33-
date-released: 2024-04-10
33+
date-released: 2024-04-24
3434
url: "https://github.com/OpenEnergyPlatform/open-MaStR/"

RELEASE_PROCEDURE.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ It always has the format `YYYY-MM-DD`, e.g. `2022-05-16`.
4040
### 3. 🐙 Create a `Draft GitHub Release`
4141
* [Draft a new release](https://github.com/OpenEnergyPlatform/open-MaStR/releases/new)
4242
* Enter the release version number `v0.12.1` as title
43-
* Summarize key changes in the description
44-
* Use the `generate release notes` button provided by github (This might only work after the release branch is merged on production)
4543
* Save draft
4644

4745
### 4. 🐙 Finish all planned Developments
@@ -52,7 +50,7 @@ It always has the format `YYYY-MM-DD`, e.g. `2022-05-16`.
5250

5351
### 5. 💠 Create a `release` branch
5452
* Checkout `develop` and branch with `git checkout -b release-v0.12.1`
55-
* Update version for test release with e.g. `bump2version patch`. To specify version numbers manually use `bump2version --current-version <current_version> --new-version <new_version> patch`
53+
* Update version for test release with `bump2version --current-version <current_version> --new-version <new_version> patch`
5654
* Commit version update with `git commit -am "version update v0.12.1a1"`
5755
* Push branch with `git push --set-upstream origin release-v0.12.1`
5856

@@ -77,11 +75,11 @@ It always has the format `YYYY-MM-DD`, e.g. `2022-05-16`.
7775
### 8. 🐙 Create a `Release Pull Request`
7876
* Use `📝PR_TEMPLATE_RELEASE` (❗ToDo❗)
7977
* Merge `release` into `production` branch
80-
* Assign two reviewers to check the release
78+
* Assign reviewers to check the release
8179
* Run all test
8280
* Execute the software locally
8381
* Wait for reviews and tests
84-
* Merge PR and delete `release` branch
82+
* Merge PR
8583

8684
### 9. 💠 Set the `Git Tag`
8785
* Checkout `production` branch and pull
@@ -96,6 +94,7 @@ It always has the format `YYYY-MM-DD`, e.g. `2022-05-16`.
9694
### 10. 🐙 Publish `Release` on GitHub and PyPI
9795
* Navigate to your [releases](https://github.com/OpenEnergyPlatform/open-MaStR/releases/) on GitHub and open your draft release.
9896
* Summarize key changes in the description
97+
* Use the `generate release notes` button provided by github (This only works after the release branch is merged on production)
9998
* Choose the correct git `tag`
10099
* Choose the `production` branch
101100
* Publish release
@@ -105,19 +104,21 @@ It always has the format `YYYY-MM-DD`, e.g. `2022-05-16`.
105104
▶️ In the background the GitHub workflow (pypi-publish.yml) will publish the package 📦 on PyPI!
106105

107106
### 11. 🐙 Set up new development
108-
* Create a Pull request from `production` to `develop`
107+
* Create a Pull request from `release-*` to `develop`
109108
* Create a new **unreleased section** in the `📝CHANGELOG.md`
110109
```
111110
## [v0.XX.X] unreleased
112111
### Added
113112
### Changed
114113
### Removed
115114
```
115+
* Merge `release-*` to `develop` and delete `release-*` branch
116116

117117
▶️ Continue the developments 🛠
118118

119119
## Documentation on Read the Docs (RTD)
120-
ToDo
120+
* ReadTheDocs triggers a new built automatically after the release on github. To see
121+
the build status, visit https://readthedocs.org/projects/open-mastr/builds/
121122

122123

123124
## Sources:

docs/dataset.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ After downloading the MaStR, you will find a database with a large number of tab
6767
| Table name | Comments |
6868
|------|------|
6969
| balancing_area | *Related to the energy market* |
70+
| changed_dso_assignment | *Units where the DSO responsibility changed* |
7071
| electricity_consumer | *Only large consumers* |
7172
| gas_consumer | *Only large consumers* |
7273
| gas_producer | |
@@ -81,6 +82,7 @@ After downloading the MaStR, you will find a database with a large number of tab
8182
| storage_units | |
8283
| kwk | *short for: Combined heat and power (CHP)* |
8384

85+
8486
### MaStR data model
8587
A useful overview of the MaStR data model can be found [here (in german)](https://www.marktstammdatenregister.de/MaStRHilfe/files/webdienst/Objektmodell%20-%20Fachliche%20Ansicht%20V1.2.0.pdf). A translated version using the names from the tables you can find in your local database is presented here:
8688

open_mastr/mastr.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ class Mastr:
5454
A SQL database is used to mirror the MaStR database. It can be filled with
5555
data either from the MaStR-bulk download or from the MaStR-API.
5656
57+
!!! example
58+
59+
```python
60+
from open_mastr import Mastr
61+
62+
db = Mastr()
63+
db.download()
64+
```
65+
5766
Parameters
5867
----------
5968
engine : {'sqlite', sqlalchemy.engine.Engine}, optional
@@ -63,13 +72,8 @@ class Mastr:
6372
Allows connection to an existing translated database. Default is 'False'.
6473
Only for 'sqlite'-type engines.
6574
66-
!!! example
67-
```python
68-
from open_mastr import Mastr
6975
70-
db = Mastr()
71-
db.download()
72-
```
76+
7377
"""
7478

7579
def __init__(self, engine="sqlite", connect_to_translated_db=False) -> None:

open_mastr/soap_api/download.py

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,14 @@ def _missed_units_to_file(data, data_type, missed_units):
414414

415415

416416
class MaStRDownload:
417-
"""Use the higher level interface for bulk download
417+
"""
418+
!!! warning
419+
420+
**This class is deprecated** and will not be maintained from version 0.15.0 onwards.
421+
Instead use [`Mastr.download`][open_mastr.Mastr.download] with parameter
422+
`method` = "bulk" to get bulk downloads of the dataset.
423+
424+
Use the higher level interface for bulk download
418425
419426
`MaStRDownload` builds on top of [`MaStRAPI`][open_mastr.soap_api.download.MaStRAPI] and provides
420427
an interface for easier downloading.
@@ -451,6 +458,17 @@ def __init__(self, parallel_processes=None):
451458
multiprocessing package) choose False.
452459
Defaults to number of cores (including hyperthreading).
453460
"""
461+
log.warn(
462+
"""
463+
The `MaStRDownload` class is deprecated and will not be maintained in the future.
464+
To get a full table of the Marktstammdatenregister, use the open_mastr.Mastr.download
465+
method.
466+
467+
If this change causes problems for you, please comment in this issue on github:
468+
https://github.com/OpenEnergyPlatform/open-MaStR/issues/487
469+
470+
"""
471+
)
454472

455473
# Number of parallel processes
456474
if parallel_processes == "max":
@@ -762,26 +780,30 @@ def basic_unit_data(self, data=None, limit=2000, date_from=None, max_retries=3):
762780
log.info(
763781
f"Get list of units with basic information for data type {data} ({et})"
764782
)
765-
yield from basic_data_download(
766-
self._mastr_api,
767-
"GetListeAlleEinheiten",
768-
"Einheiten",
769-
chunks_start,
770-
limits,
771-
date_from,
772-
max_retries,
773-
data,
774-
et=et,
775-
) if et is None else basic_data_download(
776-
self._mastr_api,
777-
"GetGefilterteListeStromErzeuger",
778-
"Einheiten",
779-
chunks_start,
780-
limits,
781-
date_from,
782-
max_retries,
783-
data,
784-
et=et,
783+
yield from (
784+
basic_data_download(
785+
self._mastr_api,
786+
"GetListeAlleEinheiten",
787+
"Einheiten",
788+
chunks_start,
789+
limits,
790+
date_from,
791+
max_retries,
792+
data,
793+
et=et,
794+
)
795+
if et is None
796+
else basic_data_download(
797+
self._mastr_api,
798+
"GetGefilterteListeStromErzeuger",
799+
"Einheiten",
800+
chunks_start,
801+
limits,
802+
date_from,
803+
max_retries,
804+
data,
805+
et=et,
806+
)
785807
)
786808

787809
def additional_data(self, data, unit_ids, data_fcn, timeout=10):

0 commit comments

Comments
 (0)