-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨Implement Packages #72
Conversation
This comment has been minimized.
This comment has been minimized.
use correct return type (not consistent yet)
linter green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Test schauen soweit ja gut aus, aber ich hatte doch ein paar Schwierigkeiten beim Nachvollziehen. Nachdem die Packages ja wieder ein größerer Baustein sind, könntest du die README und das Ablaufdiagramm anpassen, damit man die Idee dahinter nachvollziehen kann? Mir ist der gedachte Ablauf noch nicht hundertpro klar.
Besonders den einen Punkt den ich auch im Code angemerkt habe, wieso das eine Attribut sowohl die resolved packages, auch auch ihr evaluation result beinhalten sollte.
Vielleicht liegt das auch an der Idee des Shortcuts das Paket auszuwerten ohne es aufzulösen, aber das kannst du ja auch schon im Ablauf beschreiben ;)
Zweiter Punkt, war es Absicht nur die Pakete in der [INT P] Form zu behandeln? Weil oft ist ja auch noch die Wiederholung hinten dran a la [3P0..1].
Und können wir die Grammatik nicht direkt benutzen die Pakete als Pakete zu definieren und weiterzubenutzen, statt später nochmal mit regex oder ähnlichem wieder rauszusammeln?
@@ -101,6 +123,7 @@ def generate_possible_content_evaluation_results(self) -> List[ContentEvaluation | |||
if fc_kvp[0] != "fc_dummy" | |||
}, | |||
requirement_constraints={rc_kvp[0]: rc_kvp[1] for rc_kvp in fc_rc_tuple[1] if rc_kvp[0] != "rc_dummy"}, | |||
packages={}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ist das auch erstmal nur ein Dummy? Falls ja, kannst du dazu einen kurzen Kommentar schreiben?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kommentar ist da.
maps the key of a package (e.g. '123') to the respective expression (e.g. '[1] U ([2] O [3])' | ||
OR to a condition fulfilled value that applies to the entire package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das fühlt sich komisch an entweder die resolved expressionvom package da reinzuschreiben oder den condition fulfilled value.
Kannst du mir die beiden Fälle erklären, wann man welchen braucht und warum sie im selben Attribut sein sollen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ja, ich dachte s wäre praktisch. aber es ist in der tat schwieriger zu erklären, warum wir das wollen. und
if it's hard to explain...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
habe das ausgebaut.
| condition_key | ||
?brackets: "(" expression ")" | ||
package: "[" INT "P]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damit fängst du aber noch nicht die Pakete ab, bei denen die Wiederholungen mit angegeben werden, z.B. [3P0..1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
das war mir nicht klar, dass da noch mehr kommt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ich würde die wiederholbarkeiten #96 gerne nicht in diesem PR machen.
# as of now the packages are extracted separatly via their rule, not by analyzing the key | ||
# elif condition_node_type is ConditionNodeType.PACKAGE: | ||
# result.package_keys.append(condition_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kannst du auch noch den Grund nennen, wieso?
@@ -130,5 +151,5 @@ def test_possible_cer_generation_large_results(self, test_file_path, datafiles): | |||
categoried_keys = CategorizedKeyExtractSchema().load(file_content["categorizedKeyExtract"]) | |||
expected_result = ContentEvaluationResultSchema(many=True).load(file_content["expected_result"]) | |||
actual = categoried_keys.generate_possible_content_evaluation_results() | |||
json_string = ContentEvaluationResultSchema(many=True).dumps(actual) | |||
# json_string = ContentEvaluationResultSchema(many=True).dumps(actual) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warum wurde das auskommentiert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ich glaube nur, weil es nicht genutzt wurde.
@@ -90,19 +119,29 @@ def extract_categorized_keys_from_tree( | |||
result.hint_keys.append(condition_key) | |||
elif condition_node_type is ConditionNodeType.FORMAT_CONSTRAINT: | |||
result.format_constraint_keys.append(condition_key) | |||
elif condition_node_type is ConditionNodeType.PACKAGE: | |||
result.package_keys.append(condition_key) | |||
# As of now the packages are extracted separately via their rule, not by analyzing the key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
und an der stelle bricht sehr viel zusammen...
There has to be a better way of doing this. | ||
The rule name can either be "condition_key" or "package" | ||
""" | ||
# Prior to the introduction of packages we could simply loop over all the 'INT' terminals and be sure that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hard to explain, ugly workaround
obsoleted by #116 |
fixes #23
What it does
̶W̶h̶a̶t̶'̶s̶ ̶s̶t̶i̶l̶l̶ ̶m̶i̶s̶s̶i̶n̶g̶: