Skip to content

Commit 2fbb127

Browse files
authored
⚠ Rename: ebddocx2table is now ebdamame (#178)
1 parent 9e163b9 commit 2fbb127

11 files changed

Lines changed: 37 additions & 39 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ dmypy.json
133133
# vscode settings
134134
.vscode/
135135

136-
src/_ebddocx2table_version.py
136+
src/_ebdamame_version.py

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
# ebddocx2table
1+
# ebdamame
22

3-
> [!IMPORTANT]
4-
⚠ This is the last version using the name `ebddocx2table`. Both the repository and the Python package will be renamed to `ebdamame`.
3+
![Unittests status badge](https://github.com/Hochfrequenz/ebdamame/workflows/Unittests/badge.svg)
4+
![Coverage status badge](https://github.com/Hochfrequenz/ebdamame/workflows/Coverage/badge.svg)
5+
![Linting status badge](https://github.com/Hochfrequenz/ebdamame/workflows/Linting/badge.svg)
6+
![Black status badge](https://github.com/Hochfrequenz/ebdamame/workflows/Black/badge.svg)
7+
![PyPi Status Badge](https://img.shields.io/pypi/v/ebdamame)
58

6-
![Unittests status badge](https://github.com/Hochfrequenz/ebd_docx_to_table/workflows/Unittests/badge.svg)
7-
![Coverage status badge](https://github.com/Hochfrequenz/ebd_docx_to_table/workflows/Coverage/badge.svg)
8-
![Linting status badge](https://github.com/Hochfrequenz/ebd_docx_to_table/workflows/Linting/badge.svg)
9-
![Black status badge](https://github.com/Hochfrequenz/ebd_docx_to_table/workflows/Black/badge.svg)
10-
![PyPi Status Badge](https://img.shields.io/pypi/v/ebddocx2table)
11-
12-
🇩🇪 Dieses Repository enthält ein Python-Paket namens [`ebddocx2table`](https://pypi.org/project/ebddocx2table), das genutzt werden kann, um aus .docx-Dateien maschinenlesbare Tabellen, die einen Entscheidungsbaum (EBD) modellieren, zu extrahieren (scrapen).
9+
🇩🇪 Dieses Repository enthält ein Python-Paket namens [`ebdamame`](https://pypi.org/project/ebdamame) (früher: `ebddocx2table`), das genutzt werden kann, um aus .docx-Dateien maschinenlesbare Tabellen, die einen Entscheidungsbaum (EBD) modellieren, zu extrahieren (scrapen).
1310
Diese Entscheidungsbäume sind Teil eines regulatorischen Regelwerks für die deutsche Energiewirtschaft und kommen in der Eingangsprüfung der Marktkommunikation zum Einsatz.
1411
Die mit diesem Paket erstellten maschinenlesbaren Tabellen können mit [`ebdtable2graph`](https://pypi.org/project/ebdtable2graph) in echte Graphen und Diagramme umgewandelt werden.
1512
Exemplarische Ergebnisse des Scrapings finden sich als .json-Dateien im Repository [`machine-readable_entscheidungsbaumdiagramme`](https://github.com/Hochfrequenz/machine-readable_entscheidungsbaumdiagramme/).
1613

17-
🇬🇧 This repository contains the source code of the Python package [`ebddocx2table`](https://pypi.org/project/ebddocx2table).
14+
🇬🇧 This repository contains the source code of the Python package [`ebdamame`](https://pypi.org/project/ebdamame) (formerly published as `ebddocx2table`).
1815

1916
## Rationale
2017

21-
Assume, that you want to analyse or visualize the Entscheidungsbaumdiagramme (EBD) by EDI@Energy.
18+
Assume that you want to analyse or visualize the Entscheidungsbaumdiagramme (EBD) by EDI@Energy.
2219
The website edi-energy.de, as always, only provides you with PDF or Word files instead of _really_ digitized data.
2320

24-
The package `ebddocx2table` scrapes the `.docx` files and returns data in a model defined in the "sister" package [`ebdtable2graph`](https://pypi.org/project/ebdtable2graph).
21+
The package `ebdamame` scrapes the `.docx` files and returns data in a model defined in the "sister" package [`ebdtable2graph`](https://pypi.org/project/ebdtable2graph).
2522

2623
Once you scraped the data (using this package) you can plot it with [`ebdtable2graph`](https://pypi.org/project/ebdtable2graph).
2724

@@ -30,7 +27,7 @@ Once you scraped the data (using this package) you can plot it with [`ebdtable2g
3027
In any case, install the repo from PyPI:
3128

3229
```bash
33-
pip install ebddocx2table
30+
pip install ebdamame
3431
```
3532

3633
### Use as a library
@@ -41,8 +38,8 @@ from pathlib import Path
4138

4239
import cattrs
4340

44-
from ebddocx2table import TableNotFoundError, get_all_ebd_keys, get_ebd_docx_tables # type:ignore[import]
45-
from ebddocx2table.docxtableconverter import DocxTableConverter # type:ignore[import]
41+
from ebdamame import TableNotFoundError, get_all_ebd_keys, get_ebd_docx_tables # type:ignore[import]
42+
from ebdamame.docxtableconverter import DocxTableConverter # type:ignore[import]
4643

4744
docx_file_path = Path("unittests/test_data/ebd20230629_v34.docx")
4845
# download this .docx File from edi-energy.de or find it in the unittests of this repository.

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
from ebdtable2graph.plantuml import GraphTooComplexForPlantumlError
3030

3131
# pylint:disable=import-error
32-
from ebddocx2table import TableNotFoundError, get_all_ebd_keys, get_ebd_docx_tables # type:ignore[import]
33-
from ebddocx2table.docxtableconverter import DocxTableConverter # type:ignore[import]
32+
from ebdamame import TableNotFoundError, get_all_ebd_keys, get_ebd_docx_tables # type:ignore[import]
33+
from ebdamame.docxtableconverter import DocxTableConverter # type:ignore[import]
3434

3535

3636
def _dump_puml(puml_path: Path, ebd_graph: EbdGraph) -> None:

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "ebddocx2table"
2+
name = "ebdamame"
33
description = "A scraper to library to scrape .docx files with 'Entscheidungsbaumdiagramm' tables into a truely machine readable structure"
44
license = { text = "GPL" }
55
requires-python = ">=3.11"
@@ -27,8 +27,8 @@ dependencies = [
2727
dynamic = ["readme", "version"]
2828

2929
[project.urls]
30-
Changelog = "https://github.com/Hochfrequenz/ebddocx2table/releases"
31-
Homepage = "https://github.com/Hochfrequenz/ebddocx2table"
30+
Changelog = "https://github.com/Hochfrequenz/ebdamame/releases"
31+
Homepage = "https://github.com/Hochfrequenz/ebdamame"
3232

3333
[tool.black]
3434
line-length = 120

src/_ebddocx2table_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "0.1.dev59+gc9c489e.d20230707"

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ deps =
2626
# add your fixtures like e.g. pytest_datafiles here
2727
setenv = PYTHONPATH = {toxinidir}/src
2828
commands =
29-
pylint ebddocx2table
29+
pylint ebdamame
3030
pylint main.py
3131
# add single files (ending with .py) or packages here
3232

@@ -37,7 +37,7 @@ deps =
3737
-r requirements.txt
3838
-r dev_requirements/requirements-type_check.txt
3939
commands =
40-
mypy --show-error-codes src/ebddocx2table
40+
mypy --show-error-codes src/ebdamame
4141
mypy --show-error-codes unittests
4242
mypy --show-error-codes main.py
4343
# add single files (ending with .py) or packages here

unittests/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@
99
from docx import Document # type:ignore[import]
1010
from docx.table import Table # type:ignore[import]
1111

12-
import ebddocx2table
12+
import ebdamame
1313

1414

1515
def get_document(datafiles, filename: str) -> Document:
1616
"""
1717
a datafiles compatible wrapper around ebddocx2table.get_document
1818
"""
1919
path = datafiles / Path(filename)
20-
return ebddocx2table.get_document(path)
20+
return ebdamame.get_document(path)
2121

2222

2323
def get_ebd_docx_tables(datafiles, filename: str, ebd_key: str) -> List[Table]:
2424
"""
2525
a datafiles compatible wrapper around ebddocx2table.get_ebd_docx_tables
2626
"""
2727
path = datafiles / Path(filename)
28-
return ebddocx2table.get_ebd_docx_tables(path, ebd_key=ebd_key)
28+
return ebdamame.get_ebd_docx_tables(path, ebd_key=ebd_key)
2929

3030

31-
def get_all_ebd_keys(datafiles, filename: str) -> Dict[str, Tuple[str, ebddocx2table.EbdChapterInformation]]:
31+
def get_all_ebd_keys(datafiles, filename: str) -> Dict[str, Tuple[str, ebdamame.EbdChapterInformation]]:
3232
"""
3333
a datafiles compatible wrapper around ebddocx2table.get_all_ebd_keys
3434
"""
3535
path = datafiles / Path(filename)
36-
return ebddocx2table.get_all_ebd_keys(path)
36+
return ebdamame.get_all_ebd_keys(path)

0 commit comments

Comments
 (0)