Skip to content
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

refactor(dependencies): Move MAUS dependencies to kohlrahbi #413

Merged
merged 22 commits into from
Sep 2, 2024

Conversation

hf-krechan
Copy link
Collaborator

@hf-krechan hf-krechan commented Aug 23, 2024

In the first step to get rid of the MAUS dependencies I copied all functions and classes from MAUS into kohlrahbi inclusive tests.

It replaces the attrs classes in kohlrahbi and maus with pydantic classes and removes all marshmallow schemas.

@hf-krechan hf-krechan changed the title Move MAUS dependencies to kohlrahbi refactor(dependencies): Move MAUS dependencies to kohlrahbi Aug 23, 2024
hf-krechan and others added 7 commits August 23, 2024 20:48
…rshmallow` (#414)

* first steps

* add pyproject.toml

* update requirements.txt

* refactor _check_that_string_is_not_whitespace_or_empty() function

* fix validation function

* import pydantic

* refactor AhbMetaInformation to Pydantic

* refactor DataElement

* Refactor DataElementFreeText

* Refactor class ValuePoolEntry

* remove wrong 'always' parameter

* refactor DataElementValuePool

* Refactor DataElementValuePool

* Refactor SegmentLevel

* remove attr import

* Refactor class Segment(SegmentLevel):

* refactor SegmentGroup

* Refactor EdifactStackLevel

* fix unit test

* fix another test

* refactor _FreeTextOrValuePool

* remove unused import attrs

* refactor EdifactStack

* fix

* remove schema

* Remove SegmentGroupSchema

* fix test_empty_entered_input_is_not_dumped

* 🚧 WIP

* WIP

* refactor: Remove Class `_FreeTextOrValuePool` (#416)

* remove class _FreeTextOrValuePool

* remove to upper

* remove entered_input validator

* remove extra validator for value_type

* remove entered_input or replace it with free_text

* remove expected_json_dict in test

* remove test test_empty_entered_input_is_not_dumped

* add value_type even it is default

* clean up serialization test

* more clean up in serialization_test_helper

* remove unused imports

* change line ending to LF

* remove functions which are releated to entered_input

* Add module docstring

* use pattern r'^\S+$' to validate non empty or whitespace string

* use min_length=1 to check non-empty strings

* use list as typehint instead of List

* replace validate_ahb_expression with pydantic on board options

* remove unused import List

* remove AhbLineSchema

* replace field validator for ahb_expression

* Revert "remove AhbLineSchema"

This reverts commit 804c5a4.

* fix marshmallow

* remove check check_string_is_not_whitespace_or_empty

* remove unused import

* remove another unused import

* remove further unnecessary validators

* remove unsued imports

* please mypy

* use str instead of Any

* remove unused import of Any

* refactor FlatAnwendungshandbuch

* put comments into description

* Refactor DeepAhbInputReplacement

* ➕ add pylint-pydantic and update requirements

* refactor DeepAnwendungshandbuch

* remove attrs imports

* add return type hint

* add test_ahb_from_maus tests

and replace the import paths

* easy fixes for new maus tests

* bring back the method replace_inputs_based_on_discriminator

* update serialization roundtrip test

* add test for replace_inputs_based_on_discriminator

* refactor _replace_inputs_based_on_discriminator

* fix mypy issues

* use lowercase for type hints

* use lowercase typehint for dict and list

* Remove marshmallow Schemas

* remove unused ignore statement

* 🎉 remove attrs and marshmallow

* fix typo

* remove hopefully last attrs class
@hf-krechan hf-krechan marked this pull request as ready for review September 2, 2024 15:13
Copy link
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.

lgtm

@hf-krechan hf-krechan merged commit b151264 into main Sep 2, 2024
8 checks passed
@hf-krechan hf-krechan deleted the move-maus-dependencies-to-kohlrahbi branch September 2, 2024 15:26
@hf-krechan hf-krechan linked an issue Sep 2, 2024 that may be closed by this pull request
8 tasks
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.

Move Dependencies From MAUS To Kohlrahbi
2 participants