-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
11 add domain specific data types for ship situation etc using pydantic models #12
11 add domain specific data types for ship situation etc using pydantic models #12
Conversation
…um, as StrEnum was introduced only in py311, but we want to support >= py39
…es of reading sequence on GitHub runners.
…ges of reading sequence on GitHub runners.
Tweaked the test to avoid that this test randomly fails when run on GitHub.
I am currently comparing the output files from the tests between commit I see there are some small differences in the output files. |
… is either None or the default value.
… is either None or has not been actively set after instantiation.
by Claas, 2023-11-25 00:16 ship_traffic_generator.generate_traffic_situations() : Corrected an error I introduced with commit 185418a on 2023-11-25 00:16 lat_lon_0 of the new traffic_situation needs to be set to lat_lon_0 from the encounter settings. It was, though, set to lat_lon_0 from the desired traffic situation (which is usually None). I introduced the error when changing the code to use the new pdantic data types. Now corrected. Also added a related assertion to the tests to ensure the error does not get introduced again.
ship_traffic_generator.generate_traffic_situations() : Corrected an error I introduced with commit 185418a on 2023-11-25 00:16 |
Tweaked the test to avoid that this test randomly fails when run on GitHub.
Hi @tomarnepedersen , this PR contains quite a lot of code changes as I introduced pydantic data classes to serve as domain specific types. I also introduced type hints, resolving the 177 issues that pyright raised after activating the "reportMissingParameterType" rule in pyproject.toml. There is one spot in the code where I suspect there might be an error. At least the docstring does not match the return values. Best greetings |
… Removed example.json file which was included by mistake.
Done a few changes. Performing the merge. |
Added domain specific data types for Ship, Situation etc. using pydantic models.
Changed all code to use the new data types.
Added type hints.
Refactored tests to work with the new data types.
Added tests for reading files and writing files.