Some small fixes to be compatible with a database structure#28
Merged
hf-krechan merged 102 commits intomasterfrom Jan 22, 2021
Merged
Some small fixes to be compatible with a database structure#28hf-krechan merged 102 commits intomasterfrom
hf-krechan merged 102 commits intomasterfrom
Conversation
Collaborator
hf-krechan
commented
Jan 22, 2021
- add BoTyp.GESCHAEFTSOBJEKT
- rename gebietstyp to gebiettyp like in the BO4E documentation
- change type of versionstruktur from integer to string
📝 Add Links in README.rst to Open PR/Draft a Release
Before strasse and hausnummer were required attributes and postfach was optional. Since postfach should be an alternative address to strasse and hausnummer this was changed to either strasse and hausnummer or postfach are required attributes. Additionally the other required attributes are made sure to be strings and not empty.
Add two test: one for postfach as regular required field, the second for different combinations of strasse, hausnummer and postfach to test the validator in the Adresse class (adresse.py)
Co-authored-by: hf-krechan <68426071+hf-krechan@users.noreply.github.com>
Landescode has to be an Enum
…and_fix_typos ✏️ Add details to test_adresse and fix typos
…tfach_as_alternative_to_street
The minimal address in Germany is only a zip code and city (for example for institutions like universities or big companies or postfächer without a number but a special zip code) A street always needs a hausnummer and vice versa. Postfächer don't have a street, but a number OR a zipcode.
Added test for only postleitzahl and ort Added docstrings to serialization tests of strasse and postleitzahl Updated test for the function strasse_xor_postfach in Class Adresse (adresse.py) for the updates in the requirements of a german address
…to_street 🔨 Add postfach as alternative to strasse
Javascript uses CamelCase and python uses snake_case. Therefore you have to convert the keys during the de- and serialisation
I will miss you 😥
For marshmallow we have to create a Schema for each class we would like to de-/serialise.
Co-authored-by: hf-aschloegl <73470827+hf-aschloegl@users.noreply.github.com>
Co-authored-by: hf-kklein <konstantin.klein@hochfrequenz.de>
To be more consistent with the BDEW Anwendungshilfe https://bdew-codes.de/Content/Files/MaLo/2017-04-28-BDEW-Anwendungshilfe-MaLo-ID_Version1.0_FINAL.PDF
I will remove the E501 (ignore line length) in the next PR. I will update the format settings for black and flake9 in the next PR
Co-authored-by: hf-aschloegl <73470827+hf-aschloegl@users.noreply.github.com>
Remove s in gebietstyp to match the same naming like the BO4E documenation
Empty list makes the implementation into a database easier compared to None type.
The BoTyp can be used as a descriminator in databases. But the Geschaeftsobjekt itself has no BoTyp in the documentation. To realize a good table inheritance you have to define a table for each class and **each** class have to identified by a discriminator. Therefore we added the BoTyp.GESCHAEFTSOBJEKT to the BoTyp enumeration.
kontaktweg and geschaeftspartnerrolle changed to List type
Removed the s between tt
Got error in sphinx documentation:
invalid signature for autoattribute ('bo4e.enum.marktrolle::Marktrolle.KUNDE-SELBST-NN')
hf-krechan
commented
Jan 22, 2021
Collaborator
Author
hf-krechan
left a comment
There was a problem hiding this comment.
Added two notes to clearify the motivation of some changes
| @@ -5,28 +5,32 @@ | |||
| from enum import Enum | |||
|
|
|||
| _boTyp = { | |||
Collaborator
Author
There was a problem hiding this comment.
Have sorted all BoTypes alphabetically
| @@ -1,9 +1,9 @@ | |||
| """ | |||
| List of possible Gebietstypen. | |||
| List of possible Gebiettypen. | |||
Collaborator
Author
There was a problem hiding this comment.
Removed s in Gebietstypen, cause the documentation calls this enum just Gebiettyp
hf-aschloegl
approved these changes
Jan 22, 2021
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.