Skip to content

✨ Introduce get_all_ebd_keys#4

Merged
hf-kklein merged 3 commits intomainfrom
extract_all_keys
Dec 13, 2022
Merged

✨ Introduce get_all_ebd_keys#4
hf-kklein merged 3 commits intomainfrom
extract_all_keys

Conversation

@hf-kklein
Copy link
Copy Markdown
Contributor

A function to extract all EBD keys from a document. At least the first results look promising.

A function to extract all EBD keys from a document.
At least the first results look promising.
Comment thread src/ebddocx2table/__init__.py Outdated
Copy link
Copy Markdown
Contributor

@lord-haffi lord-haffi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nur eine kleine Anmerkung, ansonsten lgtm



_ebd_key_pattern = re.compile(r"^[SE]_\d{4}$")
_ebd_key_pattern = re.compile(r"^E_\d{4}$")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gibt es einen Grund, warum vorher auch S möglich war und jetzt nicht mehr? ^^

Copy link
Copy Markdown
Contributor Author

@hf-kklein hf-kklein Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weil ich beim ersten Mal fälschlicherweise auch die codelisten gematched habe die mit S(trom) oder G(as) beginnen und im gleichen Dokument rumschwirren.
Nur E ist EBD.

Comment thread src/ebddocx2table/__init__.py Outdated
)
def test_get_ebd_keys(self, datafiles, filename: str, expected_length: int):
actual = get_all_ebd_keys(datafiles, filename)
assert len(actual) == expected_length # arbitrary, didn't check if these are really _all_ the keys
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hab das mal mit dem Inhaltsverzeichnis grob überschlagen und komme auf ~260 E's. Kommt also ungefähr hin.

Co-authored-by: Leon Haffmans <49658102+lord-haffi@users.noreply.github.com>
@hf-kklein hf-kklein merged commit 958054b into main Dec 13, 2022
@hf-kklein hf-kklein deleted the extract_all_keys branch December 13, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants