GermanZero-de / localzero-generator-core

7 stars 3 forks source link

Dissolutions can have parts too. #364

Closed bgrundmann closed 1 year ago

bgrundmann commented 1 year ago

Turns out when a commune is dissolved its area can be given to more than one commune. I had noticed this before, but stupidly thought that I wouldn't need to model this the nice way. Trying to write good to makes actual use of the library quickly proved differently.

Ready to rock

Same caveats as before apply (ready to rock doesn't test anything for this library).

(.venv) benediktgrundmann@Benedikts-Air localzero-generator-core % python devtool.py ready_to_rock
WARNING: there is a new pyright version available (v1.1.301 -> v1.1.332).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`

No configuration file found.
pyproject.toml file found at /Users/benediktgrundmann/Programming/localzero/localzero-generator-core.
Loading pyproject.toml file at /Users/benediktgrundmann/Programming/localzero/localzero-generator-core/pyproject.toml
Assuming Python platform Darwin
Auto-excluding **/node_modules
Auto-excluding **/__pycache__
Auto-excluding **/.*
Searching for source files
Found 199 source files
pyright 1.1.301
0 errors, 0 warnings, 0 informations
Completed in 2.267sec
============================================================ test session starts ============================================================
platform darwin -- Python 3.10.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/benediktgrundmann/Programming/localzero/localzero-generator-core
plugins: anyio-3.6.2, cov-3.0.0
collected 39 items

tests/test_devtool_commands.py ..............                                                                                         [ 35%]
tests/test_end_to_end.py ...........                                                                                                  [ 64%]
tests/test_entries.py .                                                                                                               [ 66%]
tests/test_refdata.py ....                                                                                                            [ 76%]
tests/test_tracing.py .........                                                                                                       [100%]

============================================================ 39 passed in 5.42s =============================================================
Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
Check for case conflicts.................................................Passed
Check Yaml...............................................................Passed
Check for added large files..............................................Passed
Don't commit to branch...................................................Passed
black....................................................................Passed
You are ready to rock and save the climate at 385b77d21b0e3314ba2739c4b013de6b3f3e5520, but don't forget to copy paste the above into your pull request
bgrundmann commented 1 year ago

Just for clarity here is an example of what the new modelling means for show

(.venv) benediktgrundmann@Benedikts-Air ags-update % python main.py show 09172444
2019-01-01: 09172444 (Gdefr. Geb. (Lkr Berchtesgadener Land)) DISSOLVED (AREA JOINED 12597566 SQM 0 POP to 09172452 (Eck), 17010942 SQM 0 POP to 09172454 (Schellenberger Forst))