Conversation
A function to extract all EBD keys from a document. At least the first results look promising.
hf-kklein
commented
Dec 13, 2022
lord-haffi
approved these changes
Dec 13, 2022
Contributor
lord-haffi
left a comment
There was a problem hiding this comment.
Nur eine kleine Anmerkung, ansonsten lgtm
|
|
||
|
|
||
| _ebd_key_pattern = re.compile(r"^[SE]_\d{4}$") | ||
| _ebd_key_pattern = re.compile(r"^E_\d{4}$") |
Contributor
There was a problem hiding this comment.
Gibt es einen Grund, warum vorher auch S möglich war und jetzt nicht mehr? ^^
Contributor
Author
There was a problem hiding this comment.
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.
| ) | ||
| 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 |
Contributor
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A function to extract all EBD keys from a document. At least the first results look promising.