From 2bd92555d452fd521683b04fd796922f13fde1c4 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Thu, 29 Dec 2022 19:12:07 +0100
Subject: [PATCH 01/40] separate not very similar annotations
---
.../processing/migration/__init__.py | 2 +-
.../processing/migration/_migrate.py | 190 +++++++++++-------
.../processing/migration/test_migration.py | 4 +-
3 files changed, 116 insertions(+), 80 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/__init__.py b/package-parser/package_parser/processing/migration/__init__.py
index 07d73bd30..c75601aa9 100644
--- a/package-parser/package_parser/processing/migration/__init__.py
+++ b/package-parser/package_parser/processing/migration/__init__.py
@@ -9,4 +9,4 @@
SimpleDiffer,
)
-from ._migrate import migrate_annotations
+from ._migrate import Migration
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index a367a85b4..e3fe7660e 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -3,6 +3,7 @@
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
+ EnumReviewResult,
)
from package_parser.processing.api.model import Attribute, Result
from package_parser.processing.migration.annotations import (
@@ -19,80 +20,115 @@
from package_parser.processing.migration.model import Mapping
-def _get_mapping_from_annotation(
- annotation: AbstractAnnotation, mappings: list[Mapping]
-) -> Optional[Mapping]:
- for mapping in mappings:
- for element in mapping.get_apiv1_elements():
- if (
- not isinstance(element, (Attribute, Result))
- and element.id == annotation.target
- ):
- return mapping
- return None
-
-
-def migrate_annotations(
- annotationsv1: AnnotationStore, mappings: list[Mapping]
-) -> AnnotationStore:
- migrated_annotation_store = AnnotationStore()
-
- for boundary_annotation in annotationsv1.boundaryAnnotations:
- mapping = _get_mapping_from_annotation(boundary_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_boundary_annotation(boundary_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for called_after_annotation in annotationsv1.calledAfterAnnotations:
- mapping = _get_mapping_from_annotation(called_after_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_called_after_annotation(
- called_after_annotation, mapping, mappings
- ):
- migrated_annotation_store.add_annotation(annotation)
-
- for enum_annotation in annotationsv1.enumAnnotations:
- mapping = _get_mapping_from_annotation(enum_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_enum_annotation(enum_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for group_annotation in annotationsv1.groupAnnotations:
- mapping = _get_mapping_from_annotation(group_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_group_annotation(
- group_annotation, mapping, mappings
- ):
- migrated_annotation_store.add_annotation(annotation)
-
- for move_annotation in annotationsv1.moveAnnotations:
- mapping = _get_mapping_from_annotation(move_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_move_annotation(move_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for rename_annotation in annotationsv1.renameAnnotations:
- mapping = _get_mapping_from_annotation(rename_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_rename_annotation(rename_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for remove_annotation in annotationsv1.removeAnnotations:
- mapping = _get_mapping_from_annotation(remove_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_remove_annotation(remove_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for todo_annotation in annotationsv1.todoAnnotations:
- mapping = _get_mapping_from_annotation(todo_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_todo_annotation(todo_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- for value_annotation in annotationsv1.valueAnnotations:
- mapping = _get_mapping_from_annotation(value_annotation, mappings)
- if mapping is not None:
- for annotation in migrate_value_annotation(value_annotation, mapping):
- migrated_annotation_store.add_annotation(annotation)
-
- return migrated_annotation_store
+class Migration:
+ reliable_similarity: float
+ unsure_similarity: float
+ migrated_annotation_store: AnnotationStore = AnnotationStore()
+ unsure_annotation_store: AnnotationStore = AnnotationStore()
+
+ def __init__(self, reliable_similarity=0.9, unsure_similarity=0.5):
+ self.reliable_similarity = reliable_similarity
+ self.unsure_similarity = unsure_similarity
+
+ @staticmethod
+ def _get_mapping_from_annotation(
+ annotation: AbstractAnnotation, mappings: list[Mapping]
+ ) -> Optional[Mapping]:
+ for mapping in mappings:
+ for element in mapping.get_apiv1_elements():
+ if (
+ not isinstance(element, (Attribute, Result))
+ and element.id == annotation.target
+ ):
+ return mapping
+ return None
+
+ def migrate_annotations(
+ self, annotationsv1: AnnotationStore, mappings: list[Mapping]
+ ) -> AnnotationStore:
+ for boundary_annotation in annotationsv1.boundaryAnnotations:
+ mapping = self._get_mapping_from_annotation(boundary_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_boundary_annotation(boundary_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for called_after_annotation in annotationsv1.calledAfterAnnotations:
+ mapping = self._get_mapping_from_annotation(called_after_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_called_after_annotation(
+ called_after_annotation, mapping, mappings
+ ):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for description_annotation in annotationsv1.descriptionAnnotations:
+ mapping = self._get_mapping_from_annotation(description_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_description_annotation(
+ description_annotation, mapping
+ ):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for enum_annotation in annotationsv1.enumAnnotations:
+ mapping = self._get_mapping_from_annotation(enum_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_enum_annotation(enum_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for expert_annotation in annotationsv1.expertAnnotations:
+ mapping = self._get_mapping_from_annotation(expert_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_expert_annotation(expert_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for group_annotation in annotationsv1.groupAnnotations:
+ mapping = self._get_mapping_from_annotation(group_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_group_annotation(
+ group_annotation, mapping, mappings
+ ):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for move_annotation in annotationsv1.moveAnnotations:
+ mapping = self._get_mapping_from_annotation(move_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_move_annotation(move_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for rename_annotation in annotationsv1.renameAnnotations:
+ mapping = self._get_mapping_from_annotation(rename_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_rename_annotation(rename_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for remove_annotation in annotationsv1.removeAnnotations:
+ mapping = self._get_mapping_from_annotation(remove_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_remove_annotation(remove_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for todo_annotation in annotationsv1.todoAnnotations:
+ mapping = self._get_mapping_from_annotation(todo_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_todo_annotation(todo_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ for value_annotation in annotationsv1.valueAnnotations:
+ mapping = self._get_mapping_from_annotation(value_annotation, mappings)
+ if mapping is not None:
+ for annotation in migrate_value_annotation(value_annotation, mapping):
+ self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+
+ return self.migrated_annotation_store
+
+ def add_annotations_based_on_similarity(
+ self,
+ annotation: AbstractAnnotation,
+ similarity: float
+ ) -> None:
+ if similarity >= self.reliable_similarity:
+ self.migrated_annotation_store.add_annotation(annotation)
+ elif similarity >= self.unsure_similarity:
+ annotation.reviewResult = EnumReviewResult.UNSURE
+ self.migrated_annotation_store.add_annotation(annotation)
+ else:
+ self.unsure_annotation_store.add_annotation(annotation)
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 839d58cea..13d6a56c6 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -2,7 +2,7 @@
AbstractAnnotation,
AnnotationStore,
)
-from package_parser.processing.migration import migrate_annotations
+from package_parser.processing.migration import Migration
from package_parser.processing.migration.model import Mapping
from tests.processing.migration.annotations.test_boundary_migration import (
migrate_boundary_annotation_data_one_to_many_mapping,
@@ -118,7 +118,7 @@ def test_migrate_all_annotations() -> None:
for expected_annotation in annotationsv2:
expected_annotation_store.add_annotation(expected_annotation)
- actual_annotations = migrate_annotations(annotation_store, mappings)
+ actual_annotations = Migration().migrate_annotations(annotation_store, mappings)
def get_key(annotation: AbstractAnnotation) -> str:
return annotation.target
From faa364e5acc29882e47aa2b45ad7f49dfdd1b71c Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Thu, 29 Dec 2022 19:26:01 +0100
Subject: [PATCH 02/40] error fixing
---
package-parser/package_parser/cli/_run_migrate.py | 4 ++--
.../processing/migration/_migrate.py | 2 +-
.../processing/migration/model/_differ.py | 15 +++++++++------
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/package-parser/package_parser/cli/_run_migrate.py b/package-parser/package_parser/cli/_run_migrate.py
index 1d7027af2..2aa936080 100644
--- a/package-parser/package_parser/cli/_run_migrate.py
+++ b/package-parser/package_parser/cli/_run_migrate.py
@@ -1,6 +1,6 @@
from pathlib import Path
-from package_parser.processing.migration import migrate_annotations
+from package_parser.processing.migration import Migration
from package_parser.processing.migration.model import APIMapping, SimpleDiffer
from ._read_and_write_file import (
@@ -22,5 +22,5 @@ def _run_migrate_command(
differ = SimpleDiffer()
api_mapping = APIMapping(apiv1, apiv2, differ)
mappings = api_mapping.map_api()
- annotationsv2 = migrate_annotations(annotationsv1, mappings)
+ annotationsv2 = Migration().migrate_annotations(annotationsv1, mappings)
_write_annotations_file(annotationsv2, out_dir_path)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index d419f71d9..3bd352cd1 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -28,7 +28,7 @@ class Migration:
migrated_annotation_store: AnnotationStore = AnnotationStore()
unsure_annotation_store: AnnotationStore = AnnotationStore()
- def __init__(self, reliable_similarity=0.9, unsure_similarity=0.5):
+ def __init__(self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5) -> None:
self.reliable_similarity = reliable_similarity
self.unsure_similarity = unsure_similarity
diff --git a/package-parser/package_parser/processing/migration/model/_differ.py b/package-parser/package_parser/processing/migration/model/_differ.py
index 16888e8c4..f3c692c14 100644
--- a/package-parser/package_parser/processing/migration/model/_differ.py
+++ b/package-parser/package_parser/processing/migration/model/_differ.py
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
-from typing import Any, Optional
+from typing import Callable, Optional, TypeVar
from package_parser.processing.api.model import (
AbstractType,
@@ -43,8 +43,11 @@ def compute_result_similarity(self, result_a: Result, result_b: Result) -> float
pass
+X = TypeVar("X")
+
+
def distance_elements(
- list_a: list[Any], list_b: list[Any], are_similar=lambda x, y: x == y
+ list_a: list[X], list_b: list[X], are_similar: Callable[[X, X], bool] = lambda x, y: x == y
) -> float:
if len(list_a) == 0:
return len(list_b)
@@ -64,7 +67,7 @@ class SimpleDiffer(AbstractDiffer):
ParameterAssignment, dict[ParameterAssignment, float]
]
- def __init__(self):
+ def __init__(self) -> None:
distance_between_implicit_and_explicit = 0.3
distance_between_vararg_and_normal = 0.3
distance_between_position_and_named = 0.3
@@ -208,7 +211,7 @@ def compute_function_similarity(
function_a.name, function_b.name
)
- def are_parameters_similar(parameter_a: Parameter, parameter_b: Parameter):
+ def are_parameters_similar(parameter_a: Parameter, parameter_b: Parameter) -> float:
return self.compute_parameter_similarity(parameter_a, parameter_b) == 1
parameter_similarity = distance_elements(
@@ -258,7 +261,7 @@ def _compute_type_similarity(
def are_types_similar(
abstract_type_a: AbstractType, abstract_type_b: AbstractType
- ):
+ ) -> bool:
return abstract_type_a.to_json() == abstract_type_b.to_json()
type_list_a = self._create_list_from_type(type_a)
@@ -268,7 +271,7 @@ def are_types_similar(
) / max(len(type_list_a), len(type_list_b), 1)
return 1 - diff_elements
- def _create_list_from_type(self, abstract_type: AbstractType):
+ def _create_list_from_type(self, abstract_type: AbstractType) -> list[AbstractType]:
if isinstance(abstract_type, UnionType):
return abstract_type.types
return [abstract_type]
From bb22a9d9d88c4905fb4e37e613514cc83d088664 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Fri, 30 Dec 2022 15:03:39 +0100
Subject: [PATCH 03/40] create todo annotations only with none as review result
---
.../_migrate_boundary_annotation.py | 2 +-
.../_migrate_called_after_annotation.py | 2 +-
.../annotations/_migrate_enum_annotation.py | 2 +-
.../annotations/_migrate_group_annotation.py | 4 ++--
.../annotations/_migrate_move_annotation.py | 2 +-
.../annotations/_migrate_todo_annotation.py | 2 +-
.../annotations/_migrate_value_annotation.py | 2 +-
.../annotations/test_enum_migration.py | 2 +-
.../annotations/test_move_migration.py | 2 +-
.../annotations/test_todo_migration.py | 2 +-
.../annotations/test_value_migration.py | 24 +++++++++----------
11 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index a932d7cc5..5062c4ed4 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -187,7 +187,7 @@ def migrate_boundary_annotation(
authors,
boundary_annotation.reviewers,
boundary_annotation.comment,
- EnumReviewResult.UNSURE,
+ EnumReviewResult.NONE,
migrate_text,
)
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
index 785f33bbd..6d67ccb98 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
@@ -33,7 +33,7 @@ def migrate_called_after_annotation(
authors,
called_after_annotation.reviewers,
called_after_annotation.comment,
- called_after_annotation.reviewResult,
+ EnumReviewResult.NONE,
get_migration_text(called_after_annotation, mapping),
)
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 0a64be753..560b01d47 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -126,7 +126,7 @@ def migrate_enum_annotation(
authors,
enum_annotation.reviewers,
enum_annotation.comment,
- EnumReviewResult.UNSURE,
+ EnumReviewResult.NONE,
migrate_text,
)
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
index 70dc3cac1..520a9ff46 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
@@ -33,7 +33,7 @@ def migrate_group_annotation(
authors=authors,
reviewers=group_annotation.reviewers,
comment=group_annotation.comment,
- reviewResult=group_annotation.reviewResult,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(group_annotation, mapping),
)
)
@@ -72,7 +72,7 @@ def migrate_group_annotation(
authors=authors,
reviewers=group_annotation.reviewers,
comment=group_annotation.comment,
- reviewResult=group_annotation.reviewResult,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(
group_annotation,
mapping,
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
index d5f264e6a..9543ba3c4 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
@@ -92,7 +92,7 @@ def migrate_move_annotation(
authors,
move_annotation.reviewers,
move_annotation.comment,
- EnumReviewResult.UNSURE,
+ EnumReviewResult.NONE,
migrate_text,
)
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
index dc27d1b28..8eb64c0d1 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
@@ -63,7 +63,7 @@ def migrate_todo_annotation(
authors,
todo_annotation.reviewers,
todo_annotation.comment,
- EnumReviewResult.UNSURE,
+ EnumReviewResult.NONE,
migrate_text,
)
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index 5fa917d50..0cc0acec9 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -120,7 +120,7 @@ def migrate_value_annotation(
authors,
value_annotation.reviewers,
value_annotation.comment,
- EnumReviewResult.UNSURE,
+ EnumReviewResult.NONE,
get_migration_text(value_annotation, mapping),
)
)
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index fa24b7822..3dc04d5e7 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -201,7 +201,7 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
target="test/test.enum.test3.TestA",
authors=["testauthor", migration_author],
reviewers=[],
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
comment="",
newTodo=get_migration_text(enum_annotation, mapping),
)
diff --git a/package-parser/tests/processing/migration/annotations/test_move_migration.py b/package-parser/tests/processing/migration/annotations/test_move_migration.py
index ed0860178..1430eb161 100644
--- a/package-parser/tests/processing/migration/annotations/test_move_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_move_migration.py
@@ -189,7 +189,7 @@ def migrate_move_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", migration_author],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotationv1, mapping),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b]
diff --git a/package-parser/tests/processing/migration/annotations/test_todo_migration.py b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
index 871d34bcf..0b08bbf36 100644
--- a/package-parser/tests/processing/migration/annotations/test_todo_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
@@ -208,7 +208,7 @@ def migrate_todo_annotation_data_many_to_many_mapping() -> Tuple[
authors=["testauthor", migration_author],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotationv1, mappings),
)
return (
diff --git a/package-parser/tests/processing/migration/annotations/test_value_migration.py b/package-parser/tests/processing/migration/annotations/test_value_migration.py
index 6c1b32912..e240abd13 100644
--- a/package-parser/tests/processing/migration/annotations/test_value_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_value_migration.py
@@ -269,7 +269,7 @@ def migrate_constant_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_b = ConstantAnnotation(
@@ -286,7 +286,7 @@ def migrate_constant_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", migration_author],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_d = ConstantAnnotation(
@@ -377,7 +377,7 @@ def migrate_optional_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
newTodo=get_migration_text(annotation, mapping),
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
)
annotationv2_b = OptionalAnnotation(
target="test/test.value.test6.testB",
@@ -393,7 +393,7 @@ def migrate_optional_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", migration_author],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_d = OptionalAnnotation(
@@ -508,7 +508,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_b = RequiredAnnotation(
@@ -523,7 +523,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
@@ -532,7 +532,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_e = TodoAnnotation(
@@ -540,7 +540,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
@@ -652,7 +652,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_c = TodoAnnotation(
@@ -660,7 +660,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
@@ -669,7 +669,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
annotationv2_e = TodoAnnotation(
@@ -677,7 +677,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", "migration"],
reviewers=[],
comment="",
- reviewResult=EnumReviewResult.UNSURE,
+ reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
From 0013d84fd36044225bd99d065bd3a524ea595325 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Fri, 30 Dec 2022 15:03:49 +0100
Subject: [PATCH 04/40] fix linter errors
---
package-parser/package_parser/processing/api/model/_types.py | 2 +-
.../package_parser/processing/migration/model/_differ.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-parser/package_parser/processing/api/model/_types.py b/package-parser/package_parser/processing/api/model/_types.py
index a6321a7be..d898d9e44 100644
--- a/package-parser/package_parser/processing/api/model/_types.py
+++ b/package-parser/package_parser/processing/api/model/_types.py
@@ -10,7 +10,7 @@
class AbstractType(metaclass=ABCMeta):
@abstractmethod
- def to_json(self):
+ def to_json(self) -> Any:
pass
@classmethod
diff --git a/package-parser/package_parser/processing/migration/model/_differ.py b/package-parser/package_parser/processing/migration/model/_differ.py
index f3c692c14..1c8405c75 100644
--- a/package-parser/package_parser/processing/migration/model/_differ.py
+++ b/package-parser/package_parser/processing/migration/model/_differ.py
@@ -211,7 +211,7 @@ def compute_function_similarity(
function_a.name, function_b.name
)
- def are_parameters_similar(parameter_a: Parameter, parameter_b: Parameter) -> float:
+ def are_parameters_similar(parameter_a: Parameter, parameter_b: Parameter) -> bool:
return self.compute_parameter_similarity(parameter_a, parameter_b) == 1
parameter_similarity = distance_elements(
From d295fb21b1d3b90e8ff8781930c9a052e04920da Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Fri, 30 Dec 2022 15:10:07 +0100
Subject: [PATCH 05/40] fix linter errors
in other files
---
.../package_parser/processing/api/model/_types.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-parser/package_parser/processing/api/model/_types.py b/package-parser/package_parser/processing/api/model/_types.py
index d898d9e44..eac13c5e9 100644
--- a/package-parser/package_parser/processing/api/model/_types.py
+++ b/package-parser/package_parser/processing/api/model/_types.py
@@ -45,7 +45,7 @@ def from_string(cls, string: str) -> NamedType:
def to_json(self) -> dict[str, str]:
return {"kind": self.__class__.__name__, "name": self.name}
- def __eq__(self, other):
+ def __eq__(self, other: Any) -> bool:
if isinstance(other, self.__class__):
return self.name == other.name
return False
@@ -64,7 +64,7 @@ def from_json(cls, json: Any) -> Optional[EnumType]:
@classmethod
def from_string(cls, string: str) -> Optional[EnumType]:
- def remove_backslash(e: str):
+ def remove_backslash(e: str) -> str:
e = e.replace(r"\"", '"')
e = e.replace(r"\'", "'")
return e
@@ -97,7 +97,7 @@ def remove_backslash(e: str):
return None
- def update(self, enum: EnumType):
+ def update(self, enum: EnumType) -> None:
self.values.update(enum.values)
def to_json(self) -> dict[str, Any]:
From fcdbd3bfef69008d1dbfce81c4734dbaf890962f Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Fri, 30 Dec 2022 15:17:52 +0000
Subject: [PATCH 06/40] style: apply automated linter fixes
---
.../processing/migration/_migrate.py | 64 +++++++++++++------
.../processing/migration/model/_differ.py | 8 ++-
2 files changed, 52 insertions(+), 20 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 3bd352cd1..8ab886ee8 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -28,7 +28,9 @@ class Migration:
migrated_annotation_store: AnnotationStore = AnnotationStore()
unsure_annotation_store: AnnotationStore = AnnotationStore()
- def __init__(self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5) -> None:
+ def __init__(
+ self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5
+ ) -> None:
self.reliable_similarity = reliable_similarity
self.unsure_similarity = unsure_similarity
@@ -51,36 +53,52 @@ def migrate_annotations(
for boundary_annotation in annotationsv1.boundaryAnnotations:
mapping = self._get_mapping_from_annotation(boundary_annotation, mappings)
if mapping is not None:
- for annotation in migrate_boundary_annotation(boundary_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ for annotation in migrate_boundary_annotation(
+ boundary_annotation, mapping
+ ):
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for called_after_annotation in annotationsv1.calledAfterAnnotations:
- mapping = self._get_mapping_from_annotation(called_after_annotation, mappings)
+ mapping = self._get_mapping_from_annotation(
+ called_after_annotation, mappings
+ )
if mapping is not None:
for annotation in migrate_called_after_annotation(
called_after_annotation, mapping, mappings
):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for description_annotation in annotationsv1.descriptionAnnotations:
- mapping = self._get_mapping_from_annotation(description_annotation, mappings)
+ mapping = self._get_mapping_from_annotation(
+ description_annotation, mappings
+ )
if mapping is not None:
for annotation in migrate_description_annotation(
description_annotation, mapping
):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for enum_annotation in annotationsv1.enumAnnotations:
mapping = self._get_mapping_from_annotation(enum_annotation, mappings)
if mapping is not None:
for annotation in migrate_enum_annotation(enum_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for expert_annotation in annotationsv1.expertAnnotations:
mapping = self._get_mapping_from_annotation(expert_annotation, mappings)
if mapping is not None:
for annotation in migrate_expert_annotation(expert_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for group_annotation in annotationsv1.groupAnnotations:
mapping = self._get_mapping_from_annotation(group_annotation, mappings)
@@ -88,44 +106,54 @@ def migrate_annotations(
for annotation in migrate_group_annotation(
group_annotation, mapping, mappings
):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for move_annotation in annotationsv1.moveAnnotations:
mapping = self._get_mapping_from_annotation(move_annotation, mappings)
if mapping is not None:
for annotation in migrate_move_annotation(move_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for rename_annotation in annotationsv1.renameAnnotations:
mapping = self._get_mapping_from_annotation(rename_annotation, mappings)
if mapping is not None:
for annotation in migrate_rename_annotation(rename_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for remove_annotation in annotationsv1.removeAnnotations:
mapping = self._get_mapping_from_annotation(remove_annotation, mappings)
if mapping is not None:
for annotation in migrate_remove_annotation(remove_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for todo_annotation in annotationsv1.todoAnnotations:
mapping = self._get_mapping_from_annotation(todo_annotation, mappings)
if mapping is not None:
for annotation in migrate_todo_annotation(todo_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
for value_annotation in annotationsv1.valueAnnotations:
mapping = self._get_mapping_from_annotation(value_annotation, mappings)
if mapping is not None:
for annotation in migrate_value_annotation(value_annotation, mapping):
- self.add_annotations_based_on_similarity(annotation, mapping.get_similarity())
+ self.add_annotations_based_on_similarity(
+ annotation, mapping.get_similarity()
+ )
return self.migrated_annotation_store
def add_annotations_based_on_similarity(
- self,
- annotation: AbstractAnnotation,
- similarity: float
+ self, annotation: AbstractAnnotation, similarity: float
) -> None:
if similarity >= self.reliable_similarity:
self.migrated_annotation_store.add_annotation(annotation)
diff --git a/package-parser/package_parser/processing/migration/model/_differ.py b/package-parser/package_parser/processing/migration/model/_differ.py
index 1c8405c75..920d309a7 100644
--- a/package-parser/package_parser/processing/migration/model/_differ.py
+++ b/package-parser/package_parser/processing/migration/model/_differ.py
@@ -47,7 +47,9 @@ def compute_result_similarity(self, result_a: Result, result_b: Result) -> float
def distance_elements(
- list_a: list[X], list_b: list[X], are_similar: Callable[[X, X], bool] = lambda x, y: x == y
+ list_a: list[X],
+ list_b: list[X],
+ are_similar: Callable[[X, X], bool] = lambda x, y: x == y,
) -> float:
if len(list_a) == 0:
return len(list_b)
@@ -211,7 +213,9 @@ def compute_function_similarity(
function_a.name, function_b.name
)
- def are_parameters_similar(parameter_a: Parameter, parameter_b: Parameter) -> bool:
+ def are_parameters_similar(
+ parameter_a: Parameter, parameter_b: Parameter
+ ) -> bool:
return self.compute_parameter_similarity(parameter_a, parameter_b) == 1
parameter_similarity = distance_elements(
From 02507ac25f49300f590bee50f311b982e0b46e8e Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Fri, 30 Dec 2022 19:45:31 +0100
Subject: [PATCH 07/40] improve `@value` annotation migration
---
.../annotations/_migrate_value_annotation.py | 306 +++++++++---------
1 file changed, 146 insertions(+), 160 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index 0cc0acec9..7a74540d9 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -1,5 +1,5 @@
from copy import deepcopy
-from typing import Optional, Tuple
+from typing import Optional
from package_parser.processing.annotations.model import (
AbstractAnnotation,
@@ -128,135 +128,121 @@ def migrate_value_annotation(
def _have_same_type(
- default_value_typev1: ValueAnnotation.DefaultValueType,
- parameterv1: Parameter,
+ typev1: AbstractType,
typev2: AbstractType,
) -> bool:
+ if typev2 is None and typev1 is None:
+ return True
+ if typev2 is None or typev1 is None:
+ return False
if isinstance(typev2, NamedType):
- if default_value_typev1 is ValueAnnotation.DefaultValueType.NUMBER:
- if parameterv1 is not None:
- if typev2.name in ("int", "integer") or typev2.name.startswith("int "):
- if parameterv1.type is None:
- return False
- types = [parameterv1.type]
- if isinstance(parameterv1.type, UnionType):
- types = parameterv1.type.types
- for element in types:
- if isinstance(element, NamedType) and (
- element.name in ("int", "integer")
- or element.name.startswith("int ")
- ):
- return True
- elif typev2.name == "float" or typev2.name.startswith("float "):
- if parameterv1.type is None:
- return False
- types = [parameterv1.type]
- if isinstance(parameterv1.type, UnionType):
- types = parameterv1.type.types
- for element in types:
- if isinstance(element, NamedType) and (
- element.name == "float" or element.name.startswith("float ")
- ):
- return True
- return False
- return (
- (
- default_value_typev1 is ValueAnnotation.DefaultValueType.BOOLEAN
- and typev2.name in ("bool", "boolean")
- )
- or (
- default_value_typev1 is ValueAnnotation.DefaultValueType.STRING
- and typev2.name in ("str", "string")
- )
- or (
- default_value_typev1 is ValueAnnotation.DefaultValueType.NUMBER
- and (
- typev2.name in ("int", "integer", "float")
- or typev2.name.startswith("int ")
- or typev2.name.startswith("float ")
- )
- )
- )
- if isinstance(typev2, UnionType):
+ if typev2.name in ("int", "interger") or typev2.name.startswith("int "):
+ types = [typev1]
+ if isinstance(typev1, UnionType):
+ types = typev1.types
+ for element in types:
+ if isinstance(element, NamedType) and (
+ element.name in ("int", "integer")
+ or element.name.startswith("int ")
+ ):
+ return True
+ elif typev2.name == "float" or typev2.name.startswith("float "):
+ types = [typev1]
+ if isinstance(typev1, UnionType):
+ types = typev1.types
+ for element in types:
+ if isinstance(element, NamedType) and (
+ element.name == "float" or element.name.startswith("float ")
+ ):
+ return True
+ elif typev2.name in ("bool", "boolean"):
+ types = [typev1]
+ if isinstance(typev1, UnionType):
+ types = typev1.types
+ for element in types:
+ if isinstance(element, NamedType) and (
+ element.name in ("bool", "boolean")
+ ):
+ return True
+ elif typev2.name in ("str", "string"):
+ types = [typev1]
+ if isinstance(typev1, UnionType):
+ types = typev1.types
+ for element in types:
+ if isinstance(element, NamedType) and (
+ element.name in ("str", "string")
+ ):
+ return True
+ elif isinstance(typev2, UnionType):
for element in typev2.types:
- if _have_same_type(default_value_typev1, parameterv1, element):
+ if _have_same_type(typev1, element):
return True
return False
def _have_same_value(
- parameterv1: Parameter,
- parameterv2: Parameter,
-) -> Optional[Tuple[Optional[ValueAnnotation.DefaultValueType], bool]]:
- parameterv1_default_value = parameterv1.default_value
- parameterv2_default_value = parameterv2.default_value
-
- if parameterv1_default_value is None:
- return None
- if parameterv2_default_value is None:
- return None
- parameterv1_is_in_quotation_marks = (
- parameterv1_default_value.startswith("'")
- and parameterv1_default_value.endswith("'")
- ) or (
- parameterv1_default_value.startswith('"')
- and parameterv1_default_value.endswith('"')
- )
- parameterv2_is_in_quotation_marks = (
- parameterv2_default_value.startswith("'")
- and parameterv2_default_value.endswith("'")
- ) or (
- parameterv2_default_value.startswith('"')
- and parameterv2_default_value.endswith('"')
- )
+ parameterv1_default_value: Optional[str], parameterv2_default_value: Optional[str]
+) -> bool:
+ if parameterv1_default_value is None and parameterv2_default_value is None:
+ return True
+ if parameterv1_default_value is None or parameterv2_default_value is None:
+ return False
if parameterv1_default_value == "None" and parameterv2_default_value == "None":
- return None, True
- if parameterv2.type is None or _have_same_type(
- ValueAnnotation.DefaultValueType.NUMBER, parameterv1, parameterv2.type
- ):
+ return True
+ try:
+ intv1_value = int(parameterv1_default_value)
+ intv2_value = int(parameterv2_default_value)
+ return intv1_value == intv2_value
+ except ValueError:
try:
- intv1_value = int(parameterv1_default_value)
- intv2_value = int(parameterv2_default_value)
- return ValueAnnotation.DefaultValueType.NUMBER, intv1_value == intv2_value
+ floatv1_value = float(parameterv1_default_value)
+ floatv2_value = float(parameterv2_default_value)
+ return floatv1_value == floatv2_value
except ValueError:
try:
- floatv1_value = float(parameterv1_default_value)
- floatv2_value = float(parameterv2_default_value)
- return (
- ValueAnnotation.DefaultValueType.NUMBER,
- floatv1_value == floatv2_value,
- )
+ int(parameterv1_default_value)
+ float(parameterv2_default_value)
+ return False
except ValueError:
try:
- int(parameterv1_default_value)
- float(parameterv2_default_value)
- return ValueAnnotation.DefaultValueType.NUMBER, False
+ int(parameterv2_default_value)
+ float(parameterv1_default_value)
+ return False
except ValueError:
- try:
- int(parameterv2_default_value)
- float(parameterv1_default_value)
- return ValueAnnotation.DefaultValueType.NUMBER, False
- except ValueError:
- pass
+ pass
if parameterv1_default_value in (
"True",
"False",
) and parameterv2_default_value in ("True", "False"):
- return ValueAnnotation.DefaultValueType.BOOLEAN, bool(
- parameterv1_default_value
- ) == bool(parameterv2_default_value)
- if parameterv1_is_in_quotation_marks and parameterv2_is_in_quotation_marks:
- return (
- ValueAnnotation.DefaultValueType.STRING,
- parameterv1_default_value[1:-1] == parameterv2_default_value[1:-1],
- )
- return None
+ return bool(parameterv1_default_value) == bool(parameterv2_default_value)
+ valuev1_is_in_quotation_marks = (
+ parameterv1_default_value.startswith("'")
+ and parameterv1_default_value.endswith("'")
+ ) or (
+ parameterv1_default_value.startswith('"')
+ and parameterv1_default_value.endswith('"')
+ )
+ valuev2_is_in_quotation_marks = (
+ parameterv2_default_value.startswith("'")
+ and parameterv2_default_value.endswith("'")
+ ) or (
+ parameterv2_default_value.startswith('"')
+ and parameterv2_default_value.endswith('"')
+ )
+ if valuev1_is_in_quotation_marks and valuev2_is_in_quotation_marks:
+ return parameterv1_default_value[1:-1] == parameterv2_default_value[1:-1]
+ return False
def migrate_constant_annotation(
constant_annotation: ConstantAnnotation, parameterv2: Parameter, mapping: Mapping
) -> Optional[ConstantAnnotation]:
- if parameterv2.type is None:
+ parameterv1 = get_annotated_api_element_by_type(
+ constant_annotation, mapping.get_apiv1_elements(), Parameter
+ )
+ if parameterv1 is None:
+ return None
+ if not _have_same_type(parameterv1.type, parameterv2.type) or not _have_same_value(parameterv1.default_value, parameterv2.default_value):
migrate_text = get_migration_text(constant_annotation, mapping)
return ConstantAnnotation(
parameterv2.id,
@@ -269,25 +255,15 @@ def migrate_constant_annotation(
constant_annotation.defaultValueType,
constant_annotation.defaultValue,
)
-
- parameterv1 = get_annotated_api_element_by_type(
- constant_annotation, mapping.get_apiv1_elements(), Parameter
+ return ConstantAnnotation(
+ parameterv2.id,
+ constant_annotation.authors,
+ constant_annotation.reviewers,
+ constant_annotation.comment,
+ EnumReviewResult.NONE,
+ constant_annotation.defaultValueType,
+ constant_annotation.defaultValue,
)
- if parameterv1 is None:
- return None
- if _have_same_type(
- constant_annotation.defaultValueType, parameterv1, parameterv2.type
- ):
- return ConstantAnnotation(
- parameterv2.id,
- constant_annotation.authors,
- constant_annotation.reviewers,
- constant_annotation.comment,
- EnumReviewResult.NONE,
- constant_annotation.defaultValueType,
- constant_annotation.defaultValue,
- )
- return None
def migrate_omitted_annotation(
@@ -296,19 +272,6 @@ def migrate_omitted_annotation(
parameterv1 = get_annotated_api_element_by_type(
omitted_annotation, mapping.get_apiv1_elements(), Parameter
)
- if parameterv1 is None:
- return None
- type_and_same_value = _have_same_value(parameterv1, parameterv2)
- if type_and_same_value is None:
- return None
- data_type, are_equal = type_and_same_value
-
- is_not_unsure = are_equal
- if parameterv2.type is not None and data_type is not None:
- is_not_unsure = are_equal and _have_same_type(
- data_type, parameterv1, parameterv2.type
- )
- review_result = EnumReviewResult.NONE if is_not_unsure else EnumReviewResult.UNSURE
migrate_text = (
get_migration_text(omitted_annotation, mapping)
if len(omitted_annotation.comment) == 0
@@ -316,13 +279,22 @@ def migrate_omitted_annotation(
+ "\n"
+ get_migration_text(omitted_annotation, mapping)
)
-
+ if parameterv1 is None:
+ return None
+ if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(parameterv1.default_value, parameterv2.default_value):
+ return OmittedAnnotation(
+ parameterv2.id,
+ omitted_annotation.authors,
+ omitted_annotation.reviewers,
+ omitted_annotation.comment,
+ EnumReviewResult.NONE,
+ )
return OmittedAnnotation(
parameterv2.id,
omitted_annotation.authors,
omitted_annotation.reviewers,
- omitted_annotation.comment if is_not_unsure else migrate_text,
- review_result,
+ migrate_text,
+ EnumReviewResult.UNSURE,
)
@@ -334,8 +306,10 @@ def migrate_optional_annotation(
)
if parameterv1 is None:
return None
- if parameterv2.type is not None and _have_same_type(
- optional_annotation.defaultValueType, parameterv1, parameterv2.type
+ migrate_text = get_migration_text(optional_annotation, mapping)
+ if (
+ _have_same_type(parameterv1.type, parameterv2.type)
+ and _have_same_value(parameterv1.default_value, parameterv2.default_value)
):
return OptionalAnnotation(
parameterv2.id,
@@ -346,20 +320,17 @@ def migrate_optional_annotation(
optional_annotation.defaultValueType,
optional_annotation.defaultValue,
)
- if parameterv2.type is None:
- migrate_text = get_migration_text(optional_annotation, mapping)
- return OptionalAnnotation(
- parameterv2.id,
- optional_annotation.authors,
- optional_annotation.reviewers,
- migrate_text
- if len(optional_annotation.comment) == 0
- else optional_annotation.comment + "\n" + migrate_text,
- EnumReviewResult.UNSURE,
- optional_annotation.defaultValueType,
- optional_annotation.defaultValue,
- )
- return None
+ return OptionalAnnotation(
+ parameterv2.id,
+ optional_annotation.authors,
+ optional_annotation.reviewers,
+ migrate_text
+ if len(optional_annotation.comment) == 0
+ else optional_annotation.comment + "\n" + migrate_text,
+ EnumReviewResult.UNSURE,
+ optional_annotation.defaultValueType,
+ optional_annotation.defaultValue,
+ )
def migrate_required_annotation(
@@ -370,13 +341,28 @@ def migrate_required_annotation(
)
if parameterv1 is None:
return None
- type_and_same_value = _have_same_value(parameterv1, parameterv2)
- if type_and_same_value is None:
- return None
+ if (
+ _have_same_type(parameterv1.type, parameterv2.type)
+ and
+ (
+ (parameterv1.default_value is not None and parameterv2.default_value is not None)
+ or (parameterv1.default_value is None and parameterv2.default_value is None)
+ )
+ ):
+ return RequiredAnnotation(
+ parameterv2.id,
+ required_annotation.authors,
+ required_annotation.reviewers,
+ required_annotation.comment,
+ EnumReviewResult.NONE,
+ )
+ migrate_text = get_migration_text(required_annotation, mapping)
return RequiredAnnotation(
parameterv2.id,
required_annotation.authors,
required_annotation.reviewers,
- required_annotation.comment,
- EnumReviewResult.NONE,
+ migrate_text
+ if len(required_annotation.comment) == 0
+ else required_annotation.comment + "\n" + migrate_text,
+ EnumReviewResult.UNSURE,
)
From 77021f6a8fc4e6aafdf0cfcef581300c103a1c85 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Fri, 30 Dec 2022 19:56:10 +0100
Subject: [PATCH 08/40] fix linter errors
---
.../migration/annotations/_migrate_value_annotation.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index 7a74540d9..a48970950 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -128,8 +128,8 @@ def migrate_value_annotation(
def _have_same_type(
- typev1: AbstractType,
- typev2: AbstractType,
+ typev1: Optional[AbstractType],
+ typev2: Optional[AbstractType],
) -> bool:
if typev2 is None and typev1 is None:
return True
From 89b343ce678ca9b51c7d602b5519bd99a4be70fd Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Fri, 30 Dec 2022 18:58:57 +0000
Subject: [PATCH 09/40] style: apply automated linter fixes
---
.../annotations/_migrate_value_annotation.py | 46 ++++++++++---------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index a48970950..b3354920d 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -216,19 +216,19 @@ def _have_same_value(
) and parameterv2_default_value in ("True", "False"):
return bool(parameterv1_default_value) == bool(parameterv2_default_value)
valuev1_is_in_quotation_marks = (
- parameterv1_default_value.startswith("'")
- and parameterv1_default_value.endswith("'")
- ) or (
- parameterv1_default_value.startswith('"')
- and parameterv1_default_value.endswith('"')
- )
+ parameterv1_default_value.startswith("'")
+ and parameterv1_default_value.endswith("'")
+ ) or (
+ parameterv1_default_value.startswith('"')
+ and parameterv1_default_value.endswith('"')
+ )
valuev2_is_in_quotation_marks = (
- parameterv2_default_value.startswith("'")
- and parameterv2_default_value.endswith("'")
- ) or (
- parameterv2_default_value.startswith('"')
- and parameterv2_default_value.endswith('"')
- )
+ parameterv2_default_value.startswith("'")
+ and parameterv2_default_value.endswith("'")
+ ) or (
+ parameterv2_default_value.startswith('"')
+ and parameterv2_default_value.endswith('"')
+ )
if valuev1_is_in_quotation_marks and valuev2_is_in_quotation_marks:
return parameterv1_default_value[1:-1] == parameterv2_default_value[1:-1]
return False
@@ -242,7 +242,9 @@ def migrate_constant_annotation(
)
if parameterv1 is None:
return None
- if not _have_same_type(parameterv1.type, parameterv2.type) or not _have_same_value(parameterv1.default_value, parameterv2.default_value):
+ if not _have_same_type(parameterv1.type, parameterv2.type) or not _have_same_value(
+ parameterv1.default_value, parameterv2.default_value
+ ):
migrate_text = get_migration_text(constant_annotation, mapping)
return ConstantAnnotation(
parameterv2.id,
@@ -281,7 +283,9 @@ def migrate_omitted_annotation(
)
if parameterv1 is None:
return None
- if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(parameterv1.default_value, parameterv2.default_value):
+ if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(
+ parameterv1.default_value, parameterv2.default_value
+ ):
return OmittedAnnotation(
parameterv2.id,
omitted_annotation.authors,
@@ -307,9 +311,8 @@ def migrate_optional_annotation(
if parameterv1 is None:
return None
migrate_text = get_migration_text(optional_annotation, mapping)
- if (
- _have_same_type(parameterv1.type, parameterv2.type)
- and _have_same_value(parameterv1.default_value, parameterv2.default_value)
+ if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(
+ parameterv1.default_value, parameterv2.default_value
):
return OptionalAnnotation(
parameterv2.id,
@@ -341,13 +344,12 @@ def migrate_required_annotation(
)
if parameterv1 is None:
return None
- if (
- _have_same_type(parameterv1.type, parameterv2.type)
- and
+ if _have_same_type(parameterv1.type, parameterv2.type) and (
(
- (parameterv1.default_value is not None and parameterv2.default_value is not None)
- or (parameterv1.default_value is None and parameterv2.default_value is None)
+ parameterv1.default_value is not None
+ and parameterv2.default_value is not None
)
+ or (parameterv1.default_value is None and parameterv2.default_value is None)
):
return RequiredAnnotation(
parameterv2.id,
From 26f7d39bfdd56ed4160914549424fa29f1aaf024 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Sat, 31 Dec 2022 17:27:50 +0100
Subject: [PATCH 10/40] change value annotation migartion and improved
get_migration_text
---
.../annotations/_get_migration_text.py | 11 ++-
.../_migrate_boundary_annotation.py | 29 ++-----
.../_migrate_called_after_annotation.py | 11 +--
.../_migrate_description_annotation.py | 3 +-
.../annotations/_migrate_enum_annotation.py | 12 +--
.../annotations/_migrate_expert_annotation.py | 3 +-
.../annotations/_migrate_group_annotation.py | 49 +++++------
.../annotations/_migrate_move_annotation.py | 5 +-
.../annotations/_migrate_remove_annotation.py | 5 +-
.../annotations/_migrate_rename_annotation.py | 12 +--
.../annotations/_migrate_todo_annotation.py | 4 +-
.../annotations/_migrate_value_annotation.py | 84 ++++++++++---------
.../annotations/test_boundary_migration.py | 2 +-
.../test_called_after_migration.py | 2 +-
.../annotations/test_description_migration.py | 2 +-
.../annotations/test_enum_migration.py | 4 +-
.../annotations/test_expert_migration.py | 2 +-
.../annotations/test_group_annotation.py | 10 +--
.../annotations/test_move_migration.py | 2 +-
.../annotations/test_remove_migration.py | 2 +-
.../annotations/test_rename_migration.py | 4 +-
.../annotations/test_todo_migration.py | 2 +-
.../annotations/test_value_migration.py | 54 ++++++------
23 files changed, 147 insertions(+), 167 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
index f8b3dca0f..30f5cf3d4 100644
--- a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
+++ b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
@@ -88,7 +88,7 @@ def _get_further_information(annotation: AbstractAnnotation) -> str:
return " with the data '" + str(annotation.to_json()) + "'"
-def get_migration_text(
+def _get_migration_text(
annotation: AbstractAnnotation, mapping: Mapping, additional_information: Any = None
) -> str:
class_name = str(annotation.__class__.__name__)
@@ -132,6 +132,15 @@ def get_migration_text(
return migrate_text
+def get_migration_text(annotation: AbstractAnnotation, mapping: Mapping, for_todo_annotation: bool = False, additional_information: Any = None) -> str:
+ migration_text = _get_migration_text(annotation, mapping, additional_information=additional_information)
+ if for_todo_annotation:
+ return migration_text
+ if len(annotation.comment) == 0:
+ return migration_text
+ return annotation.comment + "\n" + migration_text
+
+
def _list_api_elements(
api_elements: Sequence[Attribute | Class | Function | Parameter | Result],
) -> str:
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index 5062c4ed4..503ceb425 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -81,25 +81,19 @@ def migrate_boundary_annotation(
authors.append(migration_author)
boundary_annotation.authors = authors
- migrate_text = get_migration_text(boundary_annotation, mapping)
-
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
parameter = mapping.get_apiv2_elements()[0]
if isinstance(parameter, (Attribute, Result)):
return []
if isinstance(parameter, Parameter):
- boundary_annotation.target = parameter.id
(
parameter_expects_number,
parameter_type_is_discrete,
) = _contains_number_and_is_discrete(parameter.type)
if parameter.type is None:
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
- boundary_annotation.comment = (
- migrate_text
- if len(boundary_annotation.comment) == 0
- else boundary_annotation.comment + "\n" + migrate_text
- )
+ boundary_annotation.comment = get_migration_text(boundary_annotation, mapping)
+ boundary_annotation.target = parameter.id
return [boundary_annotation]
if parameter_expects_number:
if (
@@ -107,16 +101,13 @@ def migrate_boundary_annotation(
is not boundary_annotation.interval.isDiscrete
):
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
- boundary_annotation.comment = (
- migrate_text
- if len(boundary_annotation.comment) == 0
- else boundary_annotation.comment + "\n" + migrate_text
- )
+ boundary_annotation.comment = get_migration_text(boundary_annotation, mapping)
boundary_annotation.interval = (
migrate_interval_to_fit_parameter_type(
boundary_annotation.interval, parameter_type_is_discrete
)
)
+ boundary_annotation.target = parameter.id
return [boundary_annotation]
return [
TodoAnnotation(
@@ -125,7 +116,7 @@ def migrate_boundary_annotation(
boundary_annotation.reviewers,
boundary_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(boundary_annotation, mapping, for_todo_annotation=True)
)
]
migrated_annotations: list[AbstractAnnotation] = []
@@ -156,9 +147,7 @@ def migrate_boundary_annotation(
parameter.id,
authors,
boundary_annotation.reviewers,
- migrate_text
- if len(boundary_annotation.comment) == 0
- else boundary_annotation.comment + "\n" + migrate_text,
+ get_migration_text(boundary_annotation, mapping),
EnumReviewResult.UNSURE,
migrate_interval_to_fit_parameter_type(
boundary_annotation.interval,
@@ -172,9 +161,7 @@ def migrate_boundary_annotation(
parameter.id,
authors,
boundary_annotation.reviewers,
- migrate_text
- if len(boundary_annotation.comment) == 0
- else boundary_annotation.comment + "\n" + migrate_text,
+ get_migration_text(boundary_annotation, mapping),
EnumReviewResult.UNSURE,
boundary_annotation.interval,
)
@@ -188,7 +175,7 @@ def migrate_boundary_annotation(
boundary_annotation.reviewers,
boundary_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(boundary_annotation, mapping, for_todo_annotation=True),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
index 6d67ccb98..ed368a6ba 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
@@ -34,7 +34,7 @@ def migrate_called_after_annotation(
called_after_annotation.reviewers,
called_after_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(called_after_annotation, mapping),
+ get_migration_text(called_after_annotation, mapping, for_todo_annotation=True),
)
)
continue
@@ -42,18 +42,13 @@ def migrate_called_after_annotation(
called_before_functions = _get_function_called_before_replacements(
called_after_annotation, mappings, element
)
- migrate_text = get_migration_text(
- called_after_annotation,
- mapping,
- additional_information=called_before_functions,
- )
if len(called_before_functions) == 0:
migrated_annotations.append(
CalledAfterAnnotation(
element.id,
authors,
called_after_annotation.reviewers,
- called_after_annotation.comment,
+ get_migration_text(called_after_annotation, mapping, EnumReviewResult.UNSURE, additional_information=called_before_functions),
EnumReviewResult.UNSURE,
called_after_annotation.calledAfterName,
)
@@ -79,7 +74,7 @@ def migrate_called_after_annotation(
called_after_annotation.reviewers,
called_after_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(called_after_annotation, mapping, for_todo_annotation=True, additional_information=called_before_functions),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
index 523aff916..daa3c5216 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
@@ -25,7 +25,6 @@ def migrate_description_annotation(
authors = description_annotation.authors
authors.append(migration_author)
description_annotation.authors = authors
- migrate_text = get_migration_text(description_annotation, mapping)
if isinstance(mapping, (ManyToOneMapping, OneToOneMapping)):
element = mapping.get_apiv2_elements()[0]
@@ -63,7 +62,7 @@ def migrate_description_annotation(
description_annotation.reviewers,
description_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(description_annotation, mapping, for_todo_annotation=True),
)
)
return description_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 560b01d47..cacc9e392 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -57,8 +57,6 @@ def migrate_enum_annotation(
authors.append(migration_author)
enum_annotation.authors = authors
- migrate_text = get_migration_text(enum_annotation, mapping)
-
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
parameter = mapping.get_apiv2_elements()[0]
if isinstance(parameter, (Attribute, Result)):
@@ -78,11 +76,7 @@ def migrate_enum_annotation(
return []
else:
enum_annotation.reviewResult = EnumReviewResult.UNSURE
- enum_annotation.comment = (
- migrate_text
- if len(enum_annotation.comment) == 0
- else enum_annotation.comment + "\n" + migrate_text
- )
+ enum_annotation.comment = get_migration_text(enum_annotation, mapping)
enum_annotation.target = parameter.id
return [enum_annotation]
return [
@@ -92,7 +86,7 @@ def migrate_enum_annotation(
enum_annotation.reviewers,
enum_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(enum_annotation, mapping, for_todo_annotation=True),
)
]
@@ -127,7 +121,7 @@ def migrate_enum_annotation(
enum_annotation.reviewers,
enum_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(enum_annotation, mapping, for_todo_annotation=True),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
index 4ec58076e..b05f9665d 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
@@ -25,7 +25,6 @@ def migrate_expert_annotation(
authors = expert_annotation.authors
authors.append(migration_author)
expert_annotation.authors = authors
- migrate_text = get_migration_text(expert_annotation, mapping)
if isinstance(mapping, (ManyToOneMapping, OneToOneMapping)):
element = mapping.get_apiv2_elements()[0]
@@ -62,7 +61,7 @@ def migrate_expert_annotation(
expert_annotation.reviewers,
expert_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(expert_annotation, mapping, for_todo_annotation=True),
)
)
return expert_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
index 520a9ff46..6967f2975 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
@@ -34,7 +34,7 @@ def migrate_group_annotation(
reviewers=group_annotation.reviewers,
comment=group_annotation.comment,
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(group_annotation, mapping),
+ newTodo=get_migration_text(group_annotation, mapping, for_todo_annotation=True),
)
)
else:
@@ -61,10 +61,6 @@ def migrate_group_annotation(
]
grouped_parameters = remove_duplicates_and_preserve_order
- group_name = group_annotation.groupName
- review_result = EnumReviewResult.NONE
- migrate_text = get_migration_text(group_annotation, mapping)
-
if len(grouped_parameters) < 2 < len(group_annotation.parameters):
migrated_annotations.append(
TodoAnnotation(
@@ -76,6 +72,7 @@ def migrate_group_annotation(
newTodo=get_migration_text(
group_annotation,
mapping,
+ for_todo_annotation=True,
additional_information=grouped_parameters,
),
)
@@ -83,26 +80,30 @@ def migrate_group_annotation(
continue
if len(grouped_parameters) != len(group_annotation.parameters):
- group_name += str(int(name_modifier, base=2))
- review_result = EnumReviewResult.UNSURE
- if len(group_annotation.comment) != 0:
- migrate_text = group_annotation.comment + "\n" + migrate_text
-
- migrated_annotations.append(
- GroupAnnotation(
- target=functionv2.id,
- authors=authors,
- reviewers=group_annotation.reviewers,
- comment=(
- migrate_text
- if review_result is EnumReviewResult.UNSURE
- else group_annotation.comment
- ),
- reviewResult=review_result,
- groupName=group_name,
- parameters=[parameter.name for parameter in grouped_parameters],
+ group_name = group_annotation.groupName + str(int(name_modifier, base=2))
+ migrated_annotations.append(
+ GroupAnnotation(
+ target=functionv2.id,
+ authors=authors,
+ reviewers=group_annotation.reviewers,
+ comment=get_migration_text(group_annotation, mapping, additional_information=grouped_parameters),
+ reviewResult=EnumReviewResult.UNSURE,
+ groupName=group_name,
+ parameters=[parameter.name for parameter in grouped_parameters],
+ )
+ )
+ else:
+ migrated_annotations.append(
+ GroupAnnotation(
+ target=functionv2.id,
+ authors=authors,
+ reviewers=group_annotation.reviewers,
+ comment=group_annotation.comment,
+ reviewResult=EnumReviewResult.NONE,
+ groupName=group_annotation.groupName,
+ parameters=[parameter.name for parameter in grouped_parameters],
+ )
)
- )
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
index 9543ba3c4..6d177304b 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
@@ -42,7 +42,6 @@ def migrate_move_annotation(
authors = move_annotation.authors
authors.append(migration_author)
move_annotation.authors = authors
- migrate_text = get_migration_text(move_annotation, mapping)
if isinstance(mapping, (ManyToOneMapping, OneToOneMapping)):
element = mapping.get_apiv2_elements()[0]
@@ -56,7 +55,7 @@ def migrate_move_annotation(
move_annotation.reviewers,
move_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(move_annotation, mapping, for_todo_annotation=True),
)
]
move_annotation.target = element.id
@@ -93,7 +92,7 @@ def migrate_move_annotation(
move_annotation.reviewers,
move_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(move_annotation, mapping, for_todo_annotation=True),
)
)
return move_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
index 49d935064..c3cd29a6b 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
@@ -35,7 +35,6 @@ def migrate_remove_annotation(
authors = remove_annotation.authors
authors.append(migration_author)
remove_annotation.authors = authors
- migrate_text = get_migration_text(remove_annotation, mapping)
if isinstance(mapping, (ManyToOneMapping, OneToOneMapping)):
element = mapping.get_apiv2_elements()[0]
@@ -49,7 +48,7 @@ def migrate_remove_annotation(
remove_annotation.reviewers,
remove_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(remove_annotation, mapping, for_todo_annotation=True),
)
]
remove_annotation.target = element.id
@@ -85,7 +84,7 @@ def migrate_remove_annotation(
remove_annotation.reviewers,
remove_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(remove_annotation, mapping, for_todo_annotation=True),
)
)
return remove_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index cf26360fe..81bd6de94 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -33,8 +33,6 @@ def migrate_rename_annotation(
rename_annotation.target = element.id
return [rename_annotation]
- migrate_text = get_migration_text(rename_annotation, mapping)
-
todo_annotations: list[AbstractAnnotation] = []
for element in mapping.get_apiv2_elements():
if not isinstance(element, (Attribute, Result)):
@@ -42,13 +40,9 @@ def migrate_rename_annotation(
new_name,
rename_annotation.target.split(".")[-1],
):
- rename_annotation.target = element.id
rename_annotation.reviewResult = EnumReviewResult.UNSURE
- rename_annotation.comment = (
- migrate_text
- if len(rename_annotation.comment) == 0
- else rename_annotation.comment + "\n" + migrate_text
- )
+ rename_annotation.comment = get_migration_text(rename_annotation, mapping)
+ rename_annotation.target = element.id
return [rename_annotation]
todo_annotations.append(
TodoAnnotation(
@@ -57,7 +51,7 @@ def migrate_rename_annotation(
rename_annotation.reviewers,
rename_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(rename_annotation, mapping, for_todo_annotation=True),
)
)
return todo_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
index 8eb64c0d1..b1894bafa 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
@@ -33,8 +33,6 @@ def migrate_todo_annotation(
todo_annotation.target = element.id
return [todo_annotation]
- migrate_text = get_migration_text(todo_annotation, mapping)
-
annotated_apiv1_element = get_annotated_api_element(
todo_annotation, mapping.get_apiv1_elements()
)
@@ -64,7 +62,7 @@ def migrate_todo_annotation(
todo_annotation.reviewers,
todo_annotation.comment,
EnumReviewResult.NONE,
- migrate_text,
+ get_migration_text(todo_annotation, mapping, for_todo_annotation=True),
)
)
return todo_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index b3354920d..bc49d6d1a 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -242,17 +242,21 @@ def migrate_constant_annotation(
)
if parameterv1 is None:
return None
- if not _have_same_type(parameterv1.type, parameterv2.type) or not _have_same_value(
- parameterv1.default_value, parameterv2.default_value
- ):
- migrate_text = get_migration_text(constant_annotation, mapping)
+ if not _have_same_type(parameterv1.type, parameterv2.type):
+ return TodoAnnotation(
+ parameterv2.id,
+ constant_annotation.authors,
+ constant_annotation.reviewers,
+ constant_annotation.comment,
+ EnumReviewResult.NONE,
+ get_migration_text(constant_annotation, mapping, for_todo_annotation=True)
+ )
+ if not _have_same_value(parameterv1.default_value, parameterv2.default_value):
return ConstantAnnotation(
parameterv2.id,
constant_annotation.authors,
constant_annotation.reviewers,
- migrate_text
- if len(constant_annotation.comment) == 0
- else constant_annotation.comment + "\n" + migrate_text,
+ get_migration_text(constant_annotation, mapping),
EnumReviewResult.UNSURE,
constant_annotation.defaultValueType,
constant_annotation.defaultValue,
@@ -274,13 +278,6 @@ def migrate_omitted_annotation(
parameterv1 = get_annotated_api_element_by_type(
omitted_annotation, mapping.get_apiv1_elements(), Parameter
)
- migrate_text = (
- get_migration_text(omitted_annotation, mapping)
- if len(omitted_annotation.comment) == 0
- else omitted_annotation.comment
- + "\n"
- + get_migration_text(omitted_annotation, mapping)
- )
if parameterv1 is None:
return None
if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(
@@ -293,13 +290,18 @@ def migrate_omitted_annotation(
omitted_annotation.comment,
EnumReviewResult.NONE,
)
- return OmittedAnnotation(
- parameterv2.id,
- omitted_annotation.authors,
- omitted_annotation.reviewers,
- migrate_text,
- EnumReviewResult.UNSURE,
- )
+ if _have_same_type(parameterv1.type, parameterv2.type) and not _have_same_value(
+ parameterv1.default_value, parameterv2.default_value
+ ):
+ return OmittedAnnotation(
+ parameterv2.id,
+ omitted_annotation.authors,
+ omitted_annotation.reviewers,
+ get_migration_text(omitted_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ )
+
+ return None
def migrate_optional_annotation(
@@ -310,7 +312,6 @@ def migrate_optional_annotation(
)
if parameterv1 is None:
return None
- migrate_text = get_migration_text(optional_annotation, mapping)
if _have_same_type(parameterv1.type, parameterv2.type) and _have_same_value(
parameterv1.default_value, parameterv2.default_value
):
@@ -323,17 +324,24 @@ def migrate_optional_annotation(
optional_annotation.defaultValueType,
optional_annotation.defaultValue,
)
- return OptionalAnnotation(
- parameterv2.id,
- optional_annotation.authors,
- optional_annotation.reviewers,
- migrate_text
- if len(optional_annotation.comment) == 0
- else optional_annotation.comment + "\n" + migrate_text,
- EnumReviewResult.UNSURE,
- optional_annotation.defaultValueType,
- optional_annotation.defaultValue,
- )
+ have_implicit_same_value = False
+ if parameterv1.default_value is not None and parameterv2.default_value is not None:
+ try:
+ have_implicit_same_value = float(parameterv1.default_value) == float(parameterv2.default_value)
+ except ValueError:
+ pass
+ if _have_same_type(parameterv1.type, parameterv2.type) or ((parameterv1.default_value is None) is not (parameterv2.default_value is None)) or have_implicit_same_value:
+ return OptionalAnnotation(
+ parameterv2.id,
+ optional_annotation.authors,
+ optional_annotation.reviewers,
+ get_migration_text(optional_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ optional_annotation.defaultValueType,
+ optional_annotation.defaultValue,
+ )
+
+ return None
def migrate_required_annotation(
@@ -358,13 +366,11 @@ def migrate_required_annotation(
required_annotation.comment,
EnumReviewResult.NONE,
)
- migrate_text = get_migration_text(required_annotation, mapping)
- return RequiredAnnotation(
+ return TodoAnnotation(
parameterv2.id,
required_annotation.authors,
required_annotation.reviewers,
- migrate_text
- if len(required_annotation.comment) == 0
- else required_annotation.comment + "\n" + migrate_text,
- EnumReviewResult.UNSURE,
+ required_annotation.comment,
+ EnumReviewResult.NONE,
+ get_migration_text(required_annotation, mapping),
)
diff --git a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
index 4bbf8fc5d..83286549c 100644
--- a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
@@ -245,7 +245,7 @@ def migrate_boundary_annotation_data_one_to_many_mapping() -> Tuple[
id_="test/test.boundary.test4.testC",
name="testC",
qname="test.boundary.test4.testC",
- default_value="",
+ default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
documentation=ParameterDocumentation("", "", ""),
diff --git a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
index 091286830..ca77d08f2 100644
--- a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
@@ -223,7 +223,7 @@ def migrate_called_after_annotation_data_one_to_one_mapping__no_mapping_found()
target="test/test.called_after.test3.test/NewClass/new_test_after",
authors=["testauthor", migration_author],
reviewers=[],
- comment="",
+ comment=get_migration_text(annotationv1, mapping_after, EnumReviewResult.UNSURE),
reviewResult=EnumReviewResult.UNSURE,
calledAfterName="test_before",
)
diff --git a/package-parser/tests/processing/migration/annotations/test_description_migration.py b/package-parser/tests/processing/migration/annotations/test_description_migration.py
index 76ced6a95..51fb412ac 100644
--- a/package-parser/tests/processing/migration/annotations/test_description_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_description_migration.py
@@ -161,7 +161,7 @@ def migrate_description_annotation_data_one_to_many_mapping__class() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mapping),
+ newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b, annotationv2_c]
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index 3dc04d5e7..0c47efa72 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -153,7 +153,7 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
id_="test/test.enum.test3.TestA",
name="TestA",
qname="test.enum.test3.TestA",
- default_value="",
+ default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
documentation=ParameterDocumentation("", "", ""),
@@ -203,7 +203,7 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
reviewers=[],
reviewResult=EnumReviewResult.NONE,
comment="",
- newTodo=get_migration_text(enum_annotation, mapping),
+ newTodo=get_migration_text(enum_annotation, mapping, for_todo_annotation=True),
)
return (
mapping,
diff --git a/package-parser/tests/processing/migration/annotations/test_expert_migration.py b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
index 14f289b6c..929367992 100644
--- a/package-parser/tests/processing/migration/annotations/test_expert_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
@@ -136,7 +136,7 @@ def migrate_expert_annotation_data__class() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mapping),
+ newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2, annotationv2_function]
diff --git a/package-parser/tests/processing/migration/annotations/test_group_annotation.py b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
index b866bea5d..649e9e153 100644
--- a/package-parser/tests/processing/migration/annotations/test_group_annotation.py
+++ b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
@@ -249,7 +249,7 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
target="test/test.group.test2.test/NewTestClass/test",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotation, mapping_function),
+ comment=get_migration_text(annotation, mapping_function, additional_information=[parameterv2_2_a, parameterv2_2_c]),
reviewResult=EnumReviewResult.UNSURE,
groupName="GroupName5",
parameters=["new_parameter_a", "new_parameter_c"],
@@ -258,7 +258,7 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
target="test/test.group.test3.test/NewTestClass/test",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotation, mapping_function),
+ comment=get_migration_text(annotation, mapping_function, additional_information=[parameterv2_3_b, parameterv2_3_c]),
reviewResult=EnumReviewResult.UNSURE,
groupName="GroupName6",
parameters=["new_parameter_b", "new_parameter_c"],
@@ -270,7 +270,7 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
comment="",
reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(
- annotation, mapping_function, additional_information=[parameterv2_4_b]
+ annotation, mapping_function, for_todo_annotation=True, additional_information=[parameterv2_4_b]
),
)
migrated_annotation_5 = TodoAnnotation(
@@ -279,7 +279,7 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping_function),
+ newTodo=get_migration_text(annotation, mapping_function, for_todo_annotation=True),
)
migrated_annotation_6 = TodoAnnotation(
target="test/test.group.test6.test/NewClass",
@@ -287,7 +287,7 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping_function),
+ newTodo=get_migration_text(annotation, mapping_function, for_todo_annotation=True),
)
return (
[
diff --git a/package-parser/tests/processing/migration/annotations/test_move_migration.py b/package-parser/tests/processing/migration/annotations/test_move_migration.py
index 1430eb161..6fd9a43c7 100644
--- a/package-parser/tests/processing/migration/annotations/test_move_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_move_migration.py
@@ -190,6 +190,6 @@ def migrate_move_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mapping),
+ newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b]
diff --git a/package-parser/tests/processing/migration/annotations/test_remove_migration.py b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
index f8699a33d..9e1d6e1c3 100644
--- a/package-parser/tests/processing/migration/annotations/test_remove_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
@@ -153,6 +153,6 @@ def migrate_remove_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mapping),
+ newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b, annotationv2_c]
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index e63ea7ed2..40843c7f3 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -164,7 +164,7 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mappings),
+ newTodo=get_migration_text(annotationv1, mappings, for_todo_annotation=True),
)
annotationv2_b = TodoAnnotation(
target="test/test.rename.test3.TestB",
@@ -172,7 +172,7 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mappings),
+ newTodo=get_migration_text(annotationv1, mappings, for_todo_annotation=True),
)
return (
mappings,
diff --git a/package-parser/tests/processing/migration/annotations/test_todo_migration.py b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
index 0b08bbf36..8b28d0180 100644
--- a/package-parser/tests/processing/migration/annotations/test_todo_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
@@ -209,7 +209,7 @@ def migrate_todo_annotation_data_many_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mappings),
+ newTodo=get_migration_text(annotationv1, mappings, for_todo_annotation=True),
)
return (
mappings,
diff --git a/package-parser/tests/processing/migration/annotations/test_value_migration.py b/package-parser/tests/processing/migration/annotations/test_value_migration.py
index e240abd13..0739ac1f6 100644
--- a/package-parser/tests/processing/migration/annotations/test_value_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_value_migration.py
@@ -51,6 +51,7 @@ def migrate_constant_annotation_data_one_to_one_mapping() -> Tuple[
is_public=True,
documentation=ParameterDocumentation("str", "'test string'", ""),
)
+ mapping = OneToOneMapping(1.0, parameterv1, parameterv2)
annotation = ConstantAnnotation(
target="test/test.value.test1.testA",
authors=["testauthor"],
@@ -64,12 +65,12 @@ def migrate_constant_annotation_data_one_to_one_mapping() -> Tuple[
target="test/test.value.test1.testB",
authors=["testauthor", migration_author],
reviewers=[],
- comment="",
- reviewResult=EnumReviewResult.NONE,
+ comment=get_migration_text(annotation, mapping),
+ reviewResult=EnumReviewResult.UNSURE,
defaultValueType=ValueAnnotation.DefaultValueType.STRING,
defaultValue="This is a string",
)
- return OneToOneMapping(1.0, parameterv1, parameterv2), annotation, [annotationv2]
+ return mapping, annotation, [annotationv2]
def migrate_omitted_annotation_data_one_to_one_mapping() -> Tuple[
@@ -224,7 +225,7 @@ def migrate_constant_annotation_data_one_to_many_mapping() -> Tuple[
id_="test/test.value.test5.testB",
name="testB",
qname="test.value.test5.testB",
- default_value="",
+ default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
documentation=ParameterDocumentation("", "", ""),
@@ -272,14 +273,13 @@ def migrate_constant_annotation_data_one_to_many_mapping() -> Tuple[
reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(annotation, mapping),
)
- annotationv2_b = ConstantAnnotation(
+ annotationv2_b = TodoAnnotation(
target="test/test.value.test5.testB",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotation, mapping),
- reviewResult=EnumReviewResult.UNSURE,
- defaultValueType=ValueAnnotation.DefaultValueType.NUMBER,
- defaultValue="2.0",
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_c = TodoAnnotation(
target="test/test.value.test5.testC",
@@ -287,14 +287,14 @@ def migrate_constant_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_d = ConstantAnnotation(
target="test/test.value.test5.testD",
authors=["testauthor", migration_author],
reviewers=[],
- comment="",
- reviewResult=EnumReviewResult.NONE,
+ comment=get_migration_text(annotation, mapping),
+ reviewResult=EnumReviewResult.UNSURE,
defaultValueType=ValueAnnotation.DefaultValueType.NUMBER,
defaultValue="2.0",
)
@@ -334,7 +334,7 @@ def migrate_optional_annotation_data_one_to_many_mapping() -> Tuple[
id_="test/test.value.test6.testB",
name="testB",
qname="test.value.test6.testB",
- default_value="",
+ default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
documentation=ParameterDocumentation("", "", ""),
@@ -376,7 +376,7 @@ def migrate_optional_annotation_data_one_to_many_mapping() -> Tuple[
authors=["testauthor", migration_author],
reviewers=[],
comment="",
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
reviewResult=EnumReviewResult.NONE,
)
annotationv2_b = OptionalAnnotation(
@@ -394,14 +394,14 @@ def migrate_optional_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_d = OptionalAnnotation(
target="test/test.value.test6.testD",
authors=["testauthor", migration_author],
reviewers=[],
- comment="",
- reviewResult=EnumReviewResult.NONE,
+ comment=get_migration_text(annotation, mapping),
+ reviewResult=EnumReviewResult.UNSURE,
defaultValueType=ValueAnnotation.DefaultValueType.NUMBER,
defaultValue="2",
)
@@ -459,10 +459,10 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
id_="test/test.value.test7.testD",
name="testD",
qname="test.value.test7.testD",
- default_value="None",
+ default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
- documentation=ParameterDocumentation("", "None", ""),
+ documentation=ParameterDocumentation("", "", ""),
)
parameterv2_e = Parameter(
id_="test/test.value.test7.testE",
@@ -509,7 +509,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_b = RequiredAnnotation(
target="test/test.value.test7.testB",
@@ -524,7 +524,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_d = TodoAnnotation(
@@ -533,7 +533,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_e = TodoAnnotation(
target="test/test.value.test7.testE",
@@ -541,7 +541,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_f = RequiredAnnotation(
@@ -653,7 +653,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_c = TodoAnnotation(
target="test/test.value.test8.testC",
@@ -661,7 +661,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_d = TodoAnnotation(
@@ -670,7 +670,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
annotationv2_e = TodoAnnotation(
target="test/test.value.test8.testE",
@@ -678,7 +678,7 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping),
+ newTodo=get_migration_text(annotation, mapping, for_todo_annotation=True),
)
return (
From 5134d14941f75e481d9b77f4638464973268932d Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Sat, 31 Dec 2022 17:48:03 +0100
Subject: [PATCH 11/40] fix linter errors
---
.../_migrate_called_after_annotation.py | 2 +-
.../annotations/_migrate_value_annotation.py | 18 ++----------------
.../annotations/test_boundary_migration.py | 1 +
.../annotations/test_called_after_migration.py | 3 ++-
.../annotations/test_enum_migration.py | 1 +
.../annotations/test_expert_migration.py | 1 +
.../annotations/test_rename_migration.py | 1 +
.../annotations/test_value_migration.py | 1 +
8 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
index ed368a6ba..de9d6dee9 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
@@ -48,7 +48,7 @@ def migrate_called_after_annotation(
element.id,
authors,
called_after_annotation.reviewers,
- get_migration_text(called_after_annotation, mapping, EnumReviewResult.UNSURE, additional_information=called_before_functions),
+ get_migration_text(called_after_annotation, mapping, additional_information=called_before_functions),
EnumReviewResult.UNSURE,
called_after_annotation.calledAfterName,
)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index bc49d6d1a..e2d791af6 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -243,14 +243,7 @@ def migrate_constant_annotation(
if parameterv1 is None:
return None
if not _have_same_type(parameterv1.type, parameterv2.type):
- return TodoAnnotation(
- parameterv2.id,
- constant_annotation.authors,
- constant_annotation.reviewers,
- constant_annotation.comment,
- EnumReviewResult.NONE,
- get_migration_text(constant_annotation, mapping, for_todo_annotation=True)
- )
+ return None
if not _have_same_value(parameterv1.default_value, parameterv2.default_value):
return ConstantAnnotation(
parameterv2.id,
@@ -366,11 +359,4 @@ def migrate_required_annotation(
required_annotation.comment,
EnumReviewResult.NONE,
)
- return TodoAnnotation(
- parameterv2.id,
- required_annotation.authors,
- required_annotation.reviewers,
- required_annotation.comment,
- EnumReviewResult.NONE,
- get_migration_text(required_annotation, mapping),
- )
+ return None
diff --git a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
index 83286549c..f166fecad 100644
--- a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
@@ -207,6 +207,7 @@ def migrate_boundary_annotation_data_one_to_one_mapping_float_to_int() -> Tuple[
)
+# pylint: disable=duplicate-code
def migrate_boundary_annotation_data_one_to_many_mapping() -> Tuple[
Mapping,
AbstractAnnotation,
diff --git a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
index ca77d08f2..42bb45f95 100644
--- a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
@@ -18,6 +18,7 @@
)
+# pylint: disable=duplicate-code
def migrate_called_after_annotation_data_one_to_one_mapping() -> Tuple[
list[Mapping],
AbstractAnnotation,
@@ -223,7 +224,7 @@ def migrate_called_after_annotation_data_one_to_one_mapping__no_mapping_found()
target="test/test.called_after.test3.test/NewClass/new_test_after",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotationv1, mapping_after, EnumReviewResult.UNSURE),
+ comment=get_migration_text(annotationv1, mapping_after),
reviewResult=EnumReviewResult.UNSURE,
calledAfterName="test_before",
)
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index 0c47efa72..b37353f8c 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -135,6 +135,7 @@ def migrate_enum_annotation_data_one_to_many_mapping() -> Tuple[
)
+# pylint: disable=duplicate-code
def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping() -> Tuple[
Mapping,
AbstractAnnotation,
diff --git a/package-parser/tests/processing/migration/annotations/test_expert_migration.py b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
index 929367992..b72b865fd 100644
--- a/package-parser/tests/processing/migration/annotations/test_expert_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
@@ -26,6 +26,7 @@
)
+# pylint: disable=duplicate-code
def migrate_expert_annotation_data__function() -> Tuple[
Mapping,
AbstractAnnotation,
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index 40843c7f3..e25abfb5c 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -65,6 +65,7 @@ def migrate_rename_annotation_data_one_to_one_mapping() -> Tuple[
return mappings, annotationv1, [annotationv2]
+# pylint: disable=duplicate-code
def migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name() -> Tuple[
Mapping,
AbstractAnnotation,
diff --git a/package-parser/tests/processing/migration/annotations/test_value_migration.py b/package-parser/tests/processing/migration/annotations/test_value_migration.py
index 0739ac1f6..80ab1a6f1 100644
--- a/package-parser/tests/processing/migration/annotations/test_value_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_value_migration.py
@@ -566,6 +566,7 @@ def migrate_required_annotation_data_one_to_many_mapping() -> Tuple[
)
+# pylint: disable=duplicate-code
def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
Mapping,
AbstractAnnotation,
From e39234506ccee1cdbe163acf96db11049f28918c Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Sat, 31 Dec 2022 16:50:58 +0000
Subject: [PATCH 12/40] style: apply automated linter fixes
---
.../annotations/_get_migration_text.py | 11 ++++++--
.../_migrate_boundary_annotation.py | 16 +++++++++---
.../_migrate_called_after_annotation.py | 17 ++++++++++---
.../_migrate_description_annotation.py | 4 ++-
.../annotations/_migrate_enum_annotation.py | 4 ++-
.../annotations/_migrate_expert_annotation.py | 4 ++-
.../annotations/_migrate_group_annotation.py | 14 ++++++++---
.../annotations/_migrate_move_annotation.py | 8 ++++--
.../annotations/_migrate_remove_annotation.py | 8 ++++--
.../annotations/_migrate_rename_annotation.py | 8 ++++--
.../annotations/_migrate_todo_annotation.py | 4 ++-
.../annotations/_migrate_value_annotation.py | 13 ++++++++--
.../annotations/test_group_annotation.py | 25 +++++++++++++++----
13 files changed, 107 insertions(+), 29 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
index 30f5cf3d4..9712154a6 100644
--- a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
+++ b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
@@ -132,8 +132,15 @@ def _get_migration_text(
return migrate_text
-def get_migration_text(annotation: AbstractAnnotation, mapping: Mapping, for_todo_annotation: bool = False, additional_information: Any = None) -> str:
- migration_text = _get_migration_text(annotation, mapping, additional_information=additional_information)
+def get_migration_text(
+ annotation: AbstractAnnotation,
+ mapping: Mapping,
+ for_todo_annotation: bool = False,
+ additional_information: Any = None,
+) -> str:
+ migration_text = _get_migration_text(
+ annotation, mapping, additional_information=additional_information
+ )
if for_todo_annotation:
return migration_text
if len(annotation.comment) == 0:
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index 503ceb425..4136bd00b 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -92,7 +92,9 @@ def migrate_boundary_annotation(
) = _contains_number_and_is_discrete(parameter.type)
if parameter.type is None:
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
- boundary_annotation.comment = get_migration_text(boundary_annotation, mapping)
+ boundary_annotation.comment = get_migration_text(
+ boundary_annotation, mapping
+ )
boundary_annotation.target = parameter.id
return [boundary_annotation]
if parameter_expects_number:
@@ -101,7 +103,9 @@ def migrate_boundary_annotation(
is not boundary_annotation.interval.isDiscrete
):
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
- boundary_annotation.comment = get_migration_text(boundary_annotation, mapping)
+ boundary_annotation.comment = get_migration_text(
+ boundary_annotation, mapping
+ )
boundary_annotation.interval = (
migrate_interval_to_fit_parameter_type(
boundary_annotation.interval, parameter_type_is_discrete
@@ -116,7 +120,9 @@ def migrate_boundary_annotation(
boundary_annotation.reviewers,
boundary_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(boundary_annotation, mapping, for_todo_annotation=True)
+ get_migration_text(
+ boundary_annotation, mapping, for_todo_annotation=True
+ ),
)
]
migrated_annotations: list[AbstractAnnotation] = []
@@ -175,7 +181,9 @@ def migrate_boundary_annotation(
boundary_annotation.reviewers,
boundary_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(boundary_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ boundary_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
index de9d6dee9..97778c22c 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_called_after_annotation.py
@@ -34,7 +34,9 @@ def migrate_called_after_annotation(
called_after_annotation.reviewers,
called_after_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(called_after_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ called_after_annotation, mapping, for_todo_annotation=True
+ ),
)
)
continue
@@ -48,7 +50,11 @@ def migrate_called_after_annotation(
element.id,
authors,
called_after_annotation.reviewers,
- get_migration_text(called_after_annotation, mapping, additional_information=called_before_functions),
+ get_migration_text(
+ called_after_annotation,
+ mapping,
+ additional_information=called_before_functions,
+ ),
EnumReviewResult.UNSURE,
called_after_annotation.calledAfterName,
)
@@ -74,7 +80,12 @@ def migrate_called_after_annotation(
called_after_annotation.reviewers,
called_after_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(called_after_annotation, mapping, for_todo_annotation=True, additional_information=called_before_functions),
+ get_migration_text(
+ called_after_annotation,
+ mapping,
+ for_todo_annotation=True,
+ additional_information=called_before_functions,
+ ),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
index daa3c5216..f933d68c2 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_description_annotation.py
@@ -62,7 +62,9 @@ def migrate_description_annotation(
description_annotation.reviewers,
description_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(description_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ description_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return description_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index cacc9e392..5a2ea14b6 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -121,7 +121,9 @@ def migrate_enum_annotation(
enum_annotation.reviewers,
enum_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(enum_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ enum_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return migrated_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
index b05f9665d..6aeb0e914 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_expert_annotation.py
@@ -61,7 +61,9 @@ def migrate_expert_annotation(
expert_annotation.reviewers,
expert_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(expert_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ expert_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return expert_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
index 6967f2975..aff10d3f6 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_group_annotation.py
@@ -34,7 +34,9 @@ def migrate_group_annotation(
reviewers=group_annotation.reviewers,
comment=group_annotation.comment,
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(group_annotation, mapping, for_todo_annotation=True),
+ newTodo=get_migration_text(
+ group_annotation, mapping, for_todo_annotation=True
+ ),
)
)
else:
@@ -80,13 +82,19 @@ def migrate_group_annotation(
continue
if len(grouped_parameters) != len(group_annotation.parameters):
- group_name = group_annotation.groupName + str(int(name_modifier, base=2))
+ group_name = group_annotation.groupName + str(
+ int(name_modifier, base=2)
+ )
migrated_annotations.append(
GroupAnnotation(
target=functionv2.id,
authors=authors,
reviewers=group_annotation.reviewers,
- comment=get_migration_text(group_annotation, mapping, additional_information=grouped_parameters),
+ comment=get_migration_text(
+ group_annotation,
+ mapping,
+ additional_information=grouped_parameters,
+ ),
reviewResult=EnumReviewResult.UNSURE,
groupName=group_name,
parameters=[parameter.name for parameter in grouped_parameters],
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
index 6d177304b..804e8fe2a 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_move_annotation.py
@@ -55,7 +55,9 @@ def migrate_move_annotation(
move_annotation.reviewers,
move_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(move_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ move_annotation, mapping, for_todo_annotation=True
+ ),
)
]
move_annotation.target = element.id
@@ -92,7 +94,9 @@ def migrate_move_annotation(
move_annotation.reviewers,
move_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(move_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ move_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return move_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
index c3cd29a6b..18077cca1 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_remove_annotation.py
@@ -48,7 +48,9 @@ def migrate_remove_annotation(
remove_annotation.reviewers,
remove_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(remove_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ remove_annotation, mapping, for_todo_annotation=True
+ ),
)
]
remove_annotation.target = element.id
@@ -84,7 +86,9 @@ def migrate_remove_annotation(
remove_annotation.reviewers,
remove_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(remove_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ remove_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return remove_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index 81bd6de94..5827da22e 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -41,7 +41,9 @@ def migrate_rename_annotation(
rename_annotation.target.split(".")[-1],
):
rename_annotation.reviewResult = EnumReviewResult.UNSURE
- rename_annotation.comment = get_migration_text(rename_annotation, mapping)
+ rename_annotation.comment = get_migration_text(
+ rename_annotation, mapping
+ )
rename_annotation.target = element.id
return [rename_annotation]
todo_annotations.append(
@@ -51,7 +53,9 @@ def migrate_rename_annotation(
rename_annotation.reviewers,
rename_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(rename_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ rename_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return todo_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
index b1894bafa..b7509cf57 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_todo_annotation.py
@@ -62,7 +62,9 @@ def migrate_todo_annotation(
todo_annotation.reviewers,
todo_annotation.comment,
EnumReviewResult.NONE,
- get_migration_text(todo_annotation, mapping, for_todo_annotation=True),
+ get_migration_text(
+ todo_annotation, mapping, for_todo_annotation=True
+ ),
)
)
return todo_annotations
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
index e2d791af6..c18d5df6f 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_value_annotation.py
@@ -320,10 +320,19 @@ def migrate_optional_annotation(
have_implicit_same_value = False
if parameterv1.default_value is not None and parameterv2.default_value is not None:
try:
- have_implicit_same_value = float(parameterv1.default_value) == float(parameterv2.default_value)
+ have_implicit_same_value = float(parameterv1.default_value) == float(
+ parameterv2.default_value
+ )
except ValueError:
pass
- if _have_same_type(parameterv1.type, parameterv2.type) or ((parameterv1.default_value is None) is not (parameterv2.default_value is None)) or have_implicit_same_value:
+ if (
+ _have_same_type(parameterv1.type, parameterv2.type)
+ or (
+ (parameterv1.default_value is None)
+ is not (parameterv2.default_value is None)
+ )
+ or have_implicit_same_value
+ ):
return OptionalAnnotation(
parameterv2.id,
optional_annotation.authors,
diff --git a/package-parser/tests/processing/migration/annotations/test_group_annotation.py b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
index 649e9e153..dca1b5e08 100644
--- a/package-parser/tests/processing/migration/annotations/test_group_annotation.py
+++ b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
@@ -249,7 +249,11 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
target="test/test.group.test2.test/NewTestClass/test",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotation, mapping_function, additional_information=[parameterv2_2_a, parameterv2_2_c]),
+ comment=get_migration_text(
+ annotation,
+ mapping_function,
+ additional_information=[parameterv2_2_a, parameterv2_2_c],
+ ),
reviewResult=EnumReviewResult.UNSURE,
groupName="GroupName5",
parameters=["new_parameter_a", "new_parameter_c"],
@@ -258,7 +262,11 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
target="test/test.group.test3.test/NewTestClass/test",
authors=["testauthor", migration_author],
reviewers=[],
- comment=get_migration_text(annotation, mapping_function, additional_information=[parameterv2_3_b, parameterv2_3_c]),
+ comment=get_migration_text(
+ annotation,
+ mapping_function,
+ additional_information=[parameterv2_3_b, parameterv2_3_c],
+ ),
reviewResult=EnumReviewResult.UNSURE,
groupName="GroupName6",
parameters=["new_parameter_b", "new_parameter_c"],
@@ -270,7 +278,10 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
comment="",
reviewResult=EnumReviewResult.NONE,
newTodo=get_migration_text(
- annotation, mapping_function, for_todo_annotation=True, additional_information=[parameterv2_4_b]
+ annotation,
+ mapping_function,
+ for_todo_annotation=True,
+ additional_information=[parameterv2_4_b],
),
)
migrated_annotation_5 = TodoAnnotation(
@@ -279,7 +290,9 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping_function, for_todo_annotation=True),
+ newTodo=get_migration_text(
+ annotation, mapping_function, for_todo_annotation=True
+ ),
)
migrated_annotation_6 = TodoAnnotation(
target="test/test.group.test6.test/NewClass",
@@ -287,7 +300,9 @@ def migrate_group_annotation_data_one_to_many_mapping() -> Tuple[
reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotation, mapping_function, for_todo_annotation=True),
+ newTodo=get_migration_text(
+ annotation, mapping_function, for_todo_annotation=True
+ ),
)
return (
[
From 570d1291147ede79a1311fc285f42d5e557e7938 Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Sat, 31 Dec 2022 19:16:00 +0100
Subject: [PATCH 13/40] draft for removing duplicated annotations
---
.../annotations/model/_annotations.py | 16 +++++
.../processing/migration/_migrate.py | 70 +++++++++++++++++--
2 files changed, 80 insertions(+), 6 deletions(-)
diff --git a/package-parser/package_parser/processing/annotations/model/_annotations.py b/package-parser/package_parser/processing/annotations/model/_annotations.py
index 924e175d3..0f7a6859d 100644
--- a/package-parser/package_parser/processing/annotations/model/_annotations.py
+++ b/package-parser/package_parser/processing/annotations/model/_annotations.py
@@ -82,6 +82,19 @@ def from_json(json: Any) -> Interval:
json["upperLimitType"],
)
+ def __eq__(self, other: Any) -> bool:
+ return (
+ isinstance(other, Interval)
+ and self.isDiscrete == other.isDiscrete
+ and self.lowerIntervalLimit == other.lowerIntervalLimit
+ and isinstance(self.lowerIntervalLimit, type(self.lowerIntervalLimit))
+ and self.lowerLimitType == other.lowerIntervalLimit
+ and self.upperIntervalLimit == other.upperIntervalLimit
+ and isinstance(self.upperIntervalLimit, type(self.upperIntervalLimit))
+ and self.upperLimitType == self.upperLimitType
+ )
+
+
@dataclass
class BoundaryAnnotation(AbstractAnnotation):
@@ -122,6 +135,9 @@ def to_json(self) -> dict:
def from_json(json: Any) -> EnumPair:
return EnumPair(json["stringValue"], json["instanceName"])
+ def __eq__(self, other):
+ return isinstance(other, EnumPair) and self.stringValue == other.stringValue and self.instanceName == other.instanceName
+
@dataclass
class EnumAnnotation(AbstractAnnotation):
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 8ab886ee8..07bdb6706 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,10 +1,11 @@
-from typing import Optional
-
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
- EnumReviewResult,
+ EnumReviewResult, BoundaryAnnotation, CalledAfterAnnotation, DescriptionAnnotation, EnumAnnotation,
+ ExpertAnnotation, GroupAnnotation, MoveAnnotation, RemoveAnnotation, RenameAnnotation, TodoAnnotation,
+ ValueAnnotation, ConstantAnnotation, OptionalAnnotation, OmittedAnnotation, RequiredAnnotation,
)
+
from package_parser.processing.api.model import Attribute, Result
from package_parser.processing.migration.annotations import (
migrate_boundary_annotation,
@@ -20,6 +21,7 @@
migrate_value_annotation,
)
from package_parser.processing.migration.model import Mapping
+from typing import Optional, Tuple
class Migration:
@@ -27,13 +29,11 @@ class Migration:
unsure_similarity: float
migrated_annotation_store: AnnotationStore = AnnotationStore()
unsure_annotation_store: AnnotationStore = AnnotationStore()
-
def __init__(
self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5
) -> None:
self.reliable_similarity = reliable_similarity
self.unsure_similarity = unsure_similarity
-
@staticmethod
def _get_mapping_from_annotation(
annotation: AbstractAnnotation, mappings: list[Mapping]
@@ -149,7 +149,7 @@ def migrate_annotations(
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
-
+ self._remove_duplicates()
return self.migrated_annotation_store
def add_annotations_based_on_similarity(
@@ -162,3 +162,61 @@ def add_annotations_based_on_similarity(
self.migrated_annotation_store.add_annotation(annotation)
else:
self.unsure_annotation_store.add_annotation(annotation)
+
+ def _remove_duplicates(self):
+ duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
+ for annotation_store in [self.migrated_annotation_store, self.unsure_annotation_store]:
+ for annotation_type_store in [annotation_store.boundaryAnnotations,
+ annotation_store.calledAfterAnnotations,
+ annotation_store.descriptionAnnotations,
+ annotation_store.enumAnnotations,
+ annotation_store.expertAnnotations,
+ annotation_store.groupAnnotations,
+ annotation_store.moveAnnotations,
+ annotation_store.removeAnnotations,
+ annotation_store.renameAnnotations,
+ annotation_store.todoAnnotations,
+ annotation_store.valueAnnotations]:
+ for annotation_a in annotation_type_store:
+ for annotation_b in annotation_type_store:
+ if _are_semantic_equal(annotation_a, annotation_b):
+ duplicates.append((annotation_a, annotation_b))
+ for annotation_a, annotation_b in duplicates:
+ # todo this
+ pass
+
+
+def _are_semantic_equal(annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation):
+ # todo
+ if annotation_a.target == annotation_b.target and isinstance(annotation_a, type(annotation_b)) and isinstance(annotation_b, type(annotation_a)):
+ if isinstance(annotation_a, BoundaryAnnotation) and isinstance(annotation_b, BoundaryAnnotation):
+ return annotation_a.interval == annotation_b.interval
+ if isinstance(annotation_a, CalledAfterAnnotation) and isinstance(annotation_b, CalledAfterAnnotation):
+ return annotation_a.calledAfterName == annotation_b.calledAfterName
+ if isinstance(annotation_a, DescriptionAnnotation) and isinstance(annotation_b, DescriptionAnnotation):
+ return annotation_a.newDescription == annotation_b.newDescription
+ if isinstance(annotation_a, EnumAnnotation) and isinstance(annotation_b, EnumAnnotation):
+ return annotation_a.enumName == annotation_b.enumName and set(annotation_a.pairs) == set(annotation_b.pairs)
+ if isinstance(annotation_a, ExpertAnnotation) and isinstance(annotation_b, ExpertAnnotation):
+ return True
+ if isinstance(annotation_a, GroupAnnotation) and isinstance(annotation_b, GroupAnnotation):
+ return annotation_a.groupName == annotation_b.groupName and set(annotation_a.parameters) == set(annotation_b.parameters)
+ if isinstance(annotation_a, MoveAnnotation) and isinstance(annotation_b, MoveAnnotation):
+ return annotation_a.destination == annotation_b.destination
+ if isinstance(annotation_a, RemoveAnnotation) and isinstance(annotation_b, RemoveAnnotation):
+ return True
+ if isinstance(annotation_a, RenameAnnotation) and isinstance(annotation_b, RenameAnnotation):
+ return annotation_a.newName == annotation_b.newName
+ if isinstance(annotation_a, TodoAnnotation) and isinstance(annotation_b, TodoAnnotation):
+ return annotation_a.newTodo == annotation_b
+ if isinstance(annotation_a, ValueAnnotation) and isinstance(annotation_b, ValueAnnotation):
+ if annotation_a.variant == annotation_b.variant:
+ if isinstance(annotation_a, ConstantAnnotation) and isinstance(annotation_b, ConstantAnnotation):
+ return annotation_a.defaultValue == annotation_b.defaultValue and annotation_a.defaultValueType == annotation_b.defaultValueType
+ if isinstance(annotation_a, OptionalAnnotation) and isinstance(annotation_b, OptionalAnnotation):
+ return annotation_a.defaultValue == annotation_b.defaultValue and annotation_a.defaultValueType == annotation_b.defaultValueType
+ if isinstance(annotation_a, OmittedAnnotation) and isinstance(annotation_b, OmittedAnnotation):
+ return True
+ if isinstance(annotation_a, RequiredAnnotation) and isinstance(annotation_b, RequiredAnnotation):
+ return True
+ return False
From 648a12e7f1608904b6cb6ad3ff9d59ce33ce9a7b Mon Sep 17 00:00:00 2001
From: aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Sat, 31 Dec 2022 19:29:23 +0100
Subject: [PATCH 14/40] fix linter errors
---
.../annotations/model/_annotations.py | 6 +--
.../processing/migration/_migrate.py | 39 +++++++++++--------
2 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/package-parser/package_parser/processing/annotations/model/_annotations.py b/package-parser/package_parser/processing/annotations/model/_annotations.py
index 0f7a6859d..582e6c951 100644
--- a/package-parser/package_parser/processing/annotations/model/_annotations.py
+++ b/package-parser/package_parser/processing/annotations/model/_annotations.py
@@ -88,7 +88,7 @@ def __eq__(self, other: Any) -> bool:
and self.isDiscrete == other.isDiscrete
and self.lowerIntervalLimit == other.lowerIntervalLimit
and isinstance(self.lowerIntervalLimit, type(self.lowerIntervalLimit))
- and self.lowerLimitType == other.lowerIntervalLimit
+ and self.lowerLimitType == other.lowerLimitType
and self.upperIntervalLimit == other.upperIntervalLimit
and isinstance(self.upperIntervalLimit, type(self.upperIntervalLimit))
and self.upperLimitType == self.upperLimitType
@@ -135,7 +135,7 @@ def to_json(self) -> dict:
def from_json(json: Any) -> EnumPair:
return EnumPair(json["stringValue"], json["instanceName"])
- def __eq__(self, other):
+ def __eq__(self, other: Any) -> bool:
return isinstance(other, EnumPair) and self.stringValue == other.stringValue and self.instanceName == other.instanceName
@@ -327,7 +327,7 @@ class ParameterInfo:
value: str
value_type: str
- def __init__(self, parameter_type, value="", value_type=""):
+ def __init__(self, parameter_type: ParameterType, value: str = "", value_type: str ="") -> None:
self.type = parameter_type
self.value = value
self.value_type = value_type
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 07bdb6706..7517225c6 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -21,7 +21,7 @@
migrate_value_annotation,
)
from package_parser.processing.migration.model import Mapping
-from typing import Optional, Tuple
+from typing import Optional, Tuple, Sequence
class Migration:
@@ -163,20 +163,21 @@ def add_annotations_based_on_similarity(
else:
self.unsure_annotation_store.add_annotation(annotation)
- def _remove_duplicates(self):
+ def _remove_duplicates(self) -> None:
duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
for annotation_store in [self.migrated_annotation_store, self.unsure_annotation_store]:
- for annotation_type_store in [annotation_store.boundaryAnnotations,
- annotation_store.calledAfterAnnotations,
- annotation_store.descriptionAnnotations,
- annotation_store.enumAnnotations,
- annotation_store.expertAnnotations,
- annotation_store.groupAnnotations,
- annotation_store.moveAnnotations,
- annotation_store.removeAnnotations,
- annotation_store.renameAnnotations,
- annotation_store.todoAnnotations,
- annotation_store.valueAnnotations]:
+ annotations_stores: Sequence[Sequence[AbstractAnnotation]] = [annotation_store.boundaryAnnotations,
+ annotation_store.calledAfterAnnotations,
+ annotation_store.descriptionAnnotations,
+ annotation_store.enumAnnotations,
+ annotation_store.expertAnnotations,
+ annotation_store.groupAnnotations,
+ annotation_store.moveAnnotations,
+ annotation_store.removeAnnotations,
+ annotation_store.renameAnnotations,
+ annotation_store.todoAnnotations,
+ annotation_store.valueAnnotations]
+ for annotation_type_store in annotations_stores:
for annotation_a in annotation_type_store:
for annotation_b in annotation_type_store:
if _are_semantic_equal(annotation_a, annotation_b):
@@ -186,8 +187,8 @@ def _remove_duplicates(self):
pass
-def _are_semantic_equal(annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation):
- # todo
+def _are_semantic_equal(annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation) -> bool:
+ # todo check for correctness
if annotation_a.target == annotation_b.target and isinstance(annotation_a, type(annotation_b)) and isinstance(annotation_b, type(annotation_a)):
if isinstance(annotation_a, BoundaryAnnotation) and isinstance(annotation_b, BoundaryAnnotation):
return annotation_a.interval == annotation_b.interval
@@ -196,7 +197,13 @@ def _are_semantic_equal(annotation_a: AbstractAnnotation, annotation_b: Abstract
if isinstance(annotation_a, DescriptionAnnotation) and isinstance(annotation_b, DescriptionAnnotation):
return annotation_a.newDescription == annotation_b.newDescription
if isinstance(annotation_a, EnumAnnotation) and isinstance(annotation_b, EnumAnnotation):
- return annotation_a.enumName == annotation_b.enumName and set(annotation_a.pairs) == set(annotation_b.pairs)
+ if annotation_a.enumName == annotation_b.enumName and len(annotation_a.pairs) == len(annotation_a.pairs):
+ list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
+ list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
+ for i in range(len(annotation_a.pairs)):
+ if list_a[i].stringValue != list_b[i].stringValue or list_b[i].instanceName != list_b[i].instanceName:
+ return False
+ return True
if isinstance(annotation_a, ExpertAnnotation) and isinstance(annotation_b, ExpertAnnotation):
return True
if isinstance(annotation_a, GroupAnnotation) and isinstance(annotation_b, GroupAnnotation):
From 5d8023fbd415e588ee405c77d0e5d95cb569c4a5 Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Sun, 1 Jan 2023 12:35:44 +0000
Subject: [PATCH 15/40] style: apply automated linter fixes
---
.../annotations/model/_annotations.py | 11 +-
.../processing/migration/_migrate.py | 149 +++++++++++++-----
2 files changed, 118 insertions(+), 42 deletions(-)
diff --git a/package-parser/package_parser/processing/annotations/model/_annotations.py b/package-parser/package_parser/processing/annotations/model/_annotations.py
index 582e6c951..e778f57f5 100644
--- a/package-parser/package_parser/processing/annotations/model/_annotations.py
+++ b/package-parser/package_parser/processing/annotations/model/_annotations.py
@@ -95,7 +95,6 @@ def __eq__(self, other: Any) -> bool:
)
-
@dataclass
class BoundaryAnnotation(AbstractAnnotation):
interval: Interval
@@ -136,7 +135,11 @@ def from_json(json: Any) -> EnumPair:
return EnumPair(json["stringValue"], json["instanceName"])
def __eq__(self, other: Any) -> bool:
- return isinstance(other, EnumPair) and self.stringValue == other.stringValue and self.instanceName == other.instanceName
+ return (
+ isinstance(other, EnumPair)
+ and self.stringValue == other.stringValue
+ and self.instanceName == other.instanceName
+ )
@dataclass
@@ -327,7 +330,9 @@ class ParameterInfo:
value: str
value_type: str
- def __init__(self, parameter_type: ParameterType, value: str = "", value_type: str ="") -> None:
+ def __init__(
+ self, parameter_type: ParameterType, value: str = "", value_type: str = ""
+ ) -> None:
self.type = parameter_type
self.value = value
self.value_type = value_type
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 7517225c6..47fb2edef 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,11 +1,25 @@
+from typing import Optional, Sequence, Tuple
+
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
- EnumReviewResult, BoundaryAnnotation, CalledAfterAnnotation, DescriptionAnnotation, EnumAnnotation,
- ExpertAnnotation, GroupAnnotation, MoveAnnotation, RemoveAnnotation, RenameAnnotation, TodoAnnotation,
- ValueAnnotation, ConstantAnnotation, OptionalAnnotation, OmittedAnnotation, RequiredAnnotation,
+ BoundaryAnnotation,
+ CalledAfterAnnotation,
+ ConstantAnnotation,
+ DescriptionAnnotation,
+ EnumAnnotation,
+ EnumReviewResult,
+ ExpertAnnotation,
+ GroupAnnotation,
+ MoveAnnotation,
+ OmittedAnnotation,
+ OptionalAnnotation,
+ RemoveAnnotation,
+ RenameAnnotation,
+ RequiredAnnotation,
+ TodoAnnotation,
+ ValueAnnotation,
)
-
from package_parser.processing.api.model import Attribute, Result
from package_parser.processing.migration.annotations import (
migrate_boundary_annotation,
@@ -21,7 +35,6 @@
migrate_value_annotation,
)
from package_parser.processing.migration.model import Mapping
-from typing import Optional, Tuple, Sequence
class Migration:
@@ -29,11 +42,13 @@ class Migration:
unsure_similarity: float
migrated_annotation_store: AnnotationStore = AnnotationStore()
unsure_annotation_store: AnnotationStore = AnnotationStore()
+
def __init__(
self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5
) -> None:
self.reliable_similarity = reliable_similarity
self.unsure_similarity = unsure_similarity
+
@staticmethod
def _get_mapping_from_annotation(
annotation: AbstractAnnotation, mappings: list[Mapping]
@@ -165,18 +180,23 @@ def add_annotations_based_on_similarity(
def _remove_duplicates(self) -> None:
duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
- for annotation_store in [self.migrated_annotation_store, self.unsure_annotation_store]:
- annotations_stores: Sequence[Sequence[AbstractAnnotation]] = [annotation_store.boundaryAnnotations,
- annotation_store.calledAfterAnnotations,
- annotation_store.descriptionAnnotations,
- annotation_store.enumAnnotations,
- annotation_store.expertAnnotations,
- annotation_store.groupAnnotations,
- annotation_store.moveAnnotations,
- annotation_store.removeAnnotations,
- annotation_store.renameAnnotations,
- annotation_store.todoAnnotations,
- annotation_store.valueAnnotations]
+ for annotation_store in [
+ self.migrated_annotation_store,
+ self.unsure_annotation_store,
+ ]:
+ annotations_stores: Sequence[Sequence[AbstractAnnotation]] = [
+ annotation_store.boundaryAnnotations,
+ annotation_store.calledAfterAnnotations,
+ annotation_store.descriptionAnnotations,
+ annotation_store.enumAnnotations,
+ annotation_store.expertAnnotations,
+ annotation_store.groupAnnotations,
+ annotation_store.moveAnnotations,
+ annotation_store.removeAnnotations,
+ annotation_store.renameAnnotations,
+ annotation_store.todoAnnotations,
+ annotation_store.valueAnnotations,
+ ]
for annotation_type_store in annotations_stores:
for annotation_a in annotation_type_store:
for annotation_b in annotation_type_store:
@@ -187,43 +207,94 @@ def _remove_duplicates(self) -> None:
pass
-def _are_semantic_equal(annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation) -> bool:
+def _are_semantic_equal(
+ annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation
+) -> bool:
# todo check for correctness
- if annotation_a.target == annotation_b.target and isinstance(annotation_a, type(annotation_b)) and isinstance(annotation_b, type(annotation_a)):
- if isinstance(annotation_a, BoundaryAnnotation) and isinstance(annotation_b, BoundaryAnnotation):
+ if (
+ annotation_a.target == annotation_b.target
+ and isinstance(annotation_a, type(annotation_b))
+ and isinstance(annotation_b, type(annotation_a))
+ ):
+ if isinstance(annotation_a, BoundaryAnnotation) and isinstance(
+ annotation_b, BoundaryAnnotation
+ ):
return annotation_a.interval == annotation_b.interval
- if isinstance(annotation_a, CalledAfterAnnotation) and isinstance(annotation_b, CalledAfterAnnotation):
+ if isinstance(annotation_a, CalledAfterAnnotation) and isinstance(
+ annotation_b, CalledAfterAnnotation
+ ):
return annotation_a.calledAfterName == annotation_b.calledAfterName
- if isinstance(annotation_a, DescriptionAnnotation) and isinstance(annotation_b, DescriptionAnnotation):
+ if isinstance(annotation_a, DescriptionAnnotation) and isinstance(
+ annotation_b, DescriptionAnnotation
+ ):
return annotation_a.newDescription == annotation_b.newDescription
- if isinstance(annotation_a, EnumAnnotation) and isinstance(annotation_b, EnumAnnotation):
- if annotation_a.enumName == annotation_b.enumName and len(annotation_a.pairs) == len(annotation_a.pairs):
+ if isinstance(annotation_a, EnumAnnotation) and isinstance(
+ annotation_b, EnumAnnotation
+ ):
+ if annotation_a.enumName == annotation_b.enumName and len(
+ annotation_a.pairs
+ ) == len(annotation_a.pairs):
list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
for i in range(len(annotation_a.pairs)):
- if list_a[i].stringValue != list_b[i].stringValue or list_b[i].instanceName != list_b[i].instanceName:
+ if (
+ list_a[i].stringValue != list_b[i].stringValue
+ or list_b[i].instanceName != list_b[i].instanceName
+ ):
return False
return True
- if isinstance(annotation_a, ExpertAnnotation) and isinstance(annotation_b, ExpertAnnotation):
+ if isinstance(annotation_a, ExpertAnnotation) and isinstance(
+ annotation_b, ExpertAnnotation
+ ):
return True
- if isinstance(annotation_a, GroupAnnotation) and isinstance(annotation_b, GroupAnnotation):
- return annotation_a.groupName == annotation_b.groupName and set(annotation_a.parameters) == set(annotation_b.parameters)
- if isinstance(annotation_a, MoveAnnotation) and isinstance(annotation_b, MoveAnnotation):
+ if isinstance(annotation_a, GroupAnnotation) and isinstance(
+ annotation_b, GroupAnnotation
+ ):
+ return annotation_a.groupName == annotation_b.groupName and set(
+ annotation_a.parameters
+ ) == set(annotation_b.parameters)
+ if isinstance(annotation_a, MoveAnnotation) and isinstance(
+ annotation_b, MoveAnnotation
+ ):
return annotation_a.destination == annotation_b.destination
- if isinstance(annotation_a, RemoveAnnotation) and isinstance(annotation_b, RemoveAnnotation):
+ if isinstance(annotation_a, RemoveAnnotation) and isinstance(
+ annotation_b, RemoveAnnotation
+ ):
return True
- if isinstance(annotation_a, RenameAnnotation) and isinstance(annotation_b, RenameAnnotation):
+ if isinstance(annotation_a, RenameAnnotation) and isinstance(
+ annotation_b, RenameAnnotation
+ ):
return annotation_a.newName == annotation_b.newName
- if isinstance(annotation_a, TodoAnnotation) and isinstance(annotation_b, TodoAnnotation):
+ if isinstance(annotation_a, TodoAnnotation) and isinstance(
+ annotation_b, TodoAnnotation
+ ):
return annotation_a.newTodo == annotation_b
- if isinstance(annotation_a, ValueAnnotation) and isinstance(annotation_b, ValueAnnotation):
+ if isinstance(annotation_a, ValueAnnotation) and isinstance(
+ annotation_b, ValueAnnotation
+ ):
if annotation_a.variant == annotation_b.variant:
- if isinstance(annotation_a, ConstantAnnotation) and isinstance(annotation_b, ConstantAnnotation):
- return annotation_a.defaultValue == annotation_b.defaultValue and annotation_a.defaultValueType == annotation_b.defaultValueType
- if isinstance(annotation_a, OptionalAnnotation) and isinstance(annotation_b, OptionalAnnotation):
- return annotation_a.defaultValue == annotation_b.defaultValue and annotation_a.defaultValueType == annotation_b.defaultValueType
- if isinstance(annotation_a, OmittedAnnotation) and isinstance(annotation_b, OmittedAnnotation):
+ if isinstance(annotation_a, ConstantAnnotation) and isinstance(
+ annotation_b, ConstantAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType
+ == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OptionalAnnotation) and isinstance(
+ annotation_b, OptionalAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType
+ == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OmittedAnnotation) and isinstance(
+ annotation_b, OmittedAnnotation
+ ):
return True
- if isinstance(annotation_a, RequiredAnnotation) and isinstance(annotation_b, RequiredAnnotation):
+ if isinstance(annotation_a, RequiredAnnotation) and isinstance(
+ annotation_b, RequiredAnnotation
+ ):
return True
return False
From 8d18bd5cb7f3e84fd146784e3680f9a869d3bfff Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Mon, 2 Jan 2023 17:25:49 +0100
Subject: [PATCH 16/40] remove duplicates
---
.../processing/migration/_migrate.py | 140 +++++++++---------
1 file changed, 72 insertions(+), 68 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 47fb2edef..5958d251a 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,4 +1,4 @@
-from typing import Optional, Sequence, Tuple
+from typing import Optional, Tuple
from package_parser.processing.annotations.model import (
AbstractAnnotation,
@@ -41,7 +41,7 @@ class Migration:
reliable_similarity: float
unsure_similarity: float
migrated_annotation_store: AnnotationStore = AnnotationStore()
- unsure_annotation_store: AnnotationStore = AnnotationStore()
+ unsure_migrated_annotation_store: AnnotationStore = AnnotationStore()
def __init__(
self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5
@@ -176,41 +176,49 @@ def add_annotations_based_on_similarity(
annotation.reviewResult = EnumReviewResult.UNSURE
self.migrated_annotation_store.add_annotation(annotation)
else:
- self.unsure_annotation_store.add_annotation(annotation)
+ self.unsure_migrated_annotation_store.add_annotation(annotation)
def _remove_duplicates(self) -> None:
- duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
- for annotation_store in [
- self.migrated_annotation_store,
- self.unsure_annotation_store,
+ for annotation_type in [
+ "boundaryAnnotations",
+ "calledAfterAnnotations",
+ "descriptionAnnotations",
+ "enumAnnotations",
+ "expertAnnotations",
+ "groupAnnotations",
+ "moveAnnotations",
+ "removeAnnotations",
+ "renameAnnotations",
+ "todoAnnotations",
+ "valueAnnotations",
]:
- annotations_stores: Sequence[Sequence[AbstractAnnotation]] = [
- annotation_store.boundaryAnnotations,
- annotation_store.calledAfterAnnotations,
- annotation_store.descriptionAnnotations,
- annotation_store.enumAnnotations,
- annotation_store.expertAnnotations,
- annotation_store.groupAnnotations,
- annotation_store.moveAnnotations,
- annotation_store.removeAnnotations,
- annotation_store.renameAnnotations,
- annotation_store.todoAnnotations,
- annotation_store.valueAnnotations,
- ]
- for annotation_type_store in annotations_stores:
- for annotation_a in annotation_type_store:
- for annotation_b in annotation_type_store:
- if _are_semantic_equal(annotation_a, annotation_b):
- duplicates.append((annotation_a, annotation_b))
+ duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
+ merged_annotation = [
+ annotation
+ for annotation_store in [self.migrated_annotation_store, self.unsure_migrated_annotation_store]
+ for annotation_list in getattr(annotation_store, annotation_type)
+ for annotation in annotation_list
+ ]
+
+ for annotation_a in merged_annotation:
+ for annotation_b in merged_annotation:
+ if annotation_a is annotation_b:
+ continue
+ if _are_semantic_equal(annotation_a, annotation_b):
+ duplicates.append((annotation_a, annotation_b))
for annotation_a, annotation_b in duplicates:
- # todo this
- pass
+ if annotation_a in getattr(self.migrated_annotation_store, annotation_type):
+ if annotation_b in getattr(self.migrated_annotation_store, annotation_type):
+ getattr(self.migrated_annotation_store, annotation_type).remove(annotation_b)
+ else:
+ getattr(self.unsure_migrated_annotation_store, annotation_type).remove(annotation_b)
+ else:
+ getattr(self.migrated_annotation_store, annotation_type).remove(annotation_a)
def _are_semantic_equal(
annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation
) -> bool:
- # todo check for correctness
if (
annotation_a.target == annotation_b.target
and isinstance(annotation_a, type(annotation_b))
@@ -230,19 +238,16 @@ def _are_semantic_equal(
return annotation_a.newDescription == annotation_b.newDescription
if isinstance(annotation_a, EnumAnnotation) and isinstance(
annotation_b, EnumAnnotation
- ):
- if annotation_a.enumName == annotation_b.enumName and len(
- annotation_a.pairs
- ) == len(annotation_a.pairs):
- list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
- list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
- for i in range(len(annotation_a.pairs)):
- if (
- list_a[i].stringValue != list_b[i].stringValue
- or list_b[i].instanceName != list_b[i].instanceName
- ):
- return False
- return True
+ ) and annotation_a.enumName == annotation_b.enumName and len(annotation_a.pairs) == len(annotation_a.pairs):
+ list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
+ list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
+ for i in range(len(annotation_a.pairs)):
+ if (
+ list_a[i].stringValue != list_b[i].stringValue
+ or list_a[i].instanceName != list_b[i].instanceName
+ ):
+ return False
+ return True
if isinstance(annotation_a, ExpertAnnotation) and isinstance(
annotation_b, ExpertAnnotation
):
@@ -268,33 +273,32 @@ def _are_semantic_equal(
if isinstance(annotation_a, TodoAnnotation) and isinstance(
annotation_b, TodoAnnotation
):
- return annotation_a.newTodo == annotation_b
+ return annotation_a.newTodo == annotation_b.newTodo
if isinstance(annotation_a, ValueAnnotation) and isinstance(
annotation_b, ValueAnnotation
- ):
- if annotation_a.variant == annotation_b.variant:
- if isinstance(annotation_a, ConstantAnnotation) and isinstance(
- annotation_b, ConstantAnnotation
- ):
- return (
- annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType
- == annotation_b.defaultValueType
- )
- if isinstance(annotation_a, OptionalAnnotation) and isinstance(
- annotation_b, OptionalAnnotation
- ):
- return (
- annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType
- == annotation_b.defaultValueType
- )
- if isinstance(annotation_a, OmittedAnnotation) and isinstance(
- annotation_b, OmittedAnnotation
- ):
- return True
- if isinstance(annotation_a, RequiredAnnotation) and isinstance(
- annotation_b, RequiredAnnotation
- ):
- return True
+ ) and annotation_a.variant == annotation_b.variant:
+ if isinstance(annotation_a, ConstantAnnotation) and isinstance(
+ annotation_b, ConstantAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType
+ == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OptionalAnnotation) and isinstance(
+ annotation_b, OptionalAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType
+ == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OmittedAnnotation) and isinstance(
+ annotation_b, OmittedAnnotation
+ ):
+ return True
+ if isinstance(annotation_a, RequiredAnnotation) and isinstance(
+ annotation_b, RequiredAnnotation
+ ):
+ return True
return False
From e2254e921675a43862dd3c9a8f1bba5541af8f1c Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Mon, 2 Jan 2023 16:29:13 +0000
Subject: [PATCH 17/40] style: apply automated linter fixes
---
.../processing/migration/_migrate.py | 46 ++++++++++++-------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 5958d251a..9abdac7a2 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -195,10 +195,13 @@ def _remove_duplicates(self) -> None:
duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
merged_annotation = [
annotation
- for annotation_store in [self.migrated_annotation_store, self.unsure_migrated_annotation_store]
+ for annotation_store in [
+ self.migrated_annotation_store,
+ self.unsure_migrated_annotation_store,
+ ]
for annotation_list in getattr(annotation_store, annotation_type)
for annotation in annotation_list
- ]
+ ]
for annotation_a in merged_annotation:
for annotation_b in merged_annotation:
@@ -208,12 +211,20 @@ def _remove_duplicates(self) -> None:
duplicates.append((annotation_a, annotation_b))
for annotation_a, annotation_b in duplicates:
if annotation_a in getattr(self.migrated_annotation_store, annotation_type):
- if annotation_b in getattr(self.migrated_annotation_store, annotation_type):
- getattr(self.migrated_annotation_store, annotation_type).remove(annotation_b)
+ if annotation_b in getattr(
+ self.migrated_annotation_store, annotation_type
+ ):
+ getattr(self.migrated_annotation_store, annotation_type).remove(
+ annotation_b
+ )
else:
- getattr(self.unsure_migrated_annotation_store, annotation_type).remove(annotation_b)
+ getattr(
+ self.unsure_migrated_annotation_store, annotation_type
+ ).remove(annotation_b)
else:
- getattr(self.migrated_annotation_store, annotation_type).remove(annotation_a)
+ getattr(self.migrated_annotation_store, annotation_type).remove(
+ annotation_a
+ )
def _are_semantic_equal(
@@ -236,9 +247,12 @@ def _are_semantic_equal(
annotation_b, DescriptionAnnotation
):
return annotation_a.newDescription == annotation_b.newDescription
- if isinstance(annotation_a, EnumAnnotation) and isinstance(
- annotation_b, EnumAnnotation
- ) and annotation_a.enumName == annotation_b.enumName and len(annotation_a.pairs) == len(annotation_a.pairs):
+ if (
+ isinstance(annotation_a, EnumAnnotation)
+ and isinstance(annotation_b, EnumAnnotation)
+ and annotation_a.enumName == annotation_b.enumName
+ and len(annotation_a.pairs) == len(annotation_a.pairs)
+ ):
list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
for i in range(len(annotation_a.pairs)):
@@ -274,24 +288,24 @@ def _are_semantic_equal(
annotation_b, TodoAnnotation
):
return annotation_a.newTodo == annotation_b.newTodo
- if isinstance(annotation_a, ValueAnnotation) and isinstance(
- annotation_b, ValueAnnotation
- ) and annotation_a.variant == annotation_b.variant:
+ if (
+ isinstance(annotation_a, ValueAnnotation)
+ and isinstance(annotation_b, ValueAnnotation)
+ and annotation_a.variant == annotation_b.variant
+ ):
if isinstance(annotation_a, ConstantAnnotation) and isinstance(
annotation_b, ConstantAnnotation
):
return (
annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType
- == annotation_b.defaultValueType
+ and annotation_a.defaultValueType == annotation_b.defaultValueType
)
if isinstance(annotation_a, OptionalAnnotation) and isinstance(
annotation_b, OptionalAnnotation
):
return (
annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType
- == annotation_b.defaultValueType
+ and annotation_a.defaultValueType == annotation_b.defaultValueType
)
if isinstance(annotation_a, OmittedAnnotation) and isinstance(
annotation_b, OmittedAnnotation
From f9fdbb130dcec51365ee2110a4d507a1958559a5 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Mon, 2 Jan 2023 17:42:07 +0100
Subject: [PATCH 18/40] fix errors
---
.../package_parser/processing/migration/_migrate.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 9abdac7a2..51080e8f9 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -193,18 +193,17 @@ def _remove_duplicates(self) -> None:
"valueAnnotations",
]:
duplicates: list[Tuple[AbstractAnnotation, AbstractAnnotation]] = []
- merged_annotation = [
+ migrated_annotations = [
annotation
for annotation_store in [
self.migrated_annotation_store,
self.unsure_migrated_annotation_store,
]
- for annotation_list in getattr(annotation_store, annotation_type)
- for annotation in annotation_list
+ for annotation in getattr(annotation_store, annotation_type)
]
- for annotation_a in merged_annotation:
- for annotation_b in merged_annotation:
+ for annotation_a in migrated_annotations:
+ for annotation_b in migrated_annotations:
if annotation_a is annotation_b:
continue
if _are_semantic_equal(annotation_a, annotation_b):
From 7f1613a221bfb5885cd5c29153d9acb8e98c3c74 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Mon, 2 Jan 2023 19:45:03 +0100
Subject: [PATCH 19/40] add tests for duplicates
---
.../processing/migration/_migrate.py | 49 ++--
.../annotations/test_boundary_migration.py | 83 +++++-
.../test_called_after_migration.py | 95 ++++++-
.../annotations/test_description_migration.py | 71 +++++-
.../annotations/test_enum_migration.py | 65 ++++-
.../annotations/test_expert_migration.py | 68 ++++-
.../annotations/test_group_annotation.py | 178 ++++++++++++-
.../annotations/test_move_migration.py | 71 +++++-
.../annotations/test_remove_migration.py | 66 +++++
.../annotations/test_rename_migration.py | 61 +++++
.../annotations/test_todo_migration.py | 62 ++++-
.../annotations/test_value_migration.py | 239 +++++++++++++++++-
.../processing/migration/test_migration.py | 41 ++-
13 files changed, 1108 insertions(+), 41 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 51080e8f9..08b4514f2 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -202,28 +202,33 @@ def _remove_duplicates(self) -> None:
for annotation in getattr(annotation_store, annotation_type)
]
- for annotation_a in migrated_annotations:
- for annotation_b in migrated_annotations:
- if annotation_a is annotation_b:
- continue
- if _are_semantic_equal(annotation_a, annotation_b):
- duplicates.append((annotation_a, annotation_b))
- for annotation_a, annotation_b in duplicates:
- if annotation_a in getattr(self.migrated_annotation_store, annotation_type):
- if annotation_b in getattr(
- self.migrated_annotation_store, annotation_type
- ):
- getattr(self.migrated_annotation_store, annotation_type).remove(
- annotation_b
- )
- else:
- getattr(
- self.unsure_migrated_annotation_store, annotation_type
- ).remove(annotation_b)
- else:
- getattr(self.migrated_annotation_store, annotation_type).remove(
- annotation_a
- )
+ for annotation_a in migrated_annotations:
+ for annotation_b in migrated_annotations:
+ if annotation_a is annotation_b:
+ continue
+ if _are_semantic_equal(annotation_a, annotation_b) and (annotation_b, annotation_a) not in duplicates:
+ duplicates.append((annotation_a, annotation_b))
+ for annotation_a, annotation_b in duplicates:
+ b_in_migrated_annotation_store = annotation_b in getattr(self.migrated_annotation_store, annotation_type)
+ b_in_unsure_annotation_store = annotation_b in getattr(self.unsure_migrated_annotation_store, annotation_type)
+ if annotation_a in getattr(self.migrated_annotation_store, annotation_type):
+ if b_in_migrated_annotation_store:
+ getattr(self.migrated_annotation_store, annotation_type).remove(
+ annotation_b
+ )
+ if b_in_unsure_annotation_store:
+ getattr(
+ self.unsure_migrated_annotation_store, annotation_type
+ ).remove(annotation_b)
+ if annotation_a in getattr(self.unsure_migrated_annotation_store, annotation_type):
+ if b_in_migrated_annotation_store:
+ getattr(self.migrated_annotation_store, annotation_type).remove(
+ annotation_b
+ )
+ if b_in_unsure_annotation_store:
+ getattr(
+ self.unsure_migrated_annotation_store, annotation_type
+ ).remove(annotation_b)
def _are_semantic_equal(
diff --git a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
index f166fecad..d40236975 100644
--- a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
@@ -14,7 +14,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -321,3 +321,84 @@ def migrate_boundary_annotation_data_one_to_many_mapping() -> Tuple[
migrated_boundary_annotation_c,
],
)
+
+
+def migrate_boundary_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.boundary.duplicate.testA",
+ name="testA",
+ qname="test.boundary.duplicate.testA",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.boundary.duplicate.testA_2",
+ name="testA_2",
+ qname="test.boundary.duplicate.testA_2",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.boundary.duplicate.testB",
+ name="testB",
+ qname="test.boundary.duplicate.testB",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", ""),
+ )
+ boundary_annotation = BoundaryAnnotation(
+ target="test/test.boundary.duplicate.testA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ interval=Interval(
+ isDiscrete=True,
+ lowerIntervalLimit=0,
+ lowerLimitType=1,
+ upperIntervalLimit=10,
+ upperLimitType=1,
+ ),
+ )
+ boundary_annotation_2 = BoundaryAnnotation(
+ target="test/test.boundary.duplicate.testA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ interval=Interval(
+ isDiscrete=True,
+ lowerIntervalLimit=0,
+ lowerLimitType=1,
+ upperIntervalLimit=10,
+ upperLimitType=1,
+ ),
+ )
+ migrated_boundary_annotation = BoundaryAnnotation(
+ target="test/test.boundary.duplicate.testB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ interval=Interval(
+ isDiscrete=True,
+ lowerIntervalLimit=0,
+ lowerLimitType=1,
+ upperIntervalLimit=10,
+ upperLimitType=1,
+ ),
+ )
+ return (
+ ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2),
+ [boundary_annotation, boundary_annotation_2],
+ [migrated_boundary_annotation],
+ )
diff --git a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
index 42bb45f95..22c1724e5 100644
--- a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
@@ -10,7 +10,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -424,3 +424,96 @@ def migrate_called_after_annotation_data_one_to_many_mapping__two_classes() -> T
annotationv1,
[annotationv2_a, annotationv2_b],
)
+
+
+def migrate_called_after_annotation_data_duplicated() -> Tuple[
+ list[Mapping],
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ functionv1_after = Function(
+ id="test/test.called_after.duplicate.test/OldClass/test_after",
+ qname="test.called_after.duplicate.test.OldClass.test_after",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_after_2 = Function(
+ id="test/test.called_after.duplicate.test/OldClass/test_after_2",
+ qname="test.called_after.duplicate.test.OldClass.test_after_2",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_before = Function(
+ id="test/test.called_after.duplicate.test/OldClass/test_before",
+ qname="test.called_after.duplicate.test.OldClass.test_before",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv2_after = Function(
+ id="test/test.called_after.duplicate.test/NewClass/new_test_after",
+ qname="test.called_after.duplicate.test.NewClass.new_test_after",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv2_before = Function(
+ id="test/test.called_after.duplicate.test/NewClass/new_test_before",
+ qname="test.called_after.duplicate.test.NewClass.new_test_before",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ mapping_after = ManyToOneMapping(
+ 1.0, [functionv1_after, functionv1_after_2], functionv2_after
+ )
+ mapping_before = OneToManyMapping(
+ 1.0, functionv1_before, [functionv2_before]
+ )
+ annotationv1 = CalledAfterAnnotation(
+ target="test/test.called_after.duplicate.test/OldClass/test_after",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ calledAfterName="test_before",
+ )
+ annotationv1_2 = CalledAfterAnnotation(
+ target="test/test.called_after.duplicate.test/OldClass/test_after_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ calledAfterName="test_before",
+ )
+ annotationv2 = CalledAfterAnnotation(
+ target="test/test.called_after.duplicate.test/NewClass/new_test_after",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ calledAfterName="new_test_before",
+ )
+ return [mapping_after, mapping_before], [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_description_migration.py b/package-parser/tests/processing/migration/annotations/test_description_migration.py
index 51fb412ac..0d27f5681 100644
--- a/package-parser/tests/processing/migration/annotations/test_description_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_description_migration.py
@@ -18,7 +18,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -210,3 +210,72 @@ def migrate_description_annotation_data_one_to_one_mapping__parameter() -> Tuple
newDescription="test description",
)
return mapping, annotationv1, [annotationv2]
+
+
+def migrate_description_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ functionv1 = Function(
+ id="test/test.description.duplicate.test/test",
+ qname="test.description.duplicate.test.test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_2 = Function(
+ id="test/test.description.duplicate.test/test_2",
+ qname="test.description.duplicate.test.test_2",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ functionv2 = Function(
+ id="test/test.description.duplicate.test/new_test",
+ qname="test.description.duplicate.test.new_test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ mapping = ManyToOneMapping(1.0, [functionv1, functionv1_2], functionv2)
+
+ annotationv1 = DescriptionAnnotation(
+ target="test/test.description.duplicate.test/test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newDescription="lightbringer",
+ )
+ annotationv1_2 = DescriptionAnnotation(
+ target="test/test.description.duplicate.test/test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newDescription="lightbringer",
+ )
+ annotationv2 = DescriptionAnnotation(
+ target="test/test.description.duplicate.test/new_test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newDescription="lightbringer",
+ )
+ return mapping, [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index b37353f8c..21f657ce4 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -15,7 +15,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -211,3 +211,66 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
enum_annotation,
[migrated_enum_annotation, migrated_todo_annotation],
)
+
+
+def migrate_enum_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.enum.duplicate.TestA",
+ name="TestA",
+ qname="test.enum.duplicate.TestA",
+ default_value="value",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "value", "docstring"),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.enum.duplicate.TestA_2",
+ name="TestA_2",
+ qname="test.enum.duplicate.TestA_2",
+ default_value="value",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "value", "docstring"),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.enum.duplicate.TestB",
+ name="TestB",
+ qname="test.enum.duplicate.TestB",
+ default_value="value",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "value", "docstring"),
+ )
+ mapping = ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2)
+ enum_annotation = EnumAnnotation(
+ target="test/test.enum.duplicate.TestA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ enumName="EnumName",
+ pairs=[EnumPair("value", "name")],
+ )
+ enum_annotation_2 = EnumAnnotation(
+ target="test/test.enum.duplicate.TestA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ enumName="EnumName",
+ pairs=[EnumPair("value", "name")],
+ )
+ migrated_enum_annotation = EnumAnnotation(
+ target="test/test.enum.duplicate.TestB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ enumName="EnumName",
+ pairs=[EnumPair("value", "name")],
+ )
+ return mapping, [enum_annotation, enum_annotation_2], [migrated_enum_annotation]
diff --git a/package-parser/tests/processing/migration/annotations/test_expert_migration.py b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
index b72b865fd..b4958618f 100644
--- a/package-parser/tests/processing/migration/annotations/test_expert_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
@@ -18,7 +18,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -181,3 +181,69 @@ def migrate_expert_annotation_data__parameter() -> Tuple[
reviewResult=EnumReviewResult.NONE,
)
return mapping, annotationv1, [annotationv2]
+
+
+def migrate_expert_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ functionv1 = Function(
+ id="test/test.expert.duplicate.test/test",
+ qname="test.expert.duplicate.test.test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_2 = Function(
+ id="test/test.expert.duplicate.test/test_2",
+ qname="test.expert.duplicate.test.test_2",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ functionv2 = Function(
+ id="test/test.expert.duplicate.test/new_test",
+ qname="test.expert.duplicate.test.new_test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ mapping = ManyToOneMapping(1.0, [functionv1, functionv1_2], functionv2)
+
+ annotationv1 = ExpertAnnotation(
+ target="test/test.expert.duplicate.test/test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv1_2 = ExpertAnnotation(
+ target="test/test.expert.duplicate.test/test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv2 = ExpertAnnotation(
+ target="test/test.expert.duplicate.test/new_test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ return mapping, [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_group_annotation.py b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
index dca1b5e08..de146b4bc 100644
--- a/package-parser/tests/processing/migration/annotations/test_group_annotation.py
+++ b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
@@ -19,7 +19,7 @@
ManyToManyMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -508,3 +508,179 @@ def migrate_group_annotation_data_one_to_one_mapping__one_mapping_for_parameters
annotation,
[migrated_annotation],
)
+
+
+def migrate_group_annotation_data_duplicated() -> Tuple[
+ list[Mapping],
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1_a = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test/parameter_a",
+ name="parameter_a",
+ qname="test.group.duplicate.test.TestClass.test.parameter_a",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", "int in the range of (0, 10)"),
+ )
+ parameterv1_b = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test/parameter_b",
+ name="parameter_b",
+ qname="test.group.duplicate.test.TestClass.test.parameter_b",
+ default_value="'test'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test'", "str"),
+ )
+ parameterv1_c = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test/parameter_c",
+ name="parameter_c",
+ qname="test.group.duplicate.test.TestClass.test.parameter_c",
+ default_value="'test_c'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test_c'", "str"),
+ )
+ parameterv1_a_2 = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test_2/parameter_a_2",
+ name="parameter_a_2",
+ qname="test.group.duplicate.test.TestClass.test_2.parameter_a_2",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", "int in the range of (0, 10)"),
+ )
+ parameterv1_b_2 = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test_2/parameter_b_2",
+ name="parameter_b_2",
+ qname="test.group.duplicate.test.TestClass.test_2.parameter_b_2",
+ default_value="'test'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test'", "str"),
+ )
+ parameterv1_c_2 = Parameter(
+ id_="test/test.group.duplicate.test/TestClass/test_2/parameter_c_2",
+ name="parameter_c_2",
+ qname="test.group.duplicate.test.TestClass.test_2.parameter_c_2",
+ default_value="'test_c'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test_c'", "str"),
+ )
+ functionv1 = Function(
+ id="test/test.group.duplicate.test/TestClass/test",
+ qname="test.group.duplicate.test.TestClass.test",
+ decorators=[],
+ parameters=[parameterv1_a, parameterv1_b, parameterv1_c],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_2 = Function(
+ id="test/test.group.duplicate.test/TestClass/test_2",
+ qname="test.group.duplicate.test.TestClass.test_2",
+ decorators=[],
+ parameters=[parameterv1_a_2, parameterv1_b_2, parameterv1_c_2],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ parameterv2_a = Parameter(
+ id_="test/test.group.duplicate.test/NewTestClass/test/new_parameter_a",
+ name="new_parameter_a",
+ qname="test.group.duplicate.test.NewTestClass.test.new_parameter_a",
+ default_value="1",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("int", "1", "int in the range of (0, 10)"),
+ )
+ parameterv2_b = Parameter(
+ id_="test/test.group.duplicate.test/NewTestClass/test/new_parameter_b",
+ name="new_parameter_b",
+ qname="test.group.duplicate.test.NewTestClass.test.new_parameter_b",
+ default_value="'test'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test'", "str"),
+ )
+ parameterv2_c = Parameter(
+ id_="test/test.group.duplicate.test/NewTestClass/test/new_parameter_c",
+ name="new_parameter_c",
+ qname="test.group.duplicate.test.NewTestClass.test.new_parameter_c",
+ default_value="'test_c'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test_c'", "str"),
+ )
+ functionv2 = Function(
+ id="test/test.group.duplicate.test/NewTestClass/test",
+ qname="test.group.duplicate.test.NewTestClass.test",
+ decorators=[],
+ parameters=[parameterv2_a, parameterv2_b, parameterv2_c],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ mapping_function = ManyToOneMapping(
+ 1.0,
+ [functionv1, functionv1_2],
+ functionv2,
+ )
+ mapping_parameter_a = ManyToOneMapping(
+ 1.0, [parameterv1_a, parameterv1_a_2], parameterv2_a
+ )
+ mapping_parameter_b = ManyToOneMapping(
+ 1.0, [parameterv1_b, parameterv1_b_2], parameterv2_b
+ )
+ mapping_parameter_c = ManyToOneMapping(
+ 1.0, [parameterv1_c, parameterv1_c_2], parameterv2_c
+ )
+ annotation = GroupAnnotation(
+ target="test/test.group.duplicate.test/TestClass/test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ groupName="GroupName",
+ parameters=["parameter_a", "parameter_b", "parameter_c"],
+ )
+ annotation_2 = GroupAnnotation(
+ target="test/test.group.duplicate.test/TestClass/test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ groupName="GroupName",
+ parameters=["parameter_a_2", "parameter_b_2", "parameter_c_2"],
+ )
+ migrated_annotation_1 = GroupAnnotation(
+ target="test/test.group.duplicate.test/NewTestClass/test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ groupName="GroupName",
+ parameters=["new_parameter_a", "new_parameter_b", "new_parameter_c"],
+ )
+ return (
+ [
+ mapping_function,
+ mapping_parameter_a,
+ mapping_parameter_b,
+ mapping_parameter_c,
+ ],
+ [annotation, annotation_2],
+ [
+ migrated_annotation_1
+ ],
+ )
diff --git a/package-parser/tests/processing/migration/annotations/test_move_migration.py b/package-parser/tests/processing/migration/annotations/test_move_migration.py
index 6fd9a43c7..44a521e91 100644
--- a/package-parser/tests/processing/migration/annotations/test_move_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_move_migration.py
@@ -15,7 +15,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -193,3 +193,72 @@ def migrate_move_annotation_data_one_to_many_mapping() -> Tuple[
newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b]
+
+
+def migrate_move_annotation_data_one_to_one_mapping_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ functionv1 = Function(
+ id="test/test.move.duplicate.test/test",
+ qname="test.move.duplicate.test.test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_2 = Function(
+ id="test/test.move.duplicate.test/test_2",
+ qname="test.move.duplicate.test.test_2",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ functionv2 = Function(
+ id="test/test.move.duplicate.test/new_test",
+ qname="test.move.duplicate.test.new_test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ mapping = ManyToOneMapping(1.0, [functionv1, functionv1_2], functionv2)
+
+ annotationv1 = MoveAnnotation(
+ target="test/test.move.duplicate.test/test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ destination="test.move.duplicate.destination",
+ )
+ annotationv1_2 = MoveAnnotation(
+ target="test/test.move.duplicate.test/test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ destination="test.move.duplicate.destination",
+ )
+ annotationv2 = MoveAnnotation(
+ target="test/test.move.duplicate.test/new_test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ destination="test.move.duplicate.destination",
+ )
+ return mapping, [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_remove_migration.py b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
index 9e1d6e1c3..cf61b7c8f 100644
--- a/package-parser/tests/processing/migration/annotations/test_remove_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
@@ -156,3 +156,69 @@ def migrate_remove_annotation_data_one_to_many_mapping() -> Tuple[
newTodo=get_migration_text(annotationv1, mapping, for_todo_annotation=True),
)
return mapping, annotationv1, [annotationv2_a, annotationv2_b, annotationv2_c]
+
+
+def migrate_remove_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ functionv1 = Function(
+ id="test/test.remove.duplicate.test/test",
+ qname="test.remove.duplicate.test.test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+ functionv1_2 = Function(
+ id="test/test.remove.duplicate.test/test_2",
+ qname="test.remove.duplicate.test.test_2",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ functionv2 = Function(
+ id="test/test.remove.duplicate.test/new_test",
+ qname="test.remove.duplicate.test.new_test",
+ decorators=[],
+ parameters=[],
+ results=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=FunctionDocumentation("", ""),
+ code="",
+ )
+
+ mapping = OneToOneMapping(1.0, functionv1, functionv2)
+
+ annotationv1 = RemoveAnnotation(
+ target="test/test.remove.duplicate.test/test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv1_2 = RemoveAnnotation(
+ target="test/test.remove.duplicate.test/test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv2 = RemoveAnnotation(
+ target="test/test.remove.duplicate.test/new_test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ return mapping, [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index e25abfb5c..98f123476 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -11,6 +11,7 @@
ParameterAssignment,
ParameterDocumentation,
)
+from package_parser.processing.migration import ManyToOneMapping
from package_parser.processing.migration.annotations import (
get_migration_text,
migration_author,
@@ -180,3 +181,63 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
annotationv1,
[annotationv2_a, annotationv2_b],
)
+
+
+def migrate_rename_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.rename.duplicate.Test_",
+ name="Test",
+ qname="test.rename.duplicate.Test_",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("", "", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.rename.duplicate.Test_2",
+ name="Test",
+ qname="test.rename.duplicate.Test_2",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("", "", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.rename.duplicate.TestB",
+ name="TestB",
+ qname="test.rename.duplicate.TestB",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("", "", ""),
+ )
+ mappings = ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2)
+ annotationv1 = RenameAnnotation(
+ target="test/test.rename.duplicate.Test_",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newName="TestE",
+ )
+ annotationv1_2 = RenameAnnotation(
+ target="test/test.rename.duplicate.Test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newName="TestE",
+ )
+ annotationv2 = RenameAnnotation(
+ target="test/test.rename.duplicate.TestB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newName="TestE",
+ )
+ return mappings, [annotationv1, annotationv1_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_todo_migration.py b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
index 8b28d0180..a66d52aba 100644
--- a/package-parser/tests/processing/migration/annotations/test_todo_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
@@ -12,7 +12,7 @@
ParameterAssignment,
ParameterDocumentation,
)
-from package_parser.processing.migration import ManyToManyMapping
+from package_parser.processing.migration import ManyToManyMapping, ManyToOneMapping
from package_parser.processing.migration.annotations import (
get_migration_text,
migration_author,
@@ -29,7 +29,7 @@ def migrate_todo_annotation_data_one_to_one_mapping() -> Tuple[
]:
parameterv1 = Parameter(
id_="test/test.todo.test1.Test",
- name="Test1",
+ name="Test",
qname="test.todo.test1.Test",
default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
@@ -216,3 +216,61 @@ def migrate_todo_annotation_data_many_to_many_mapping() -> Tuple[
annotationv1,
[annotationv2_a, annotationv2_b, annotationv2_class],
)
+
+
+def migrate_todo_annotation_data_duplicated() -> Tuple[
+ Mapping, list[AbstractAnnotation], list[AbstractAnnotation]
+]:
+ parameterv1 = Parameter(
+ id_="test/test.todo.duplicate.Test",
+ name="Test",
+ qname="test.todo.duplicate.Test",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.todo.duplicate.Test_2",
+ name="Test_2",
+ qname="test.todo.duplicate.Test_2",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.todo.duplicate.Test",
+ name="Test",
+ qname="test.todo.duplicate.Test",
+ default_value=None,
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "", ""),
+ )
+ mappings = ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2)
+ annotationsv1 = TodoAnnotation(
+ target="test/test.todo.duplicate.Test",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newTodo="todo",
+ )
+ annotationsv1_2 = TodoAnnotation(
+ target="test/test.todo.duplicate.Test_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newTodo="todo",
+ )
+ annotationsv2 = TodoAnnotation(
+ target="test/test.todo.duplicate.Test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ newTodo="todo",
+ )
+ return mappings, [annotationsv1, annotationsv1_2], [annotationsv2]
diff --git a/package-parser/tests/processing/migration/annotations/test_value_migration.py b/package-parser/tests/processing/migration/annotations/test_value_migration.py
index 80ab1a6f1..aeb632c9d 100644
--- a/package-parser/tests/processing/migration/annotations/test_value_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_value_migration.py
@@ -20,7 +20,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -693,3 +693,240 @@ def migrate_omitted_annotation_data_one_to_many_mapping() -> Tuple[
annotationv2_e,
],
)
+
+
+def migrate_constant_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.value.duplicate.testA",
+ name="testA",
+ qname="test.value.duplicate.testA",
+ default_value="'this is a string'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "this is a string", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.value.duplicate.testA_2",
+ name="testA_2",
+ qname="test.value.duplicate.testA_2",
+ default_value="'this is a string'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "this is a string", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.value.duplicate.testB",
+ name="testB",
+ qname="test.value.duplicate.testB",
+ default_value="'test string'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test string'", ""),
+ )
+ mapping = ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2)
+ annotation = ConstantAnnotation(
+ target="test/test.value.duplicate.testA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ defaultValueType=ValueAnnotation.DefaultValueType.STRING,
+ defaultValue="This is a string",
+ )
+ annotation_2 = ConstantAnnotation(
+ target="test/test.value.duplicate.testA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ defaultValueType=ValueAnnotation.DefaultValueType.STRING,
+ defaultValue="This is a string",
+ )
+ annotationv2 = ConstantAnnotation(
+ target="test/test.value.duplicate.testB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment=get_migration_text(annotation, mapping),
+ reviewResult=EnumReviewResult.UNSURE,
+ defaultValueType=ValueAnnotation.DefaultValueType.STRING,
+ defaultValue="This is a string",
+ )
+ return mapping, [annotation, annotation_2], [annotationv2]
+
+
+def migrate_omitted_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.value.duplicate2.testA",
+ name="testA",
+ qname="test.value.duplicate2.testA",
+ default_value="True",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "True", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.value.duplicate2.testA_2",
+ name="testA_2",
+ qname="test.value.duplicate2.testA_2",
+ default_value="True",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "True", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.value.duplicate2.testB",
+ name="testB",
+ qname="test.value.duplicate2.testB",
+ default_value="True",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "True", ""),
+ )
+ annotation = OmittedAnnotation(
+ target="test/test.value.duplicate2.testA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotation_2 = OmittedAnnotation(
+ target="test/test.value.duplicate2.testA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv2 = OmittedAnnotation(
+ target="test/test.value.duplicate2.testB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
+
+
+def migrate_optional_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.value.duplicate3.testA",
+ name="testA",
+ qname="test.value.duplicate3.testA",
+ default_value="True",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "True", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.value.duplicate3.testA_2",
+ name="testA_2",
+ qname="test.value.duplicate3.testA_2",
+ default_value="True",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "True", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.value.duplicate3.testB",
+ name="testB",
+ qname="test.value.duplicate3.testB",
+ default_value="False",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("bool", "False", ""),
+ )
+ annotation = OptionalAnnotation(
+ target="test/test.value.duplicate3.testA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ defaultValueType=ValueAnnotation.DefaultValueType.BOOLEAN,
+ defaultValue="True",
+ )
+ annotation_2 = OptionalAnnotation(
+ target="test/test.value.duplicate3.testA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ defaultValueType=ValueAnnotation.DefaultValueType.BOOLEAN,
+ defaultValue="True",
+ )
+ annotationv2 = OptionalAnnotation(
+ target="test/test.value.duplicate3.testB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ defaultValueType=ValueAnnotation.DefaultValueType.BOOLEAN,
+ defaultValue="True",
+ )
+ return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
+
+
+def migrate_required_annotation_data_duplicated() -> Tuple[
+ Mapping,
+ list[AbstractAnnotation],
+ list[AbstractAnnotation],
+]:
+ parameterv1 = Parameter(
+ id_="test/test.value.duplicate4.testA",
+ name="testA",
+ qname="test.value.duplicate4.testA",
+ default_value="'test'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test'", ""),
+ )
+ parameterv1_2 = Parameter(
+ id_="test/test.value.duplicate4.testA_2",
+ name="testA_2",
+ qname="test.value.duplicate4.testA_2",
+ default_value="'test'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test'", ""),
+ )
+ parameterv2 = Parameter(
+ id_="test/test.value.duplicate4.testB",
+ name="testB",
+ qname="test.value.duplicate4.testB",
+ default_value="'test_string'",
+ assigned_by=ParameterAssignment.POSITION_OR_NAME,
+ is_public=True,
+ documentation=ParameterDocumentation("str", "'test_string'", ""),
+ )
+ annotation = RequiredAnnotation(
+ target="test/test.value.duplicate4.testA",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotation_2 = RequiredAnnotation(
+ target="test/test.value.duplicate4.testA_2",
+ authors=["testauthor"],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ annotationv2 = RequiredAnnotation(
+ target="test/test.value.duplicate4.testB",
+ authors=["testauthor", migration_author],
+ reviewers=[],
+ comment="",
+ reviewResult=EnumReviewResult.NONE,
+ )
+ return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 6063b1d4e..2565fb7da 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -8,7 +8,7 @@
migrate_boundary_annotation_data_one_to_many_mapping,
migrate_boundary_annotation_data_one_to_one_mapping,
migrate_boundary_annotation_data_one_to_one_mapping_float_to_int,
- migrate_boundary_annotation_data_one_to_one_mapping_int_to_float,
+ migrate_boundary_annotation_data_one_to_one_mapping_int_to_float, migrate_boundary_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_called_after_migration import (
migrate_called_after_annotation_data_one_to_many_mapping,
@@ -16,45 +16,48 @@
migrate_called_after_annotation_data_one_to_one_mapping,
migrate_called_after_annotation_data_one_to_one_mapping__before_splits,
migrate_called_after_annotation_data_one_to_one_mapping__no_mapping_found,
+ migrate_called_after_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_description_migration import (
migrate_description_annotation_data_one_to_many_mapping__class,
migrate_description_annotation_data_one_to_one_mapping__function,
- migrate_description_annotation_data_one_to_one_mapping__parameter,
+ migrate_description_annotation_data_one_to_one_mapping__parameter, migrate_description_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_enum_migration import (
migrate_enum_annotation_data_one_to_many_mapping,
migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping,
- migrate_enum_annotation_data_one_to_one_mapping,
+ migrate_enum_annotation_data_one_to_one_mapping, migrate_enum_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_expert_migration import (
migrate_expert_annotation_data__class,
migrate_expert_annotation_data__function,
- migrate_expert_annotation_data__parameter,
+ migrate_expert_annotation_data__parameter, migrate_expert_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_group_annotation import (
migrate_group_annotation_data_one_to_many_mapping,
migrate_group_annotation_data_one_to_one_mapping,
migrate_group_annotation_data_one_to_one_mapping__one_mapping_for_parameters,
+ migrate_group_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_move_migration import (
migrate_move_annotation_data_one_to_many_mapping,
migrate_move_annotation_data_one_to_one_mapping__class,
migrate_move_annotation_data_one_to_one_mapping__global_function,
+ migrate_move_annotation_data_one_to_one_mapping_duplicated,
)
from tests.processing.migration.annotations.test_remove_migration import (
migrate_remove_annotation_data_one_to_many_mapping,
- migrate_remove_annotation_data_one_to_one_mapping,
+ migrate_remove_annotation_data_one_to_one_mapping, migrate_remove_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_rename_migration import (
migrate_rename_annotation_data_one_to_many_mapping,
migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name,
- migrate_rename_annotation_data_one_to_one_mapping,
+ migrate_rename_annotation_data_one_to_one_mapping, migrate_rename_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_todo_migration import (
migrate_todo_annotation_data_many_to_many_mapping,
migrate_todo_annotation_data_one_to_many_mapping,
- migrate_todo_annotation_data_one_to_one_mapping,
+ migrate_todo_annotation_data_one_to_one_mapping, migrate_todo_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_value_migration import (
migrate_constant_annotation_data_one_to_many_mapping,
@@ -64,7 +67,9 @@
migrate_optional_annotation_data_one_to_many_mapping,
migrate_optional_annotation_data_one_to_one_mapping,
migrate_required_annotation_data_one_to_many_mapping,
- migrate_required_annotation_data_one_to_one_mapping,
+ migrate_required_annotation_data_one_to_one_mapping, migrate_omitted_annotation_data_duplicated,
+ migrate_optional_annotation_data_duplicated, migrate_required_annotation_data_duplicated,
+ migrate_constant_annotation_data_duplicated,
)
test_data = [
@@ -73,43 +78,53 @@
migrate_boundary_annotation_data_one_to_one_mapping_int_to_float(),
migrate_boundary_annotation_data_one_to_one_mapping_float_to_int(),
migrate_boundary_annotation_data_one_to_many_mapping(),
+ migrate_boundary_annotation_data_duplicated(),
# called after annotation
migrate_called_after_annotation_data_one_to_one_mapping(),
migrate_called_after_annotation_data_one_to_many_mapping(),
migrate_called_after_annotation_data_one_to_one_mapping__no_mapping_found(),
migrate_called_after_annotation_data_one_to_one_mapping__before_splits(),
migrate_called_after_annotation_data_one_to_many_mapping__two_classes(),
+ migrate_called_after_annotation_data_duplicated(),
# description annotation
migrate_description_annotation_data_one_to_one_mapping__function(),
migrate_description_annotation_data_one_to_many_mapping__class(),
migrate_description_annotation_data_one_to_one_mapping__parameter(),
+ migrate_description_annotation_data_duplicated(),
# enum annotation
migrate_enum_annotation_data_one_to_one_mapping(),
migrate_enum_annotation_data_one_to_many_mapping(),
migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(),
+ migrate_enum_annotation_data_duplicated(),
# expert annotation
migrate_expert_annotation_data__function(),
migrate_expert_annotation_data__class(),
migrate_expert_annotation_data__parameter(),
+ migrate_expert_annotation_data_duplicated(),
# group annotation
migrate_group_annotation_data_one_to_one_mapping(),
migrate_group_annotation_data_one_to_many_mapping(),
migrate_group_annotation_data_one_to_one_mapping__one_mapping_for_parameters(),
+ migrate_group_annotation_data_duplicated(),
# move annotation
migrate_move_annotation_data_one_to_one_mapping__class(),
migrate_move_annotation_data_one_to_one_mapping__global_function(),
migrate_move_annotation_data_one_to_many_mapping(),
+ migrate_move_annotation_data_one_to_one_mapping_duplicated(),
# remove annotation
migrate_remove_annotation_data_one_to_one_mapping(),
migrate_remove_annotation_data_one_to_many_mapping(),
+ migrate_remove_annotation_data_duplicated(),
# rename annotation
migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name(),
migrate_rename_annotation_data_one_to_one_mapping(),
migrate_rename_annotation_data_one_to_many_mapping(),
+ migrate_rename_annotation_data_duplicated(),
# to-do annotation
migrate_todo_annotation_data_one_to_one_mapping(),
migrate_todo_annotation_data_one_to_many_mapping(),
migrate_todo_annotation_data_many_to_many_mapping(),
+ migrate_todo_annotation_data_duplicated(),
# value annotation
migrate_constant_annotation_data_one_to_one_mapping(),
migrate_omitted_annotation_data_one_to_one_mapping(),
@@ -119,6 +134,10 @@
migrate_optional_annotation_data_one_to_many_mapping(),
migrate_required_annotation_data_one_to_many_mapping(),
migrate_omitted_annotation_data_one_to_many_mapping(),
+ migrate_constant_annotation_data_duplicated(),
+ migrate_omitted_annotation_data_duplicated(),
+ migrate_required_annotation_data_duplicated(),
+ migrate_optional_annotation_data_duplicated(),
]
@@ -132,7 +151,11 @@ def test_migrate_all_annotations() -> None:
mappings.extend(mapping)
else:
mappings.append(mapping)
- annotation_store.add_annotation(annotationv1)
+ if isinstance(annotationv1, list):
+ for annotationv1_ in annotationv1:
+ annotation_store.add_annotation(annotationv1_)
+ else:
+ annotation_store.add_annotation(annotationv1)
for expected_annotation in annotationsv2:
expected_annotation_store.add_annotation(expected_annotation)
From 7badaa64fd1699a56ff41cd23cbea789cd3f31c7 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Mon, 2 Jan 2023 19:52:26 +0100
Subject: [PATCH 20/40] fix linter errors
---
.../processing/migration/annotations/test_remove_migration.py | 4 ++--
.../processing/migration/annotations/test_rename_migration.py | 2 +-
.../processing/migration/annotations/test_todo_migration.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package-parser/tests/processing/migration/annotations/test_remove_migration.py b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
index cf61b7c8f..7a801560f 100644
--- a/package-parser/tests/processing/migration/annotations/test_remove_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
@@ -15,7 +15,7 @@
from package_parser.processing.migration import (
Mapping,
OneToManyMapping,
- OneToOneMapping,
+ OneToOneMapping, ManyToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -198,7 +198,7 @@ def migrate_remove_annotation_data_duplicated() -> Tuple[
code="",
)
- mapping = OneToOneMapping(1.0, functionv1, functionv2)
+ mapping = ManyToOneMapping(1.0, [functionv1, functionv1_2], functionv2)
annotationv1 = RemoveAnnotation(
target="test/test.remove.duplicate.test/test",
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index 98f123476..a3585be7c 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -11,7 +11,6 @@
ParameterAssignment,
ParameterDocumentation,
)
-from package_parser.processing.migration import ManyToOneMapping
from package_parser.processing.migration.annotations import (
get_migration_text,
migration_author,
@@ -20,6 +19,7 @@
Mapping,
OneToManyMapping,
OneToOneMapping,
+ ManyToOneMapping,
)
diff --git a/package-parser/tests/processing/migration/annotations/test_todo_migration.py b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
index a66d52aba..abe40b6fe 100644
--- a/package-parser/tests/processing/migration/annotations/test_todo_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
@@ -12,7 +12,6 @@
ParameterAssignment,
ParameterDocumentation,
)
-from package_parser.processing.migration import ManyToManyMapping, ManyToOneMapping
from package_parser.processing.migration.annotations import (
get_migration_text,
migration_author,
@@ -21,6 +20,7 @@
Mapping,
OneToManyMapping,
OneToOneMapping,
+ ManyToManyMapping, ManyToOneMapping,
)
From 2aae7ddf5e9f057b60e4a8e97c13f8893cb2ef55 Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Mon, 2 Jan 2023 18:56:24 +0000
Subject: [PATCH 21/40] style: apply automated linter fixes
---
.../processing/migration/_migrate.py | 21 +++++++++---
.../annotations/test_boundary_migration.py | 3 +-
.../test_called_after_migration.py | 13 +++++---
.../annotations/test_description_migration.py | 3 +-
.../annotations/test_enum_migration.py | 3 +-
.../annotations/test_expert_migration.py | 3 +-
.../annotations/test_group_annotation.py | 7 ++--
.../annotations/test_move_migration.py | 3 +-
.../annotations/test_remove_migration.py | 3 +-
.../annotations/test_rename_migration.py | 2 +-
.../annotations/test_todo_migration.py | 3 +-
.../annotations/test_value_migration.py | 21 +++++++++---
.../processing/migration/test_migration.py | 33 ++++++++++++-------
13 files changed, 80 insertions(+), 38 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 08b4514f2..0ee61175f 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -206,12 +206,21 @@ def _remove_duplicates(self) -> None:
for annotation_b in migrated_annotations:
if annotation_a is annotation_b:
continue
- if _are_semantic_equal(annotation_a, annotation_b) and (annotation_b, annotation_a) not in duplicates:
+ if (
+ _are_semantic_equal(annotation_a, annotation_b)
+ and (annotation_b, annotation_a) not in duplicates
+ ):
duplicates.append((annotation_a, annotation_b))
for annotation_a, annotation_b in duplicates:
- b_in_migrated_annotation_store = annotation_b in getattr(self.migrated_annotation_store, annotation_type)
- b_in_unsure_annotation_store = annotation_b in getattr(self.unsure_migrated_annotation_store, annotation_type)
- if annotation_a in getattr(self.migrated_annotation_store, annotation_type):
+ b_in_migrated_annotation_store = annotation_b in getattr(
+ self.migrated_annotation_store, annotation_type
+ )
+ b_in_unsure_annotation_store = annotation_b in getattr(
+ self.unsure_migrated_annotation_store, annotation_type
+ )
+ if annotation_a in getattr(
+ self.migrated_annotation_store, annotation_type
+ ):
if b_in_migrated_annotation_store:
getattr(self.migrated_annotation_store, annotation_type).remove(
annotation_b
@@ -220,7 +229,9 @@ def _remove_duplicates(self) -> None:
getattr(
self.unsure_migrated_annotation_store, annotation_type
).remove(annotation_b)
- if annotation_a in getattr(self.unsure_migrated_annotation_store, annotation_type):
+ if annotation_a in getattr(
+ self.unsure_migrated_annotation_store, annotation_type
+ ):
if b_in_migrated_annotation_store:
getattr(self.migrated_annotation_store, annotation_type).remove(
annotation_b
diff --git a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
index d40236975..c200422d8 100644
--- a/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_boundary_migration.py
@@ -12,9 +12,10 @@
ParameterDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
index 22c1724e5..ba12ead35 100644
--- a/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_called_after_migration.py
@@ -8,9 +8,10 @@
)
from package_parser.processing.api.model import Function, FunctionDocumentation
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -489,9 +490,7 @@ def migrate_called_after_annotation_data_duplicated() -> Tuple[
mapping_after = ManyToOneMapping(
1.0, [functionv1_after, functionv1_after_2], functionv2_after
)
- mapping_before = OneToManyMapping(
- 1.0, functionv1_before, [functionv2_before]
- )
+ mapping_before = OneToManyMapping(1.0, functionv1_before, [functionv2_before])
annotationv1 = CalledAfterAnnotation(
target="test/test.called_after.duplicate.test/OldClass/test_after",
authors=["testauthor"],
@@ -516,4 +515,8 @@ def migrate_called_after_annotation_data_duplicated() -> Tuple[
reviewResult=EnumReviewResult.NONE,
calledAfterName="new_test_before",
)
- return [mapping_after, mapping_before], [annotationv1, annotationv1_2], [annotationv2]
+ return (
+ [mapping_after, mapping_before],
+ [annotationv1, annotationv1_2],
+ [annotationv2],
+ )
diff --git a/package-parser/tests/processing/migration/annotations/test_description_migration.py b/package-parser/tests/processing/migration/annotations/test_description_migration.py
index 0d27f5681..9de9836d8 100644
--- a/package-parser/tests/processing/migration/annotations/test_description_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_description_migration.py
@@ -16,9 +16,10 @@
ParameterDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index 21f657ce4..2d935da0e 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -13,9 +13,10 @@
ParameterDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_expert_migration.py b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
index b4958618f..bd47fbc31 100644
--- a/package-parser/tests/processing/migration/annotations/test_expert_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_expert_migration.py
@@ -16,9 +16,10 @@
ParameterDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_group_annotation.py b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
index de146b4bc..65ac4022f 100644
--- a/package-parser/tests/processing/migration/annotations/test_group_annotation.py
+++ b/package-parser/tests/processing/migration/annotations/test_group_annotation.py
@@ -17,9 +17,10 @@
)
from package_parser.processing.migration import (
ManyToManyMapping,
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -680,7 +681,5 @@ def migrate_group_annotation_data_duplicated() -> Tuple[
mapping_parameter_c,
],
[annotation, annotation_2],
- [
- migrated_annotation_1
- ],
+ [migrated_annotation_1],
)
diff --git a/package-parser/tests/processing/migration/annotations/test_move_migration.py b/package-parser/tests/processing/migration/annotations/test_move_migration.py
index 44a521e91..f6284aae5 100644
--- a/package-parser/tests/processing/migration/annotations/test_move_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_move_migration.py
@@ -13,9 +13,10 @@
FunctionDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_remove_migration.py b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
index 7a801560f..b81ac23b7 100644
--- a/package-parser/tests/processing/migration/annotations/test_remove_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_remove_migration.py
@@ -13,9 +13,10 @@
FunctionDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index a3585be7c..9141e0436 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -16,10 +16,10 @@
migration_author,
)
from package_parser.processing.migration.model import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
OneToOneMapping,
- ManyToOneMapping,
)
diff --git a/package-parser/tests/processing/migration/annotations/test_todo_migration.py b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
index abe40b6fe..d7bc41427 100644
--- a/package-parser/tests/processing/migration/annotations/test_todo_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_todo_migration.py
@@ -17,10 +17,11 @@
migration_author,
)
from package_parser.processing.migration.model import (
+ ManyToManyMapping,
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
OneToOneMapping,
- ManyToManyMapping, ManyToOneMapping,
)
diff --git a/package-parser/tests/processing/migration/annotations/test_value_migration.py b/package-parser/tests/processing/migration/annotations/test_value_migration.py
index aeb632c9d..259f212bd 100644
--- a/package-parser/tests/processing/migration/annotations/test_value_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_value_migration.py
@@ -18,9 +18,10 @@
ParameterDocumentation,
)
from package_parser.processing.migration import (
+ ManyToOneMapping,
Mapping,
OneToManyMapping,
- OneToOneMapping, ManyToOneMapping,
+ OneToOneMapping,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -811,7 +812,11 @@ def migrate_omitted_annotation_data_duplicated() -> Tuple[
comment="",
reviewResult=EnumReviewResult.NONE,
)
- return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
+ return (
+ ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2),
+ [annotation, annotation_2],
+ [annotationv2],
+ )
def migrate_optional_annotation_data_duplicated() -> Tuple[
@@ -873,7 +878,11 @@ def migrate_optional_annotation_data_duplicated() -> Tuple[
defaultValueType=ValueAnnotation.DefaultValueType.BOOLEAN,
defaultValue="True",
)
- return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
+ return (
+ ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2),
+ [annotation, annotation_2],
+ [annotationv2],
+ )
def migrate_required_annotation_data_duplicated() -> Tuple[
@@ -929,4 +938,8 @@ def migrate_required_annotation_data_duplicated() -> Tuple[
comment="",
reviewResult=EnumReviewResult.NONE,
)
- return ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2), [annotation, annotation_2], [annotationv2]
+ return (
+ ManyToOneMapping(1.0, [parameterv1, parameterv1_2], parameterv2),
+ [annotation, annotation_2],
+ [annotationv2],
+ )
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 2565fb7da..3d6a59344 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -5,39 +5,43 @@
from package_parser.processing.migration import Migration
from package_parser.processing.migration.model import Mapping
from tests.processing.migration.annotations.test_boundary_migration import (
+ migrate_boundary_annotation_data_duplicated,
migrate_boundary_annotation_data_one_to_many_mapping,
migrate_boundary_annotation_data_one_to_one_mapping,
migrate_boundary_annotation_data_one_to_one_mapping_float_to_int,
- migrate_boundary_annotation_data_one_to_one_mapping_int_to_float, migrate_boundary_annotation_data_duplicated,
+ migrate_boundary_annotation_data_one_to_one_mapping_int_to_float,
)
from tests.processing.migration.annotations.test_called_after_migration import (
+ migrate_called_after_annotation_data_duplicated,
migrate_called_after_annotation_data_one_to_many_mapping,
migrate_called_after_annotation_data_one_to_many_mapping__two_classes,
migrate_called_after_annotation_data_one_to_one_mapping,
migrate_called_after_annotation_data_one_to_one_mapping__before_splits,
migrate_called_after_annotation_data_one_to_one_mapping__no_mapping_found,
- migrate_called_after_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_description_migration import (
+ migrate_description_annotation_data_duplicated,
migrate_description_annotation_data_one_to_many_mapping__class,
migrate_description_annotation_data_one_to_one_mapping__function,
- migrate_description_annotation_data_one_to_one_mapping__parameter, migrate_description_annotation_data_duplicated,
+ migrate_description_annotation_data_one_to_one_mapping__parameter,
)
from tests.processing.migration.annotations.test_enum_migration import (
+ migrate_enum_annotation_data_duplicated,
migrate_enum_annotation_data_one_to_many_mapping,
migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping,
- migrate_enum_annotation_data_one_to_one_mapping, migrate_enum_annotation_data_duplicated,
+ migrate_enum_annotation_data_one_to_one_mapping,
)
from tests.processing.migration.annotations.test_expert_migration import (
migrate_expert_annotation_data__class,
migrate_expert_annotation_data__function,
- migrate_expert_annotation_data__parameter, migrate_expert_annotation_data_duplicated,
+ migrate_expert_annotation_data__parameter,
+ migrate_expert_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_group_annotation import (
+ migrate_group_annotation_data_duplicated,
migrate_group_annotation_data_one_to_many_mapping,
migrate_group_annotation_data_one_to_one_mapping,
migrate_group_annotation_data_one_to_one_mapping__one_mapping_for_parameters,
- migrate_group_annotation_data_duplicated,
)
from tests.processing.migration.annotations.test_move_migration import (
migrate_move_annotation_data_one_to_many_mapping,
@@ -46,30 +50,35 @@
migrate_move_annotation_data_one_to_one_mapping_duplicated,
)
from tests.processing.migration.annotations.test_remove_migration import (
+ migrate_remove_annotation_data_duplicated,
migrate_remove_annotation_data_one_to_many_mapping,
- migrate_remove_annotation_data_one_to_one_mapping, migrate_remove_annotation_data_duplicated,
+ migrate_remove_annotation_data_one_to_one_mapping,
)
from tests.processing.migration.annotations.test_rename_migration import (
+ migrate_rename_annotation_data_duplicated,
migrate_rename_annotation_data_one_to_many_mapping,
migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name,
- migrate_rename_annotation_data_one_to_one_mapping, migrate_rename_annotation_data_duplicated,
+ migrate_rename_annotation_data_one_to_one_mapping,
)
from tests.processing.migration.annotations.test_todo_migration import (
+ migrate_todo_annotation_data_duplicated,
migrate_todo_annotation_data_many_to_many_mapping,
migrate_todo_annotation_data_one_to_many_mapping,
- migrate_todo_annotation_data_one_to_one_mapping, migrate_todo_annotation_data_duplicated,
+ migrate_todo_annotation_data_one_to_one_mapping,
)
from tests.processing.migration.annotations.test_value_migration import (
+ migrate_constant_annotation_data_duplicated,
migrate_constant_annotation_data_one_to_many_mapping,
migrate_constant_annotation_data_one_to_one_mapping,
+ migrate_omitted_annotation_data_duplicated,
migrate_omitted_annotation_data_one_to_many_mapping,
migrate_omitted_annotation_data_one_to_one_mapping,
+ migrate_optional_annotation_data_duplicated,
migrate_optional_annotation_data_one_to_many_mapping,
migrate_optional_annotation_data_one_to_one_mapping,
+ migrate_required_annotation_data_duplicated,
migrate_required_annotation_data_one_to_many_mapping,
- migrate_required_annotation_data_one_to_one_mapping, migrate_omitted_annotation_data_duplicated,
- migrate_optional_annotation_data_duplicated, migrate_required_annotation_data_duplicated,
- migrate_constant_annotation_data_duplicated,
+ migrate_required_annotation_data_one_to_one_mapping,
)
test_data = [
From 5db54390caec7e3e84329b349a5a26f4016e2bb1 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 15:00:11 +0100
Subject: [PATCH 22/40] that takes long time
---
.github/workflows/main.yml | 3 +
.../package_parser/cli/_run_migrate.py | 9 ++-
.../processing/migration/_migrate.py | 3 +-
.../tests/data/migration/annotationv1.json | 59 ++++++++++++++
.../tests/data/migration/annotationv2.json | 59 ++++++++++++++
.../tests/data/migration/apiv1_data.json | 68 ++++++++++++++++
.../tests/data/migration/apiv2_data.json | 79 +++++++++++++++++++
.../data/migration/unsure_annotationv2.json | 59 ++++++++++++++
.../processing/migration/test_migration.py | 61 +++++++++++++-
9 files changed, 394 insertions(+), 6 deletions(-)
create mode 100644 package-parser/tests/data/migration/annotationv1.json
create mode 100644 package-parser/tests/data/migration/annotationv2.json
create mode 100644 package-parser/tests/data/migration/apiv1_data.json
create mode 100644 package-parser/tests/data/migration/apiv2_data.json
create mode 100644 package-parser/tests/data/migration/unsure_annotationv2.json
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 2384a7835..eee32e12d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -97,6 +97,9 @@ jobs:
- name: Smoke test (all)
run: poetry run parse-package all -p package_parser -s package_parser -c package_parser -o out
+ - name: Smoke test (migration)
+ run: poetry run parse-package migrate -a1 -a2 -a -o out #todo
+
# Requires installation of pytest and pytest-cov
- name: Test with pytest
run: poetry run pytest --doctest-modules
diff --git a/package-parser/package_parser/cli/_run_migrate.py b/package-parser/package_parser/cli/_run_migrate.py
index 2aa936080..a6e417262 100644
--- a/package-parser/package_parser/cli/_run_migrate.py
+++ b/package-parser/package_parser/cli/_run_migrate.py
@@ -1,3 +1,4 @@
+import os
from pathlib import Path
from package_parser.processing.migration import Migration
@@ -22,5 +23,9 @@ def _run_migrate_command(
differ = SimpleDiffer()
api_mapping = APIMapping(apiv1, apiv2, differ)
mappings = api_mapping.map_api()
- annotationsv2 = Migration().migrate_annotations(annotationsv1, mappings)
- _write_annotations_file(annotationsv2, out_dir_path)
+ migration = Migration()
+ migration.migrate_annotations(annotationsv1, mappings)
+ migrated_annotations_file = Path(os.path.join(out_dir_path, "migrated_annotationsv" + apiv2.version + ".json"))
+ unsure_migrated_annotations_file = Path(os.path.join(out_dir_path, "unsure_migrated_annotationsv" + apiv2.version + ".json"))
+ _write_annotations_file(migration.migrated_annotation_store, migrated_annotations_file)
+ _write_annotations_file(migration.unsure_migrated_annotation_store, unsure_migrated_annotations_file)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 0ee61175f..caf4040e3 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -64,7 +64,7 @@ def _get_mapping_from_annotation(
def migrate_annotations(
self, annotationsv1: AnnotationStore, mappings: list[Mapping]
- ) -> AnnotationStore:
+ ) -> None:
for boundary_annotation in annotationsv1.boundaryAnnotations:
mapping = self._get_mapping_from_annotation(boundary_annotation, mappings)
if mapping is not None:
@@ -165,7 +165,6 @@ def migrate_annotations(
annotation, mapping.get_similarity()
)
self._remove_duplicates()
- return self.migrated_annotation_store
def add_annotations_based_on_similarity(
self, annotation: AbstractAnnotation, similarity: float
diff --git a/package-parser/tests/data/migration/annotationv1.json b/package-parser/tests/data/migration/annotationv1.json
new file mode 100644
index 000000000..b11d3dc23
--- /dev/null
+++ b/package-parser/tests/data/migration/annotationv1.json
@@ -0,0 +1,59 @@
+{
+ "schemaVersion": 2,
+ "boundaryAnnotations": {},
+ "calledAfterAnnotations": {},
+ "completeAnnotations": {},
+ "descriptionAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newDescription": "new description"
+ }
+ },
+ "enumAnnotations": {},
+ "expertAnnotations": {},
+ "groupAnnotations": {},
+ "moveAnnotations": {},
+ "pureAnnotations": {},
+ "removeAnnotations": {
+ "test/test/UnusedClass": {
+ "target": "test/test/TestClass",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "I removed this class because it has no known usages.",
+ "reviewResult": ""
+ }
+ },
+ "renameAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newName": "renamed_test_function"
+ }
+ },
+ "todoAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newTodo": "this is a todo annotation"
+ }
+ },
+ "valueAnnotations": {}
+}
diff --git a/package-parser/tests/data/migration/annotationv2.json b/package-parser/tests/data/migration/annotationv2.json
new file mode 100644
index 000000000..b11d3dc23
--- /dev/null
+++ b/package-parser/tests/data/migration/annotationv2.json
@@ -0,0 +1,59 @@
+{
+ "schemaVersion": 2,
+ "boundaryAnnotations": {},
+ "calledAfterAnnotations": {},
+ "completeAnnotations": {},
+ "descriptionAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newDescription": "new description"
+ }
+ },
+ "enumAnnotations": {},
+ "expertAnnotations": {},
+ "groupAnnotations": {},
+ "moveAnnotations": {},
+ "pureAnnotations": {},
+ "removeAnnotations": {
+ "test/test/UnusedClass": {
+ "target": "test/test/TestClass",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "I removed this class because it has no known usages.",
+ "reviewResult": ""
+ }
+ },
+ "renameAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newName": "renamed_test_function"
+ }
+ },
+ "todoAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newTodo": "this is a todo annotation"
+ }
+ },
+ "valueAnnotations": {}
+}
diff --git a/package-parser/tests/data/migration/apiv1_data.json b/package-parser/tests/data/migration/apiv1_data.json
new file mode 100644
index 000000000..4162944ef
--- /dev/null
+++ b/package-parser/tests/data/migration/apiv1_data.json
@@ -0,0 +1,68 @@
+{
+ "distribution": "test",
+ "package": "test",
+ "version": "0.0.1",
+ "modules": [
+ {
+ "id": "test/test",
+ "name": "test",
+ "classes": [
+ "test/test/TestClass"
+ ],
+ "functions": [
+ "test/test/test_function"
+ ]
+ }
+ ],
+ "classes": [
+ {
+ "id": "test/test/TestClass",
+ "name": "TestClass",
+ "qname": "test.TestClass",
+ "methods": [],
+ "decorators": [],
+ "superclasses": [],
+ "is_public": true,
+ "reexported_by": [],
+ "documentation": "",
+ "code": "class TestClass:\n\"\"\" This is a TestClass.\n It has no common use.\"\"\"\n pass",
+ "instance_attributes": [
+ {
+ "name": "a",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ },
+ {
+ "name": "b",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ },
+ {
+ "name": "c",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ }
+ ]
+ }
+ ],
+ "functions": [
+ {
+ "id": "test/test/test_function",
+ "qname": "test_function",
+ "decorators": [],
+ "parameters": [],
+ "results": [],
+ "is_public": true,
+ "reexported_by": [],
+ "description": "",
+ "docstring": "",
+ "code": "def test_function():\n pass"
+ }
+ ]
+}
diff --git a/package-parser/tests/data/migration/apiv2_data.json b/package-parser/tests/data/migration/apiv2_data.json
new file mode 100644
index 000000000..7c598af0a
--- /dev/null
+++ b/package-parser/tests/data/migration/apiv2_data.json
@@ -0,0 +1,79 @@
+{
+ "distribution": "test",
+ "package": "test",
+ "version": "0.0.1",
+ "modules": [
+ {
+ "id": "test/test",
+ "name": "test",
+ "classes": [
+ "test/test/NewTestClass"
+ ],
+ "functions": [
+ ""
+ ]
+ }
+ ],
+ "classes": [
+ {
+ "id": "test/test/NewTestClass",
+ "name": "NewTestClass",
+ "qname": "test.NewTestClass",
+ "methods": [],
+ "decorators": [],
+ "superclasses": [],
+ "is_public": true,
+ "reexported_by": [],
+ "documentation": "",
+ "code": "class NewTestClass:\n\"\"\" This is a NewTestClass.\n It has no common use.\"\"\"\n pass",
+ "instance_attributes": [
+ {
+ "name": "a",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ },
+ {
+ "name": "b",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ },
+ {
+ "name": "c",
+ "types": {
+ "kind": "NamedType",
+ "name": "str"
+ }
+ }
+ ]
+ }
+ ],
+ "functions": [
+ {
+ "id": "test/test/test_function",
+ "qname": "test_function",
+ "decorators": [],
+ "parameters": [],
+ "results": [],
+ "is_public": true,
+ "reexported_by": [],
+ "description": "",
+ "docstring": "",
+ "code": "def test_function():\n pass"
+ },{
+ "id": "test/test/other_test_function",
+ "qname": "other_test_function",
+ "decorators": [],
+ "parameters": [],
+ "results": [],
+ "is_public": true,
+ "reexported_by": [],
+ "description": "",
+ "docstring": "",
+ "code": "def other_test_function():\n pass"
+ }
+ ]
+}
diff --git a/package-parser/tests/data/migration/unsure_annotationv2.json b/package-parser/tests/data/migration/unsure_annotationv2.json
new file mode 100644
index 000000000..b11d3dc23
--- /dev/null
+++ b/package-parser/tests/data/migration/unsure_annotationv2.json
@@ -0,0 +1,59 @@
+{
+ "schemaVersion": 2,
+ "boundaryAnnotations": {},
+ "calledAfterAnnotations": {},
+ "completeAnnotations": {},
+ "descriptionAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newDescription": "new description"
+ }
+ },
+ "enumAnnotations": {},
+ "expertAnnotations": {},
+ "groupAnnotations": {},
+ "moveAnnotations": {},
+ "pureAnnotations": {},
+ "removeAnnotations": {
+ "test/test/UnusedClass": {
+ "target": "test/test/TestClass",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "I removed this class because it has no known usages.",
+ "reviewResult": ""
+ }
+ },
+ "renameAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newName": "renamed_test_function"
+ }
+ },
+ "todoAnnotations": {
+ "test/test/test_function": {
+ "target": "test/test/test_function",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newTodo": "this is a todo annotation"
+ }
+ },
+ "valueAnnotations": {}
+}
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 3d6a59344..e9f1c5ba3 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -1,8 +1,13 @@
+import json
+import os
+
+from package_parser.cli._run_migrate import _run_migrate_command
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
)
-from package_parser.processing.migration import Migration
+from package_parser.processing.api.model import API
+from package_parser.processing.migration import Migration, SimpleDiffer, APIMapping
from package_parser.processing.migration.model import Mapping
from tests.processing.migration.annotations.test_boundary_migration import (
migrate_boundary_annotation_data_duplicated,
@@ -168,7 +173,14 @@ def test_migrate_all_annotations() -> None:
for expected_annotation in annotationsv2:
expected_annotation_store.add_annotation(expected_annotation)
- actual_annotations = Migration().migrate_annotations(annotation_store, mappings)
+ migration = Migration()
+ migration.migrate_annotations(annotation_store, mappings)
+
+ for key, value in migration.unsure_migrated_annotation_store.to_json().values():
+ if isinstance(value, list):
+ assert len(value) == 0
+
+ actual_annotations = migration.migrated_annotation_store
def get_key(annotation: AbstractAnnotation) -> str:
return annotation.target
@@ -209,3 +221,48 @@ def get_key(annotation: AbstractAnnotation) -> str:
assert sorted(actual_annotations.valueAnnotations, key=get_key) == sorted(
expected_annotation_store.valueAnnotations, key=get_key
)
+
+
+def test_migrate_command_and_both_annotation_stores() -> None:
+ apiv1_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "apiv1_data.json"
+ )
+ apiv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "apiv2_data.json"
+ )
+ annotationsv1_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "annotationv1.json"
+ )
+ annotationsv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "annotationv2.json"
+ )
+ unsure_annotationsv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "unsure_annotationv2.json"
+ )
+
+ with open(apiv1_json_path, "r") as apiv1_file:
+ apiv1_json = json.load(apiv1_file)
+ apiv1 = API.from_json(apiv1_json)
+
+ with open(apiv2_json_path, "r") as apiv2_file:
+ apiv2_json = json.load(apiv2_file)
+ apiv2 = API.from_json(apiv2_json)
+
+ with open(annotationsv1_json_path, "r") as annotationsv1_file:
+ annotationsv1_json = json.load(annotationsv1_file)
+ annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
+
+ with open(annotationsv2_json_path, "r") as annotationsv2_file:
+ expected_annotationsv2_json = json.load(annotationsv2_file)
+
+ with open(unsure_annotationsv2_json_path, "r") as unsure_annotationsv2_file:
+ expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
+
+ differ = SimpleDiffer()
+ api_mapping = APIMapping(apiv1, apiv2, differ)
+ mappings = api_mapping.map_api()
+ migration = Migration()
+ migration.migrate_annotations(annotationsv1, mappings)
+
+ assert migration.migrated_annotation_store.to_json() == expected_annotationsv2_json
+ assert migration.unsure_migrated_annotation_store.to_json() == expected_unsure_annotationsv2_json
From ee19f127167d7f3d6b493f8b13b60ce06f5ea66f Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 15:44:07 +0100
Subject: [PATCH 23/40] Squashed commit of the following:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 25931c83beeb1404690b22ecc095e86aa9419fd1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:46:14 2023 +0100
build(deps): Bump @chakra-ui/system from 2.3.0 to 2.3.7 in /api-editor/gui (#1171)
Bumps
[@chakra-ui/system](https://github.com/chakra-ui/chakra-ui/tree/HEAD/packages/components/system)
from 2.3.0 to 2.3.7.
Release notes
Sourced from @chakra-ui/system
's
releases.
@chakra-ui/system
@2
.3.7
Patch Changes
@chakra-ui/system
@2
.3.6
Patch Changes
-
#7154
2d7398a01
Thanks @segunadebayo
!
- ## All components
Improved the bundling setup for all components.
- Switched to the
.mjs
file extension for correct ESM
behavior
- Switched to the latest
tsup
will uses automatic JSX
runtime detection
removing the need for manually inject classic React
import
- Moved
tsup
config to package.json
since
it's very minimal
- Removed
clean-package.config.json
in favor of the
package.json
property
- Fixed issue where Storybook addon (dark mode and RTL) was not
working
-
Updated dependencies
[2d7398a01
,
0eedc151c
]:
@chakra-ui/color-mode
@2
.1.11
@chakra-ui/styled-system
@2
.5.1
@chakra-ui/react-utils
@2
.0.10
@chakra-ui/utils
@2
.0.13
@chakra-ui/theme-utils
@2
.0.7
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit c384757f610426093a54e5bf66008078a7f51746
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:41:49 2023 +0100
build(deps): Bump react-hook-form from 7.39.0 to 7.41.3 in /api-editor/gui (#1167)
Bumps
[react-hook-form](https://github.com/react-hook-form/react-hook-form)
from 7.39.0 to 7.41.3.
Release notes
Sourced from react-hook-form's
releases.
Version 7.41.3
💁♂️ close #9684
revert UnPackAsyncDefaultValues
to avoid TS breaking
change
Version 7.41.2
🤦🏻♂️fix #9661
regression on required valueAsNumber (#9662)
🎅 Version 7.41.1
🐞 fix #9659
NaN prevent validation update (#9660)
🕯️ close #9524
useWatch
return undefined value (#9653)
📖 adjust contributing document (#9641)
💆🏻 fix #9621
with the inline default value (#9622)
🩻 docs: update contribution guidelines (#9605)
thanks to @Mini-ghost
and
@stefanpl
🎄 Version 7.41.0
👉 NEW values
props
The following syntax will react to values
prop
update/changes.
- values will be reactive to update/change and reset accordingly
- provide a reset option to keep dirty/touched values potentially
const values = await fetch('API')
useForm({
values, // will reset the form when values updates
// resetOptions: {
// keepDirtyValues: true
// }
})
👉 NEW async defaultValues
props
The following syntax will support async defaultValues
,
so we will manage the reset
form internally and update
formState
accordingly.
- promise will only be resolved once during
useForm()
call
- It's possible to supply
resetOptions
as well
const { formState: { isLoading } } = useForm({
defaultValues: fetch('API')
// resetOptions: {
// keepDirtyValues: true
// }
})
</tr></table>
... (truncated)
Changelog
Sourced from react-hook-form's
changelog.
Changelog
[7.40.0] - 2022-11-30
Changed
- async validation (or combined with sync) will always the take the
latest validation result and abort the previous
[7.39.5] - 2022-11-21
Changed
- Conditional render
useFormState
will trigger an extra
re-render to reflect the current formState
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 1507cc9e3450a81a9c8c7c7e3a58d460fc250938
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:37:13 2023 +0100
build(deps): Bump react-router-dom from 6.4.4 to 6.6.1 in /api-editor/gui (#1175)
Bumps
[react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom)
from 6.4.4 to 6.6.1.
Changelog
Sourced from react-router-dom's
changelog.
6.6.1
Patch Changes
- Updated dependencies:
@remix-run/router@1.2.1
react-router@6.6.1
6.6.0
Minor Changes
- Add
useBeforeUnload()
hook (#9664)
- Remove
unstable_
prefix from
createStaticHandler
/createStaticRouter
/StaticRouterProvider
(#9738)
Patch Changes
- Proper hydration of
Error
objects from
StaticRouterProvider
(#9664)
- Support uppercase
<Form method>
and
useSubmit
method values (#9664)
- Skip initial scroll restoration for SSR apps with
hydrationData
(#9664)
- Fix
<button formmethod>
form submission
overriddes (#9664)
- Updated dependencies:
@remix-run/router@1.2.0
react-router@6.6.0
6.5.0
Patch Changes
- Updated dependencies:
react-router@6.5.0
@remix-run/router@1.1.0
6.4.5
Patch Changes
- Updated dependencies:
@remix-run/router@1.0.5
react-router@6.4.5
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit bae09f940ca23fb562d93f51bc543ed3b6523938
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:31:42 2023 +0100
build(deps): Bump framer-motion from 7.6.17 to 8.1.3 in /api-editor/gui (#1178)
Bumps [framer-motion](https://github.com/framer/motion) from 7.6.17 to
8.1.3.
Changelog
Sourced from framer-motion's
changelog.
[8.1.3] 2023-01-03
Fixed
[8.1.2] 2023-01-03
Fixed
- Fixed
extends
error in LayoutCamera
and
LayoutOrthographicCamera
components.
[8.1.1] 2023-01-03
Fixed
- Fixing error when
Transition.type
is invalid.
[8.1.0] 2023-01-03
Added
MotionValue.jump
can be used to "jump" a
MotionValue
to a new value, bypassing active springs,
ending current animations and resetting to velocity
to
0
.
[8.0.4] 2023-01-03
Fixed
- Cleaning up animations when a
MotionValue
has no active
"change"
subscribers.
- Changing
useMotionValueEvent
subscription to
useInsertionEffect
.
[8.0.3] 2023-01-03
Fixed
- Use range for tslib dependency.
- Fixing multitouch with drag and pan gestures.
[8.0.2] 2022-12-23
Fixed
- Fixing defaults for hardware-accelerated animations.
[8.0.1] 2022-12-21
Added
- Warning for unhydrated refs passed to
useScroll()
options.
... (truncated)
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6deca13dee329b5a9ae38fb3c8ba87836c135f6f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:28:05 2023 +0100
build(deps-dev): Bump @vitejs/plugin-react from 2.1.0 to 2.2.0 in /api-editor/gui (#1173)
Bumps
[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react)
from 2.1.0 to 2.2.0.
Changelog
Sourced from @vitejs/plugin-react
's
changelog.
2.2.0 (2022-10-26)
2.2.0-beta.0 (2022-10-05)
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 77d4df3e61b420a19993b489a21a919298738186
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:22:55 2023 +0100
build(deps): Bump ktorVersion from 2.1.3 to 2.2.1 in /api-editor (#1166)
Bumps `ktorVersion` from 2.1.3 to 2.2.1.
Updates `ktor-serialization-kotlinx-json` from 2.1.3 to 2.2.1
Release notes
Sourced from ktor-serialization-kotlinx-json's
releases.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Changelog
Sourced from ktor-serialization-kotlinx-json's
changelog.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Commits
Updates `ktor-server` from 2.1.3 to 2.2.1
Release notes
Sourced from ktor-server's
releases.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Changelog
Sourced from ktor-server's
changelog.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Commits
Updates `ktor-server-netty` from 2.1.3 to 2.2.1
Release notes
Sourced from ktor-server-netty's
releases.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Changelog
Sourced from ktor-server-netty's
changelog.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Commits
Updates `ktor-server-test-host` from 2.1.3 to 2.2.1
Release notes
Sourced from ktor-server-test-host's
releases.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Changelog
Sourced from ktor-server-test-host's
changelog.
2.2.1
Published 7 December 2022
The critical error java.lang.NoClassDefFoundError:
kotlinx/atomicfu/AtomicFU
in the 2.2.0 release is fixed
2.2.0
Published 7 December 2022
- Intergate Swagger UI Hosting as Ktor Feature (KTOR-774)
- New plugins API for client (KTOR-5161)
- Rate-Limit Support on Server (KTOR-1196)
- Make sessions plugin multiplatform (KTOR-4960)
- Add the ability to access the route inside a route-scoped plugin (KTOR-5112)
- Add a method that returns a list of child routes recursively (KTOR-581)
- Support Default Value for missing Env Variables in YAML (KTOR-5283)
- Netty: ApplicationStarted event is fired before the server starts
accepting connections (KTOR-4259)
- parseAuthorizationHeader throws ParseException on header value with
multiple challenges (KTOR-5216)
- ByteChannel exception: Got EOF but at least 1 byte were expected (KTOR-5252)
- Application data in OAuth State parameter (KTOR-5225)
- NativePRNGNonBlocking is not found, fallback to SHA1PRNG (KTOR-668)
- Not calling call.respond() at server results in 404 for the client
(KTOR-721)
- Restoring thread context elements when directly resuming to parent
is broken (KTOR-2644)
- Out of the box ContentConverter for Protobuf (KTOR-763)
- Darwin: response is never returned when usePreconfiguredSession is
used (KTOR-5134)
- List.merge() should have reversed priority
(KTOR-5208)
- Allow nested authentications to be combined using AND (KTOR-5021)
- The swaggerUI plugin should be placed in the
io.ktor.server.plugins.swagger package (KTOR-5192)
- CORS Plugin should log reason for returning 403 Forbidden errors (KTOR-4236)
- The default path to an OpenAPI specification doesn't work for the
'openAPI' plugin (KTOR-5193)
- JWT: JWTPayloadHolder.getListClaim() throws NPE when specified claim
is absent (KTOR-5098)
- Logging: the plugin instantiates the default logger even when a
custom one is provided (KTOR-5186)
- Java client engine doesn't handle HttpTimeout.INFINITE_TIMEOUT_MS
properly (KTOR-2814)
- SessionTransportTransformerMessageAuthentication: Comparison of
digests fails when there is a space in a value (KTOR-5168)
- Support serving OpenAPI from resources (KTOR-5150)
- Remove check for internal class in Select (KTOR-5035)
- Persistent Client HttpCache (KTOR-2579)
- Support native windows HTTP client (KTOR-735)
- Add Server BearerAuthenticationProvider (KTOR-5118)
- Merged config: "Property *.size not found" error when
calling
configList
method on an array property (KTOR-5143)
- "POSIX error 56: Socket is already connected" error when a
socket is connection-mode on Darwin targets (KTOR-4877)
- StatusPages can't handle errors in HTML template (KTOR-5107)
- HttpRequestRetry: Memory leak of coroutines objects when using the
plugin (KTOR-5099)
- CallLogging and CallId: exceptions thrown in
WriteChannelContent.writeTo are swallowed (KTOR-4954)
- Temp files generated by multipart upload are not cleared in case of
exception or cancellation (KTOR-5051)
- Websockets, Darwin: trusting a certificate via
handleChallenge
doesn't work for Websockets connections (KTOR-5094)
- Digest auth: Support returning any objects which implement Principal
interface (KTOR-5059)
- Add Debug Logging to Default Transformers (KTOR-4529)
- No way getting client's source address from IP packet (KTOR-2501)
- Add Env Variable to Change Log Level on Native Server (KTOR-4998)
- Add Debug Logging for Ktor Plugins and Routing (KTOR-4510)
... (truncated)
Commits
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependab...
_Description has been truncated_
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 595f0388fcf7105dfb41b524c198d3469447ee01
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon Jan 2 20:18:22 2023 +0100
build(deps): Bump spacy from 3.2.4 to 3.2.5 in /package-parser (#1174)
Bumps [spacy](https://github.com/explosion/spaCy) from 3.2.4 to 3.2.5.
Release notes
Sourced from spacy's
releases.
v3.2.5: Bug fixes and future NumPy compatibility
This bug fix release is primarily to avoid deprecation warnings and
future incompatibility with NumPy v1.24+.
🔴 Bug fixes
- #10573:
Remove Click pin following Typer updates.
- #11331,
#11701:
Clean up warnings in spaCy and its test suite.
- #11845:
Don't raise an error in displaCy for unset spans keys.
- #11860:
Fix
spancat
for docs with zero suggestions.
- #11864:
Add
smart_open
requirement and update deprecated
options.
- #11899:
Fix
spacy init config --gpu
for environments without
spacy-transformers
.
- #11933:
Update for compatibility with NumPy v1.24+ integer conversions.
- #11935:
Restore missing error messages for beam search.
👥 Contributors
@adrianeboyd
, @honnibal
, @ines
, @polm
, @svlandeg
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
api-editor/backend/build.gradle.kts | 2 +-
api-editor/gui/package-lock.json | 1045 +++++++++++++++++----------
api-editor/gui/package.json | 10 +-
package-parser/poetry.lock | 49 +-
package-parser/pyproject.toml | 2 +-
5 files changed, 678 insertions(+), 430 deletions(-)
diff --git a/api-editor/backend/build.gradle.kts b/api-editor/backend/build.gradle.kts
index 9a169011e..bc628615b 100644
--- a/api-editor/backend/build.gradle.kts
+++ b/api-editor/backend/build.gradle.kts
@@ -34,7 +34,7 @@ tasks.withType {
// Dependencies --------------------------------------------------------------------------------------------------------
-val ktorVersion = "2.1.3"
+val ktorVersion = "2.2.1"
dependencies {
implementation("ch.qos.logback:logback-classic:1.4.5")
diff --git a/api-editor/gui/package-lock.json b/api-editor/gui/package-lock.json
index 36056535b..b96f8cf02 100644
--- a/api-editor/gui/package-lock.json
+++ b/api-editor/gui/package-lock.json
@@ -11,14 +11,14 @@
"dependencies": {
"@chakra-ui/react": "^2.3.6",
"@chakra-ui/styled-system": "^2.3.4",
- "@chakra-ui/system": "^2.2.12",
+ "@chakra-ui/system": "^2.3.7",
"@chakra-ui/theme-tools": "^2.0.12",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.5",
"@reduxjs/toolkit": "^1.8.6",
"chart.js": "^3.9.1",
"fastest-levenshtein": "^1.0.16",
- "framer-motion": "^7.6.17",
+ "framer-motion": "^8.1.3",
"idb-keyval": "^6.2.0",
"katex": "^0.16.2",
"lodash": "^4.17.21",
@@ -26,12 +26,12 @@
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
- "react-hook-form": "^7.39.0",
+ "react-hook-form": "^7.41.3",
"react-icons": "^4.6.0",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.4",
"react-router": "^6.3.0",
- "react-router-dom": "^6.4.4",
+ "react-router-dom": "^6.6.1",
"react-syntax-highlighter": "^15.5.0",
"react-window": "^1.8.7",
"rehype-katex": "^6.0.1",
@@ -52,7 +52,7 @@
"@types/react-syntax-highlighter": "^15.5.5",
"@types/react-window": "^1.8.4",
"@types/uuid": "^8.3.4",
- "@vitejs/plugin-react": "^2.1.0",
+ "@vitejs/plugin-react": "^2.2.0",
"jest": "^28.1.3",
"node-fetch": "^2.6.7",
"ts-jest": "^28.0.7",
@@ -90,28 +90,28 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz",
- "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==",
+ "version": "7.20.10",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz",
+ "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
- "version": "7.19.3",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz",
- "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz",
+ "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==",
"dependencies": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.19.3",
- "@babel/helper-compilation-targets": "^7.19.3",
- "@babel/helper-module-transforms": "^7.19.0",
- "@babel/helpers": "^7.19.0",
- "@babel/parser": "^7.19.3",
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.3",
- "@babel/types": "^7.19.3",
+ "@babel/generator": "^7.20.7",
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "@babel/helper-module-transforms": "^7.20.7",
+ "@babel/helpers": "^7.20.7",
+ "@babel/parser": "^7.20.7",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.7",
+ "@babel/types": "^7.20.7",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -127,11 +127,11 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.19.5",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz",
- "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
+ "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
"dependencies": {
- "@babel/types": "^7.19.4",
+ "@babel/types": "^7.20.7",
"@jridgewell/gen-mapping": "^0.3.2",
"jsesc": "^2.5.1"
},
@@ -165,13 +165,14 @@
}
},
"node_modules/@babel/helper-compilation-targets": {
- "version": "7.19.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz",
- "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
+ "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==",
"dependencies": {
- "@babel/compat-data": "^7.19.3",
+ "@babel/compat-data": "^7.20.5",
"@babel/helper-validator-option": "^7.18.6",
"browserslist": "^4.21.3",
+ "lru-cache": "^5.1.1",
"semver": "^6.3.0"
},
"engines": {
@@ -181,6 +182,19 @@
"@babel/core": "^7.0.0"
}
},
+ "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets/node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
+ },
"node_modules/@babel/helper-environment-visitor": {
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
@@ -224,18 +238,18 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.19.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz",
- "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==",
+ "version": "7.20.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz",
+ "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==",
"dependencies": {
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-module-imports": "^7.18.6",
- "@babel/helper-simple-access": "^7.18.6",
+ "@babel/helper-simple-access": "^7.20.2",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/helper-validator-identifier": "^7.18.6",
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.0",
- "@babel/types": "^7.19.0"
+ "@babel/helper-validator-identifier": "^7.19.1",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.10",
+ "@babel/types": "^7.20.7"
},
"engines": {
"node": ">=6.9.0"
@@ -250,11 +264,11 @@
}
},
"node_modules/@babel/helper-simple-access": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz",
- "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==",
+ "version": "7.20.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
+ "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==",
"dependencies": {
- "@babel/types": "^7.19.4"
+ "@babel/types": "^7.20.2"
},
"engines": {
"node": ">=6.9.0"
@@ -296,13 +310,13 @@
}
},
"node_modules/@babel/helpers": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz",
- "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz",
+ "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==",
"dependencies": {
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.4",
- "@babel/types": "^7.19.4"
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.7",
+ "@babel/types": "^7.20.7"
},
"engines": {
"node": ">=6.9.0"
@@ -322,9 +336,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz",
- "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
+ "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -558,12 +572,12 @@
}
},
"node_modules/@babel/plugin-transform-react-jsx-source": {
- "version": "7.18.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz",
- "integrity": "sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==",
+ "version": "7.19.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz",
+ "integrity": "sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.18.6"
+ "@babel/helper-plugin-utils": "^7.19.0"
},
"engines": {
"node": ">=6.9.0"
@@ -584,31 +598,31 @@
}
},
"node_modules/@babel/template": {
- "version": "7.18.10",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
- "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
+ "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
"dependencies": {
"@babel/code-frame": "^7.18.6",
- "@babel/parser": "^7.18.10",
- "@babel/types": "^7.18.10"
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz",
- "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==",
+ "version": "7.20.10",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
+ "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
"dependencies": {
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.19.4",
+ "@babel/generator": "^7.20.7",
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.19.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.19.4",
- "@babel/types": "^7.19.4",
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -617,9 +631,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
- "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
+ "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
"dependencies": {
"@babel/helper-string-parser": "^7.19.4",
"@babel/helper-validator-identifier": "^7.19.1",
@@ -802,16 +816,24 @@
}
},
"node_modules/@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "version": "2.1.11",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.11.tgz",
+ "integrity": "sha512-556wqI/MohJAqzP9AD+YsKGi982TzrsAaRGr7RCY5fChNe/wHraLPjMPNITPjjDQWiUmZYkaEos78/4u3qOdpA==",
"dependencies": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.4"
},
"peerDependencies": {
"react": ">=18"
}
},
+ "node_modules/@chakra-ui/color-mode/node_modules/@chakra-ui/react-use-safe-layout-effect": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.4.tgz",
+ "integrity": "sha512-GbQIdhiesXZ8DV+JxiERz3/zki6PELhYPz/7JxyFUk8xInJnUcuEz2L4bV7rXIm9/bd2kjf4gfV+lHOGfpJdLw==",
+ "peerDependencies": {
+ "react": ">=18"
+ }
+ },
"node_modules/@chakra-ui/control-box": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@chakra-ui/control-box/-/control-box-2.0.10.tgz",
@@ -1182,6 +1204,35 @@
"react-dom": ">=18"
}
},
+ "node_modules/@chakra-ui/provider/node_modules/@chakra-ui/color-mode": {
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "dependencies": {
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ },
+ "peerDependencies": {
+ "react": ">=18"
+ }
+ },
+ "node_modules/@chakra-ui/provider/node_modules/@chakra-ui/system": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "dependencies": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
+ "react-fast-compare": "3.2.0"
+ },
+ "peerDependencies": {
+ "@emotion/react": "^11.0.0",
+ "@emotion/styled": "^11.0.0",
+ "react": ">=18"
+ }
+ },
"node_modules/@chakra-ui/radio": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@chakra-ui/radio/-/radio-2.0.12.tgz",
@@ -1478,6 +1529,55 @@
"react": ">=18"
}
},
+ "node_modules/@chakra-ui/react/node_modules/@chakra-ui/color-mode": {
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "dependencies": {
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ },
+ "peerDependencies": {
+ "react": ">=18"
+ }
+ },
+ "node_modules/@chakra-ui/react/node_modules/@chakra-ui/system": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "dependencies": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
+ "react-fast-compare": "3.2.0"
+ },
+ "peerDependencies": {
+ "@emotion/react": "^11.0.0",
+ "@emotion/styled": "^11.0.0",
+ "react": ">=18"
+ }
+ },
+ "node_modules/@chakra-ui/react/node_modules/@chakra-ui/toast": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
+ "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
+ "dependencies": {
+ "@chakra-ui/alert": "2.0.11",
+ "@chakra-ui/close-button": "2.0.11",
+ "@chakra-ui/portal": "2.0.10",
+ "@chakra-ui/react-use-timeout": "2.0.2",
+ "@chakra-ui/react-use-update-effect": "2.0.4",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme": "2.1.14"
+ },
+ "peerDependencies": {
+ "@chakra-ui/system": "2.3.0",
+ "framer-motion": ">=4.0.0",
+ "react": ">=18",
+ "react-dom": ">=18"
+ }
+ },
"node_modules/@chakra-ui/select": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@chakra-ui/select/-/select-2.0.12.tgz",
@@ -1574,15 +1674,15 @@
}
},
"node_modules/@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "dependencies": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.7.tgz",
+ "integrity": "sha512-sUmLyo+zjv+Im56slRaQA5fw04y7JuVGKgGW8xcQan+jVtMI2gGBvnecOUeNNiEWglpW/pZ/AE9rgJX9dKkrkA==",
+ "dependencies": {
+ "@chakra-ui/color-mode": "2.1.11",
+ "@chakra-ui/react-utils": "2.0.11",
+ "@chakra-ui/styled-system": "2.5.1",
+ "@chakra-ui/theme-utils": "2.0.8",
+ "@chakra-ui/utils": "2.0.14",
"react-fast-compare": "3.2.0"
},
"peerDependencies": {
@@ -1591,6 +1691,93 @@
"react": ">=18"
}
},
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/anatomy": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/anatomy/-/anatomy-2.1.1.tgz",
+ "integrity": "sha512-LUHAoqJAgxAqmyckG5bUpBrfEo1FleEyY+1A8hkWciy58gZ+h3GoY9oBpHcdo7XdHPpy3G+3hieK/7i9NLwxAw=="
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/react-utils": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/react-utils/-/react-utils-2.0.11.tgz",
+ "integrity": "sha512-LdE0Ay5Em2ew7fuux9MJAwaxoaU/QwVoH/t6uiUw/JCWpmiMGY6tw6t3eZTvZSRZNfyPWY0MmvOHR1UvIS9JIw==",
+ "dependencies": {
+ "@chakra-ui/utils": "2.0.14"
+ },
+ "peerDependencies": {
+ "react": ">=18"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/shared-utils": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/shared-utils/-/shared-utils-2.0.4.tgz",
+ "integrity": "sha512-JGWr+BBj3PXGZQ2gxbKSD1wYjESbYsZjkCeE2nevyVk4rN3amV1wQzCnBAhsuJktMaZD6KC/lteo9ou9QUDzpA=="
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/styled-system": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/styled-system/-/styled-system-2.5.1.tgz",
+ "integrity": "sha512-HhaXR/r5eGlC7vkoOWQ31yZEj+Aq+kFee7ZZb0fBRGKQichn06S9Ugr8CsFyzb+jNexHdtBlIcTBm0ufJ8HsFA==",
+ "dependencies": {
+ "@chakra-ui/shared-utils": "2.0.4",
+ "csstype": "^3.0.11",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme/-/theme-2.2.4.tgz",
+ "integrity": "sha512-zo1FBfkJBsvpOGGByRB4aEvekdeT/9BB7Lz3rAluKkC+Wo8yce1tTSlvPMpf2f4lsEI8zVid5ATQ6u3+kIFg4w==",
+ "dependencies": {
+ "@chakra-ui/anatomy": "2.1.1",
+ "@chakra-ui/shared-utils": "2.0.4",
+ "@chakra-ui/theme-tools": "2.0.16"
+ },
+ "peerDependencies": {
+ "@chakra-ui/styled-system": ">=2.0.0"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme-tools": {
+ "version": "2.0.16",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme-tools/-/theme-tools-2.0.16.tgz",
+ "integrity": "sha512-B/LD+2LNDeHYd/LVCHIJqckVZfhrycTUpNbhRVAiDRaS0AAcsPxKas7liTFkkMkM076YjiHlcla3KpVX+E9tzg==",
+ "dependencies": {
+ "@chakra-ui/anatomy": "2.1.1",
+ "@chakra-ui/shared-utils": "2.0.4",
+ "color2k": "^2.0.0"
+ },
+ "peerDependencies": {
+ "@chakra-ui/styled-system": ">=2.0.0"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme-utils": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme-utils/-/theme-utils-2.0.8.tgz",
+ "integrity": "sha512-E4GT1tT5JTwsxRCgopdkLWx6oxd1lrI7DBLiwW0WxvtPmHfy5I9CB4CVnYBNHQZNXiJZyUQpCwKyGg2npGxv5Q==",
+ "dependencies": {
+ "@chakra-ui/shared-utils": "2.0.4",
+ "@chakra-ui/styled-system": "2.5.1",
+ "@chakra-ui/theme": "2.2.4",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/@chakra-ui/utils": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/utils/-/utils-2.0.14.tgz",
+ "integrity": "sha512-vYxtAUPY09Ex2Ae2ZvQKA1d2+lMKq/wUaRiqpwmeLfutEQuPQZc3qzQcAIMRQx3wLgXr9BUFDtHgBoOz0XKtZw==",
+ "dependencies": {
+ "@types/lodash.mergewith": "4.6.6",
+ "css-box-model": "1.2.1",
+ "framesync": "6.1.2",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "node_modules/@chakra-ui/system/node_modules/framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "dependencies": {
+ "tslib": "2.4.0"
+ }
+ },
"node_modules/@chakra-ui/table": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@chakra-ui/table/-/table-2.0.11.tgz",
@@ -1681,26 +1868,6 @@
"lodash.mergewith": "4.6.2"
}
},
- "node_modules/@chakra-ui/toast": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
- "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
- "dependencies": {
- "@chakra-ui/alert": "2.0.11",
- "@chakra-ui/close-button": "2.0.11",
- "@chakra-ui/portal": "2.0.10",
- "@chakra-ui/react-use-timeout": "2.0.2",
- "@chakra-ui/react-use-update-effect": "2.0.4",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme": "2.1.14"
- },
- "peerDependencies": {
- "@chakra-ui/system": "2.3.0",
- "framer-motion": ">=4.0.0",
- "react": ">=18",
- "react-dom": ">=18"
- }
- },
"node_modules/@chakra-ui/tooltip": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@chakra-ui/tooltip/-/tooltip-2.2.0.tgz",
@@ -2762,59 +2929,59 @@
}
},
"node_modules/@motionone/animation": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz",
- "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz",
+ "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==",
"dependencies": {
- "@motionone/easing": "^10.14.0",
- "@motionone/types": "^10.14.0",
- "@motionone/utils": "^10.14.0",
+ "@motionone/easing": "^10.15.1",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/dom": {
- "version": "10.13.1",
- "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz",
- "integrity": "sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ==",
- "dependencies": {
- "@motionone/animation": "^10.13.1",
- "@motionone/generators": "^10.13.1",
- "@motionone/types": "^10.13.0",
- "@motionone/utils": "^10.13.1",
+ "version": "10.15.3",
+ "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.15.3.tgz",
+ "integrity": "sha512-FQ7a2zMBXc1UeU8CG9G3yDpst55fbb0+C9A0VGfwOITitBCzigKZnXRgsRSWWR+FW57GSc13eGQxtYB0lKG0Ng==",
+ "dependencies": {
+ "@motionone/animation": "^10.15.1",
+ "@motionone/generators": "^10.15.1",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/easing": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz",
- "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz",
+ "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==",
"dependencies": {
- "@motionone/utils": "^10.14.0",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/generators": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz",
- "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz",
+ "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==",
"dependencies": {
- "@motionone/types": "^10.14.0",
- "@motionone/utils": "^10.14.0",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/types": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz",
- "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ=="
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz",
+ "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA=="
},
"node_modules/@motionone/utils": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz",
- "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz",
+ "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==",
"dependencies": {
- "@motionone/types": "^10.14.0",
+ "@motionone/types": "^10.15.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
@@ -2852,9 +3019,9 @@
}
},
"node_modules/@remix-run/router": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz",
- "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
+ "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==",
"engines": {
"node": ">=14"
}
@@ -3700,17 +3867,17 @@
"dev": true
},
"node_modules/@vitejs/plugin-react": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.1.0.tgz",
- "integrity": "sha512-am6rPyyU3LzUYne3Gd9oj9c4Rzbq5hQnuGXSMT6Gujq45Il/+bunwq3lrB7wghLkiF45ygMwft37vgJ/NE8IAA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.2.0.tgz",
+ "integrity": "sha512-FFpefhvExd1toVRlokZgxgy2JtnBOdp4ZDsq7ldCWaqGSGn9UhWMAVm/1lxPL14JfNS5yGz+s9yFrQY6shoStA==",
"dev": true,
"dependencies": {
- "@babel/core": "^7.18.13",
- "@babel/plugin-transform-react-jsx": "^7.18.10",
+ "@babel/core": "^7.19.6",
+ "@babel/plugin-transform-react-jsx": "^7.19.0",
"@babel/plugin-transform-react-jsx-development": "^7.18.6",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
- "@babel/plugin-transform-react-jsx-source": "^7.18.6",
- "magic-string": "^0.26.2",
+ "@babel/plugin-transform-react-jsx-source": "^7.19.6",
+ "magic-string": "^0.26.7",
"react-refresh": "^0.14.0"
},
"engines": {
@@ -4372,9 +4539,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001419",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz",
- "integrity": "sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==",
+ "version": "1.0.30001441",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz",
+ "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==",
"funding": [
{
"type": "opencollective",
@@ -4770,6 +4937,11 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
+ "node_modules/color2k": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.0.tgz",
+ "integrity": "sha512-DWX9eXOC4fbJNiuvdH4QSHvvfLWyFo9TuFp7V9OzdsbPAdrWAuYc8qvFP2bIQ/LKh4LrAVnJ6vhiQYPvAHdtTg=="
+ },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -5048,9 +5220,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
- "version": "1.4.281",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.281.tgz",
- "integrity": "sha512-yer0w5wCYdFoZytfmbNhwiGI/3cW06+RV7E23ln4490DVMxs7PvYpbsrSmAiBn/V6gode8wvJlST2YfWgvzWIg=="
+ "version": "1.4.284",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
+ "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
},
"node_modules/emittery": {
"version": "0.10.2",
@@ -5648,16 +5820,13 @@
}
},
"node_modules/framer-motion": {
- "version": "7.6.17",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.6.17.tgz",
- "integrity": "sha512-NmGBjKMCWlTDT156zR8G+jcpiM8OXbvmlgf1CPsVNk5x2RqJ9tieBKMNr6/OjJhirwyOp9s8bt8TsfrrCBIsEw==",
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-8.1.3.tgz",
+ "integrity": "sha512-pvlAEwjl4W6EMRp0rvWABCk+YyrlnPMXYzgyhkLSnBq9TdACFNeJBql7E40pMS0ttaWMKfwmH1A/raFCtcMf/A==",
"dependencies": {
- "@motionone/dom": "10.13.1",
- "framesync": "6.1.2",
+ "@motionone/dom": "^10.15.3",
"hey-listen": "^1.0.8",
- "popmotion": "11.0.5",
- "style-value-types": "5.1.2",
- "tslib": "2.4.0"
+ "tslib": "^2.4.0"
},
"optionalDependencies": {
"@emotion/is-prop-valid": "^0.8.2"
@@ -5682,14 +5851,6 @@
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
},
- "node_modules/framer-motion/node_modules/framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "dependencies": {
- "tslib": "2.4.0"
- }
- },
"node_modules/framesync": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/framesync/-/framesync-5.3.0.tgz",
@@ -9958,9 +10119,9 @@
"dev": true
},
"node_modules/node-releases": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
- "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg=="
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz",
+ "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A=="
},
"node_modules/normalize-path": {
"version": "3.0.0",
@@ -10321,25 +10482,6 @@
"node": ">=8"
}
},
- "node_modules/popmotion": {
- "version": "11.0.5",
- "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz",
- "integrity": "sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA==",
- "dependencies": {
- "framesync": "6.1.2",
- "hey-listen": "^1.0.8",
- "style-value-types": "5.1.2",
- "tslib": "2.4.0"
- }
- },
- "node_modules/popmotion/node_modules/framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "dependencies": {
- "tslib": "2.4.0"
- }
- },
"node_modules/postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
@@ -10593,9 +10735,9 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.39.0",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.39.0.tgz",
- "integrity": "sha512-rekW5NMBVG0nslE2choOKThy0zxLWQeoew87yTLwb3C9F91LaXwu/dhfFL/D3hdnSMnrTG60gVN/v6rvCrSOTw==",
+ "version": "7.41.3",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.41.3.tgz",
+ "integrity": "sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw==",
"engines": {
"node": ">=12.22.0"
},
@@ -10771,11 +10913,11 @@
}
},
"node_modules/react-router": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz",
- "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==",
+ "version": "6.6.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz",
+ "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==",
"dependencies": {
- "@remix-run/router": "1.0.4"
+ "@remix-run/router": "1.2.1"
},
"engines": {
"node": ">=14"
@@ -10785,12 +10927,12 @@
}
},
"node_modules/react-router-dom": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz",
- "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==",
+ "version": "6.6.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz",
+ "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==",
"dependencies": {
- "@remix-run/router": "1.0.4",
- "react-router": "6.4.4"
+ "@remix-run/router": "1.2.1",
+ "react-router": "6.6.1"
},
"engines": {
"node": ">=14"
@@ -11488,15 +11630,6 @@
"inline-style-parser": "0.1.1"
}
},
- "node_modules/style-value-types": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz",
- "integrity": "sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q==",
- "dependencies": {
- "hey-listen": "^1.0.8",
- "tslib": "2.4.0"
- }
- },
"node_modules/stylis": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
@@ -12645,25 +12778,25 @@
}
},
"@babel/compat-data": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz",
- "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw=="
+ "version": "7.20.10",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz",
+ "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg=="
},
"@babel/core": {
- "version": "7.19.3",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz",
- "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz",
+ "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==",
"requires": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.19.3",
- "@babel/helper-compilation-targets": "^7.19.3",
- "@babel/helper-module-transforms": "^7.19.0",
- "@babel/helpers": "^7.19.0",
- "@babel/parser": "^7.19.3",
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.3",
- "@babel/types": "^7.19.3",
+ "@babel/generator": "^7.20.7",
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "@babel/helper-module-transforms": "^7.20.7",
+ "@babel/helpers": "^7.20.7",
+ "@babel/parser": "^7.20.7",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.7",
+ "@babel/types": "^7.20.7",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -12672,11 +12805,11 @@
}
},
"@babel/generator": {
- "version": "7.19.5",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz",
- "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
+ "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
"requires": {
- "@babel/types": "^7.19.4",
+ "@babel/types": "^7.20.7",
"@jridgewell/gen-mapping": "^0.3.2",
"jsesc": "^2.5.1"
},
@@ -12703,14 +12836,30 @@
}
},
"@babel/helper-compilation-targets": {
- "version": "7.19.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz",
- "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
+ "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==",
"requires": {
- "@babel/compat-data": "^7.19.3",
+ "@babel/compat-data": "^7.20.5",
"@babel/helper-validator-option": "^7.18.6",
"browserslist": "^4.21.3",
+ "lru-cache": "^5.1.1",
"semver": "^6.3.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "requires": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
+ }
}
},
"@babel/helper-environment-visitor": {
@@ -12744,18 +12893,18 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.19.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz",
- "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==",
+ "version": "7.20.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz",
+ "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==",
"requires": {
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-module-imports": "^7.18.6",
- "@babel/helper-simple-access": "^7.18.6",
+ "@babel/helper-simple-access": "^7.20.2",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/helper-validator-identifier": "^7.18.6",
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.0",
- "@babel/types": "^7.19.0"
+ "@babel/helper-validator-identifier": "^7.19.1",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.10",
+ "@babel/types": "^7.20.7"
}
},
"@babel/helper-plugin-utils": {
@@ -12764,11 +12913,11 @@
"integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw=="
},
"@babel/helper-simple-access": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz",
- "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==",
+ "version": "7.20.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
+ "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==",
"requires": {
- "@babel/types": "^7.19.4"
+ "@babel/types": "^7.20.2"
}
},
"@babel/helper-split-export-declaration": {
@@ -12795,13 +12944,13 @@
"integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw=="
},
"@babel/helpers": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz",
- "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz",
+ "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==",
"requires": {
- "@babel/template": "^7.18.10",
- "@babel/traverse": "^7.19.4",
- "@babel/types": "^7.19.4"
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.20.7",
+ "@babel/types": "^7.20.7"
}
},
"@babel/highlight": {
@@ -12815,9 +12964,9 @@
}
},
"@babel/parser": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz",
- "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA=="
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
+ "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg=="
},
"@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
@@ -12976,12 +13125,12 @@
}
},
"@babel/plugin-transform-react-jsx-source": {
- "version": "7.18.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz",
- "integrity": "sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==",
+ "version": "7.19.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz",
+ "integrity": "sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.18.6"
+ "@babel/helper-plugin-utils": "^7.19.0"
}
},
"@babel/runtime": {
@@ -12993,36 +13142,36 @@
}
},
"@babel/template": {
- "version": "7.18.10",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
- "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
+ "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
"requires": {
"@babel/code-frame": "^7.18.6",
- "@babel/parser": "^7.18.10",
- "@babel/types": "^7.18.10"
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7"
}
},
"@babel/traverse": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz",
- "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==",
+ "version": "7.20.10",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
+ "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
"requires": {
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.19.4",
+ "@babel/generator": "^7.20.7",
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.19.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.19.4",
- "@babel/types": "^7.19.4",
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
"debug": "^4.1.0",
"globals": "^11.1.0"
}
},
"@babel/types": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
- "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
+ "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
"requires": {
"@babel/helper-string-parser": "^7.19.4",
"@babel/helper-validator-identifier": "^7.19.1",
@@ -13168,11 +13317,19 @@
}
},
"@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "version": "2.1.11",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.11.tgz",
+ "integrity": "sha512-556wqI/MohJAqzP9AD+YsKGi982TzrsAaRGr7RCY5fChNe/wHraLPjMPNITPjjDQWiUmZYkaEos78/4u3qOdpA==",
"requires": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.4"
+ },
+ "dependencies": {
+ "@chakra-ui/react-use-safe-layout-effect": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.4.tgz",
+ "integrity": "sha512-GbQIdhiesXZ8DV+JxiERz3/zki6PELhYPz/7JxyFUk8xInJnUcuEz2L4bV7rXIm9/bd2kjf4gfV+lHOGfpJdLw==",
+ "requires": {}
+ }
}
},
"@chakra-ui/control-box": {
@@ -13454,6 +13611,29 @@
"@chakra-ui/react-env": "2.0.10",
"@chakra-ui/system": "2.3.0",
"@chakra-ui/utils": "2.0.11"
+ },
+ "dependencies": {
+ "@chakra-ui/color-mode": {
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "requires": {
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ }
+ },
+ "@chakra-ui/system": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "requires": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
+ "react-fast-compare": "3.2.0"
+ }
+ }
}
},
"@chakra-ui/radio": {
@@ -13522,6 +13702,43 @@
"@chakra-ui/transition": "2.0.11",
"@chakra-ui/utils": "2.0.11",
"@chakra-ui/visually-hidden": "2.0.11"
+ },
+ "dependencies": {
+ "@chakra-ui/color-mode": {
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
+ "requires": {
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
+ }
+ },
+ "@chakra-ui/system": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "requires": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
+ "react-fast-compare": "3.2.0"
+ }
+ },
+ "@chakra-ui/toast": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
+ "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
+ "requires": {
+ "@chakra-ui/alert": "2.0.11",
+ "@chakra-ui/close-button": "2.0.11",
+ "@chakra-ui/portal": "2.0.10",
+ "@chakra-ui/react-use-timeout": "2.0.2",
+ "@chakra-ui/react-use-update-effect": "2.0.4",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme": "2.1.14"
+ }
+ }
}
},
"@chakra-ui/react-children-utils": {
@@ -13757,16 +13974,96 @@
}
},
"@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "requires": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.7.tgz",
+ "integrity": "sha512-sUmLyo+zjv+Im56slRaQA5fw04y7JuVGKgGW8xcQan+jVtMI2gGBvnecOUeNNiEWglpW/pZ/AE9rgJX9dKkrkA==",
+ "requires": {
+ "@chakra-ui/color-mode": "2.1.11",
+ "@chakra-ui/react-utils": "2.0.11",
+ "@chakra-ui/styled-system": "2.5.1",
+ "@chakra-ui/theme-utils": "2.0.8",
+ "@chakra-ui/utils": "2.0.14",
"react-fast-compare": "3.2.0"
+ },
+ "dependencies": {
+ "@chakra-ui/anatomy": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/anatomy/-/anatomy-2.1.1.tgz",
+ "integrity": "sha512-LUHAoqJAgxAqmyckG5bUpBrfEo1FleEyY+1A8hkWciy58gZ+h3GoY9oBpHcdo7XdHPpy3G+3hieK/7i9NLwxAw=="
+ },
+ "@chakra-ui/react-utils": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/react-utils/-/react-utils-2.0.11.tgz",
+ "integrity": "sha512-LdE0Ay5Em2ew7fuux9MJAwaxoaU/QwVoH/t6uiUw/JCWpmiMGY6tw6t3eZTvZSRZNfyPWY0MmvOHR1UvIS9JIw==",
+ "requires": {
+ "@chakra-ui/utils": "2.0.14"
+ }
+ },
+ "@chakra-ui/shared-utils": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/shared-utils/-/shared-utils-2.0.4.tgz",
+ "integrity": "sha512-JGWr+BBj3PXGZQ2gxbKSD1wYjESbYsZjkCeE2nevyVk4rN3amV1wQzCnBAhsuJktMaZD6KC/lteo9ou9QUDzpA=="
+ },
+ "@chakra-ui/styled-system": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/styled-system/-/styled-system-2.5.1.tgz",
+ "integrity": "sha512-HhaXR/r5eGlC7vkoOWQ31yZEj+Aq+kFee7ZZb0fBRGKQichn06S9Ugr8CsFyzb+jNexHdtBlIcTBm0ufJ8HsFA==",
+ "requires": {
+ "@chakra-ui/shared-utils": "2.0.4",
+ "csstype": "^3.0.11",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "@chakra-ui/theme": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme/-/theme-2.2.4.tgz",
+ "integrity": "sha512-zo1FBfkJBsvpOGGByRB4aEvekdeT/9BB7Lz3rAluKkC+Wo8yce1tTSlvPMpf2f4lsEI8zVid5ATQ6u3+kIFg4w==",
+ "requires": {
+ "@chakra-ui/anatomy": "2.1.1",
+ "@chakra-ui/shared-utils": "2.0.4",
+ "@chakra-ui/theme-tools": "2.0.16"
+ }
+ },
+ "@chakra-ui/theme-tools": {
+ "version": "2.0.16",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme-tools/-/theme-tools-2.0.16.tgz",
+ "integrity": "sha512-B/LD+2LNDeHYd/LVCHIJqckVZfhrycTUpNbhRVAiDRaS0AAcsPxKas7liTFkkMkM076YjiHlcla3KpVX+E9tzg==",
+ "requires": {
+ "@chakra-ui/anatomy": "2.1.1",
+ "@chakra-ui/shared-utils": "2.0.4",
+ "color2k": "^2.0.0"
+ }
+ },
+ "@chakra-ui/theme-utils": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/theme-utils/-/theme-utils-2.0.8.tgz",
+ "integrity": "sha512-E4GT1tT5JTwsxRCgopdkLWx6oxd1lrI7DBLiwW0WxvtPmHfy5I9CB4CVnYBNHQZNXiJZyUQpCwKyGg2npGxv5Q==",
+ "requires": {
+ "@chakra-ui/shared-utils": "2.0.4",
+ "@chakra-ui/styled-system": "2.5.1",
+ "@chakra-ui/theme": "2.2.4",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "@chakra-ui/utils": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/utils/-/utils-2.0.14.tgz",
+ "integrity": "sha512-vYxtAUPY09Ex2Ae2ZvQKA1d2+lMKq/wUaRiqpwmeLfutEQuPQZc3qzQcAIMRQx3wLgXr9BUFDtHgBoOz0XKtZw==",
+ "requires": {
+ "@types/lodash.mergewith": "4.6.6",
+ "css-box-model": "1.2.1",
+ "framesync": "6.1.2",
+ "lodash.mergewith": "4.6.2"
+ }
+ },
+ "framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "requires": {
+ "tslib": "2.4.0"
+ }
+ }
}
},
"@chakra-ui/table": {
@@ -13837,20 +14134,6 @@
"lodash.mergewith": "4.6.2"
}
},
- "@chakra-ui/toast": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
- "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
- "requires": {
- "@chakra-ui/alert": "2.0.11",
- "@chakra-ui/close-button": "2.0.11",
- "@chakra-ui/portal": "2.0.10",
- "@chakra-ui/react-use-timeout": "2.0.2",
- "@chakra-ui/react-use-update-effect": "2.0.4",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme": "2.1.14"
- }
- },
"@chakra-ui/tooltip": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@chakra-ui/tooltip/-/tooltip-2.2.0.tgz",
@@ -14665,59 +14948,59 @@
"requires": {}
},
"@motionone/animation": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz",
- "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz",
+ "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==",
"requires": {
- "@motionone/easing": "^10.14.0",
- "@motionone/types": "^10.14.0",
- "@motionone/utils": "^10.14.0",
+ "@motionone/easing": "^10.15.1",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"@motionone/dom": {
- "version": "10.13.1",
- "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz",
- "integrity": "sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ==",
- "requires": {
- "@motionone/animation": "^10.13.1",
- "@motionone/generators": "^10.13.1",
- "@motionone/types": "^10.13.0",
- "@motionone/utils": "^10.13.1",
+ "version": "10.15.3",
+ "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.15.3.tgz",
+ "integrity": "sha512-FQ7a2zMBXc1UeU8CG9G3yDpst55fbb0+C9A0VGfwOITitBCzigKZnXRgsRSWWR+FW57GSc13eGQxtYB0lKG0Ng==",
+ "requires": {
+ "@motionone/animation": "^10.15.1",
+ "@motionone/generators": "^10.15.1",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
},
"@motionone/easing": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz",
- "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz",
+ "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==",
"requires": {
- "@motionone/utils": "^10.14.0",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"@motionone/generators": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz",
- "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz",
+ "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==",
"requires": {
- "@motionone/types": "^10.14.0",
- "@motionone/utils": "^10.14.0",
+ "@motionone/types": "^10.15.1",
+ "@motionone/utils": "^10.15.1",
"tslib": "^2.3.1"
}
},
"@motionone/types": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz",
- "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ=="
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz",
+ "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA=="
},
"@motionone/utils": {
- "version": "10.14.0",
- "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz",
- "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==",
+ "version": "10.15.1",
+ "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz",
+ "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==",
"requires": {
- "@motionone/types": "^10.14.0",
+ "@motionone/types": "^10.15.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
@@ -14739,9 +15022,9 @@
}
},
"@remix-run/router": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz",
- "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg=="
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
+ "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ=="
},
"@sinclair/typebox": {
"version": "0.24.26",
@@ -15394,17 +15677,17 @@
"dev": true
},
"@vitejs/plugin-react": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.1.0.tgz",
- "integrity": "sha512-am6rPyyU3LzUYne3Gd9oj9c4Rzbq5hQnuGXSMT6Gujq45Il/+bunwq3lrB7wghLkiF45ygMwft37vgJ/NE8IAA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.2.0.tgz",
+ "integrity": "sha512-FFpefhvExd1toVRlokZgxgy2JtnBOdp4ZDsq7ldCWaqGSGn9UhWMAVm/1lxPL14JfNS5yGz+s9yFrQY6shoStA==",
"dev": true,
"requires": {
- "@babel/core": "^7.18.13",
- "@babel/plugin-transform-react-jsx": "^7.18.10",
+ "@babel/core": "^7.19.6",
+ "@babel/plugin-transform-react-jsx": "^7.19.0",
"@babel/plugin-transform-react-jsx-development": "^7.18.6",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
- "@babel/plugin-transform-react-jsx-source": "^7.18.6",
- "magic-string": "^0.26.2",
+ "@babel/plugin-transform-react-jsx-source": "^7.19.6",
+ "magic-string": "^0.26.7",
"react-refresh": "^0.14.0"
},
"dependencies": {
@@ -15866,9 +16149,9 @@
"dev": true
},
"caniuse-lite": {
- "version": "1.0.30001419",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz",
- "integrity": "sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw=="
+ "version": "1.0.30001441",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz",
+ "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg=="
},
"ccount": {
"version": "2.0.0",
@@ -16166,6 +16449,11 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
+ "color2k": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.0.tgz",
+ "integrity": "sha512-DWX9eXOC4fbJNiuvdH4QSHvvfLWyFo9TuFp7V9OzdsbPAdrWAuYc8qvFP2bIQ/LKh4LrAVnJ6vhiQYPvAHdtTg=="
+ },
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -16387,9 +16675,9 @@
"dev": true
},
"electron-to-chromium": {
- "version": "1.4.281",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.281.tgz",
- "integrity": "sha512-yer0w5wCYdFoZytfmbNhwiGI/3cW06+RV7E23ln4490DVMxs7PvYpbsrSmAiBn/V6gode8wvJlST2YfWgvzWIg=="
+ "version": "1.4.284",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
+ "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
},
"emittery": {
"version": "0.10.2",
@@ -16738,17 +17026,14 @@
"integrity": "sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs="
},
"framer-motion": {
- "version": "7.6.17",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.6.17.tgz",
- "integrity": "sha512-NmGBjKMCWlTDT156zR8G+jcpiM8OXbvmlgf1CPsVNk5x2RqJ9tieBKMNr6/OjJhirwyOp9s8bt8TsfrrCBIsEw==",
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-8.1.3.tgz",
+ "integrity": "sha512-pvlAEwjl4W6EMRp0rvWABCk+YyrlnPMXYzgyhkLSnBq9TdACFNeJBql7E40pMS0ttaWMKfwmH1A/raFCtcMf/A==",
"requires": {
"@emotion/is-prop-valid": "^0.8.2",
- "@motionone/dom": "10.13.1",
- "framesync": "6.1.2",
+ "@motionone/dom": "^10.15.3",
"hey-listen": "^1.0.8",
- "popmotion": "11.0.5",
- "style-value-types": "5.1.2",
- "tslib": "2.4.0"
+ "tslib": "^2.4.0"
},
"dependencies": {
"@emotion/is-prop-valid": {
@@ -16765,14 +17050,6 @@
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
- },
- "framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "requires": {
- "tslib": "2.4.0"
- }
}
}
},
@@ -19779,9 +20056,9 @@
"dev": true
},
"node-releases": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
- "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg=="
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz",
+ "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A=="
},
"normalize-path": {
"version": "3.0.0",
@@ -20038,27 +20315,6 @@
"find-up": "^4.0.0"
}
},
- "popmotion": {
- "version": "11.0.5",
- "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz",
- "integrity": "sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA==",
- "requires": {
- "framesync": "6.1.2",
- "hey-listen": "^1.0.8",
- "style-value-types": "5.1.2",
- "tslib": "2.4.0"
- },
- "dependencies": {
- "framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "requires": {
- "tslib": "2.4.0"
- }
- }
- }
- },
"postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
@@ -20239,9 +20495,9 @@
}
},
"react-hook-form": {
- "version": "7.39.0",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.39.0.tgz",
- "integrity": "sha512-rekW5NMBVG0nslE2choOKThy0zxLWQeoew87yTLwb3C9F91LaXwu/dhfFL/D3hdnSMnrTG60gVN/v6rvCrSOTw==",
+ "version": "7.41.3",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.41.3.tgz",
+ "integrity": "sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw==",
"requires": {}
},
"react-icons": {
@@ -20341,20 +20597,20 @@
}
},
"react-router": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz",
- "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==",
+ "version": "6.6.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz",
+ "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==",
"requires": {
- "@remix-run/router": "1.0.4"
+ "@remix-run/router": "1.2.1"
}
},
"react-router-dom": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz",
- "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==",
+ "version": "6.6.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz",
+ "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==",
"requires": {
- "@remix-run/router": "1.0.4",
- "react-router": "6.4.4"
+ "@remix-run/router": "1.2.1",
+ "react-router": "6.6.1"
}
},
"react-simple-animate": {
@@ -20867,15 +21123,6 @@
"inline-style-parser": "0.1.1"
}
},
- "style-value-types": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz",
- "integrity": "sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q==",
- "requires": {
- "hey-listen": "^1.0.8",
- "tslib": "2.4.0"
- }
- },
"stylis": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
diff --git a/api-editor/gui/package.json b/api-editor/gui/package.json
index 0ef10d841..9d6f68a2d 100644
--- a/api-editor/gui/package.json
+++ b/api-editor/gui/package.json
@@ -15,14 +15,14 @@
"dependencies": {
"@chakra-ui/react": "^2.3.6",
"@chakra-ui/styled-system": "^2.3.4",
- "@chakra-ui/system": "^2.2.12",
+ "@chakra-ui/system": "^2.3.7",
"@chakra-ui/theme-tools": "^2.0.12",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.5",
"@reduxjs/toolkit": "^1.8.6",
"chart.js": "^3.9.1",
"fastest-levenshtein": "^1.0.16",
- "framer-motion": "^7.6.17",
+ "framer-motion": "^8.1.3",
"idb-keyval": "^6.2.0",
"katex": "^0.16.2",
"lodash": "^4.17.21",
@@ -30,12 +30,12 @@
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
- "react-hook-form": "^7.39.0",
+ "react-hook-form": "^7.41.3",
"react-icons": "^4.6.0",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.4",
"react-router": "^6.3.0",
- "react-router-dom": "^6.4.4",
+ "react-router-dom": "^6.6.1",
"react-syntax-highlighter": "^15.5.0",
"react-window": "^1.8.7",
"rehype-katex": "^6.0.1",
@@ -56,7 +56,7 @@
"@types/react-syntax-highlighter": "^15.5.5",
"@types/react-window": "^1.8.4",
"@types/uuid": "^8.3.4",
- "@vitejs/plugin-react": "^2.1.0",
+ "@vitejs/plugin-react": "^2.2.0",
"jest": "^28.1.3",
"node-fetch": "^2.6.7",
"ts-jest": "^28.0.7",
diff --git a/package-parser/poetry.lock b/package-parser/poetry.lock
index 9a0468170..d89a842aa 100644
--- a/package-parser/poetry.lock
+++ b/package-parser/poetry.lock
@@ -456,7 +456,7 @@ python-versions = "*"
[[package]]
name = "spacy"
-version = "3.2.4"
+version = "3.2.5"
description = "Industrial-strength Natural Language Processing (NLP) in Python"
category = "main"
optional = false
@@ -465,7 +465,6 @@ python-versions = ">=3.6"
[package.dependencies]
blis = ">=0.4.0,<0.8.0"
catalogue = ">=2.0.6,<2.1.0"
-click = "<8.1.0"
cymem = ">=2.0.2,<2.1.0"
jinja2 = "*"
langcodes = ">=3.2.0,<4.0.0"
@@ -477,6 +476,7 @@ preshed = ">=3.0.2,<3.1.0"
pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<1.9.0"
requests = ">=2.13.0,<3.0.0"
setuptools = "*"
+smart-open = ">=5.2.1,<7.0.0"
spacy-legacy = ">=3.0.8,<3.1.0"
spacy-loggers = ">=1.0.0,<2.0.0"
srsly = ">=2.4.1,<3.0.0"
@@ -762,7 +762,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
[metadata]
lock-version = "1.1"
python-versions = "^3.10,<3.11"
-content-hash = "615b29f74dbb9eaf00a5ac90721896c65d1981fc0a81b3e0e1c877a8d683cdcb"
+content-hash = "9fc432508c7272f184e335ec3c993f5265dfe8e505755b6e47c0af3c9992f5a2"
[metadata.files]
alabaster = [
@@ -1191,27 +1191,28 @@ snowballstemmer = [
{file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"},
]
spacy = [
- {file = "spacy-3.2.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7e20c63ba47eaa33ebd4b2cc6eefa3e8906505273799138ad8ab231b146d8875"},
- {file = "spacy-3.2.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35be636d02b25984b94922d8851aaf9dc61cc20770a39193a08c59c647991235"},
- {file = "spacy-3.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc9184973c9052e1bb9eeb975801e6906aacbe0c009533ec0c34f443832473fd"},
- {file = "spacy-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:0168d97e7fbbddd3258016e4d3c10d1593b7129dddff146c14f3b103ade6b1cd"},
- {file = "spacy-3.2.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cff47cdaa824802cd38ae94fe98af9cde6810d86334cd283659c868e0011831a"},
- {file = "spacy-3.2.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:955539fb34230457a5e555fc7692b3b9287b02e92655c285c6960dbf2269d765"},
- {file = "spacy-3.2.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:400af3490c36c1b6c895de526ec06f6c7655af5ca595743c07e09e9bc8f378ea"},
- {file = "spacy-3.2.4-cp36-cp36m-win_amd64.whl", hash = "sha256:87bd072ccacedbf8bc5a692fea1d5c320abd26821c63af157a7c95baa47dc36d"},
- {file = "spacy-3.2.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:36e9ef5a32834383d37bbd27fca49388e31e9b53f77c91ba8ccbf19af10e3aef"},
- {file = "spacy-3.2.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ace1353902dd47cf7db57bde9b35e6900d6e400bda7e9191e35e7f625226ceed"},
- {file = "spacy-3.2.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e9a98999b0fce03d4f483112837ac7111378449ace069c7cd050908f0fa5d9f"},
- {file = "spacy-3.2.4-cp37-cp37m-win_amd64.whl", hash = "sha256:89be328ff378e4cdcfb4dcf38ca2fad740f87213825ed10e8ce9f54b822277b8"},
- {file = "spacy-3.2.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ed29278fc89f07c1999ceca5f6702b379589c8e884a57816bdaeb05a1a7b2bbb"},
- {file = "spacy-3.2.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79df903edd757767f3bed8d87d81da81f22636b701a9b79e6e0d9d2cbe5eb4c5"},
- {file = "spacy-3.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:090e684eec551b5b7d56d9242cea18742515a706191ad158e32e16e8f2fe15ac"},
- {file = "spacy-3.2.4-cp38-cp38-win_amd64.whl", hash = "sha256:2053cb78bcf4eec38aa266890a5700167a284d1a26197f851710d29f3d7071b3"},
- {file = "spacy-3.2.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6db861f69f18ba5e00d0bd44744cf1662e00cc3b564d17a1ccdc4625ec3d5c3d"},
- {file = "spacy-3.2.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6857d54b8de6f58b3091af1e3bd0838787c2a036872fabffe73ac153df7432d"},
- {file = "spacy-3.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac2288e87de1066ad65676e930f53978d6ee97c34044dca4d24f64a24e2a88b6"},
- {file = "spacy-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:e759e27da39e469b6367b82281a10eb4e50de04260ba49d42091cbdfe2d99633"},
- {file = "spacy-3.2.4.tar.gz", hash = "sha256:3e4c6f298d54044582daca1142b082ee38831bb3d7bb931d2ee601e8b8dce64f"},
+ {file = "spacy-3.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eac1887d6b94d0a683e5d2938e0d858dd29fae4195d7cd5a54895aa932698db1"},
+ {file = "spacy-3.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0f4f8519b6973f72e05f7a67ce4e76cf63bd2eb8df1d355d2753963dea521c2c"},
+ {file = "spacy-3.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4488417a9feb50ee43debc9c9fa211d9a2cf3aba0b97c50e7be4a5ead6b12c4b"},
+ {file = "spacy-3.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf402c4780521a4cb4aade219ab0ff787340801a97b1ed08b01d921b2a900f86"},
+ {file = "spacy-3.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:44fa52d69f10596b681eda2acf4accfe5361fa39790204734f4d9366d3144f25"},
+ {file = "spacy-3.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1950471a6c07f83f7543e048ab46e32f27b69ad6b7ece667b66f7d4621df51ab"},
+ {file = "spacy-3.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c51f3e2e4fa3888d84119dfbab6528e78dc163163e5e9ceb4b5b9ecfe274e3d0"},
+ {file = "spacy-3.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:db02efa3b81c204cc47cfc3c15d2539e2431e86e897ff15d41fe8843b712cefa"},
+ {file = "spacy-3.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1838efe488a1fdeccceb7a8dab1e665e8fe95f0e7e3d7e04e4ee0c08ba7cc792"},
+ {file = "spacy-3.2.5-cp36-cp36m-win_amd64.whl", hash = "sha256:c1462a16053548d9e974bcffc4282ec34970c92a052810790416e0a4da92a6bb"},
+ {file = "spacy-3.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e737906c33cc0fe9ae9caf1c6eddb8c61c753717ac12029047a7927c0e8c5a6e"},
+ {file = "spacy-3.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ac837e5431e861b7958a9f252ab5862ee5ab1a341104ecce75b6c702a647e5"},
+ {file = "spacy-3.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:214a7d374e82ffde0387f912c6cee29726c930ac1e9304cefa983f7917251346"},
+ {file = "spacy-3.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742483dc7585e83dee6cbc57791cd18be8fd54a3d7b2dd4f840acabc25d4a203"},
+ {file = "spacy-3.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:edf5a87983b4803db0f194c3dd97b26e61ecef29eb0dde2a3bb0391aca50ee35"},
+ {file = "spacy-3.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b387ed36f1f55db8f3a9081e78f5a27832cb1cd92e3a7b5da5b9c50772e17575"},
+ {file = "spacy-3.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:4183944826f51bf67c7e2f97c5ffe9526e71ab33ae655efdb84fa52d92cb0ee4"},
+ {file = "spacy-3.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f64e6c9d1ff3dbb37f35ab74848f1d486522e2c89bf3f1857334e7cbe5e2b12b"},
+ {file = "spacy-3.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:482969d8f105ac0bf1d6e88810d5cf4715281064eca97bbece4fbbbec759e5c1"},
+ {file = "spacy-3.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4517bc9e24a7c4dad43c891fc812b32ba23023c22df31972924b120cd5f15dd4"},
+ {file = "spacy-3.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:e21c1cba71f6dec9dcce9a3ce135a83194102ee90399b6d21ba8eea705bec192"},
+ {file = "spacy-3.2.5.tar.gz", hash = "sha256:3d440727df2ce813b37223f595034a38a904abe21ace2e7ef58e75e2d2dfc9dc"},
]
spacy-legacy = [
{file = "spacy-legacy-3.0.9.tar.gz", hash = "sha256:4f7dcbc4e6c8e8cb4eadbb009f9c0a1a2a67442e0032c8d6776c9470c3759903"},
diff --git a/package-parser/pyproject.toml b/package-parser/pyproject.toml
index 10611e289..06597c2be 100644
--- a/package-parser/pyproject.toml
+++ b/package-parser/pyproject.toml
@@ -12,7 +12,7 @@ parse-package = "package_parser.main:main"
python = "^3.10,<3.11"
astroid = "^2.12.13"
numpydoc = "^1.5"
-spacy = "^3.2.1"
+spacy = "^3.2.5"
scipy = "^1.9.3"
[tool.poetry.dependencies.en_core_web_sm]
From 1b4822a3a3616f4faf9263adbf0162e23d3f5414 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 15:46:00 +0100
Subject: [PATCH 24/40] Revert "Squashed commit of the following:"
This reverts commit ee19f127167d7f3d6b493f8b13b60ce06f5ea66f.
---
api-editor/backend/build.gradle.kts | 2 +-
api-editor/gui/package-lock.json | 1045 ++++++++++-----------------
api-editor/gui/package.json | 10 +-
package-parser/poetry.lock | 49 +-
package-parser/pyproject.toml | 2 +-
5 files changed, 430 insertions(+), 678 deletions(-)
diff --git a/api-editor/backend/build.gradle.kts b/api-editor/backend/build.gradle.kts
index bc628615b..9a169011e 100644
--- a/api-editor/backend/build.gradle.kts
+++ b/api-editor/backend/build.gradle.kts
@@ -34,7 +34,7 @@ tasks.withType {
// Dependencies --------------------------------------------------------------------------------------------------------
-val ktorVersion = "2.2.1"
+val ktorVersion = "2.1.3"
dependencies {
implementation("ch.qos.logback:logback-classic:1.4.5")
diff --git a/api-editor/gui/package-lock.json b/api-editor/gui/package-lock.json
index b96f8cf02..36056535b 100644
--- a/api-editor/gui/package-lock.json
+++ b/api-editor/gui/package-lock.json
@@ -11,14 +11,14 @@
"dependencies": {
"@chakra-ui/react": "^2.3.6",
"@chakra-ui/styled-system": "^2.3.4",
- "@chakra-ui/system": "^2.3.7",
+ "@chakra-ui/system": "^2.2.12",
"@chakra-ui/theme-tools": "^2.0.12",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.5",
"@reduxjs/toolkit": "^1.8.6",
"chart.js": "^3.9.1",
"fastest-levenshtein": "^1.0.16",
- "framer-motion": "^8.1.3",
+ "framer-motion": "^7.6.17",
"idb-keyval": "^6.2.0",
"katex": "^0.16.2",
"lodash": "^4.17.21",
@@ -26,12 +26,12 @@
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
- "react-hook-form": "^7.41.3",
+ "react-hook-form": "^7.39.0",
"react-icons": "^4.6.0",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.4",
"react-router": "^6.3.0",
- "react-router-dom": "^6.6.1",
+ "react-router-dom": "^6.4.4",
"react-syntax-highlighter": "^15.5.0",
"react-window": "^1.8.7",
"rehype-katex": "^6.0.1",
@@ -52,7 +52,7 @@
"@types/react-syntax-highlighter": "^15.5.5",
"@types/react-window": "^1.8.4",
"@types/uuid": "^8.3.4",
- "@vitejs/plugin-react": "^2.2.0",
+ "@vitejs/plugin-react": "^2.1.0",
"jest": "^28.1.3",
"node-fetch": "^2.6.7",
"ts-jest": "^28.0.7",
@@ -90,28 +90,28 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.20.10",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz",
- "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz",
+ "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz",
- "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==",
+ "version": "7.19.3",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz",
+ "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==",
"dependencies": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.20.7",
- "@babel/helper-compilation-targets": "^7.20.7",
- "@babel/helper-module-transforms": "^7.20.7",
- "@babel/helpers": "^7.20.7",
- "@babel/parser": "^7.20.7",
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.7",
- "@babel/types": "^7.20.7",
+ "@babel/generator": "^7.19.3",
+ "@babel/helper-compilation-targets": "^7.19.3",
+ "@babel/helper-module-transforms": "^7.19.0",
+ "@babel/helpers": "^7.19.0",
+ "@babel/parser": "^7.19.3",
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.3",
+ "@babel/types": "^7.19.3",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -127,11 +127,11 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
- "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
+ "version": "7.19.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz",
+ "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==",
"dependencies": {
- "@babel/types": "^7.20.7",
+ "@babel/types": "^7.19.4",
"@jridgewell/gen-mapping": "^0.3.2",
"jsesc": "^2.5.1"
},
@@ -165,14 +165,13 @@
}
},
"node_modules/@babel/helper-compilation-targets": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
- "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==",
+ "version": "7.19.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz",
+ "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==",
"dependencies": {
- "@babel/compat-data": "^7.20.5",
+ "@babel/compat-data": "^7.19.3",
"@babel/helper-validator-option": "^7.18.6",
"browserslist": "^4.21.3",
- "lru-cache": "^5.1.1",
"semver": "^6.3.0"
},
"engines": {
@@ -182,19 +181,6 @@
"@babel/core": "^7.0.0"
}
},
- "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dependencies": {
- "yallist": "^3.0.2"
- }
- },
- "node_modules/@babel/helper-compilation-targets/node_modules/yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- },
"node_modules/@babel/helper-environment-visitor": {
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
@@ -238,18 +224,18 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.20.11",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz",
- "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==",
+ "version": "7.19.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz",
+ "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==",
"dependencies": {
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-module-imports": "^7.18.6",
- "@babel/helper-simple-access": "^7.20.2",
+ "@babel/helper-simple-access": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/helper-validator-identifier": "^7.19.1",
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.10",
- "@babel/types": "^7.20.7"
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.0",
+ "@babel/types": "^7.19.0"
},
"engines": {
"node": ">=6.9.0"
@@ -264,11 +250,11 @@
}
},
"node_modules/@babel/helper-simple-access": {
- "version": "7.20.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
- "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz",
+ "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==",
"dependencies": {
- "@babel/types": "^7.20.2"
+ "@babel/types": "^7.19.4"
},
"engines": {
"node": ">=6.9.0"
@@ -310,13 +296,13 @@
}
},
"node_modules/@babel/helpers": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz",
- "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz",
+ "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==",
"dependencies": {
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.7",
- "@babel/types": "^7.20.7"
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.4",
+ "@babel/types": "^7.19.4"
},
"engines": {
"node": ">=6.9.0"
@@ -336,9 +322,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
- "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz",
+ "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -572,12 +558,12 @@
}
},
"node_modules/@babel/plugin-transform-react-jsx-source": {
- "version": "7.19.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz",
- "integrity": "sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==",
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz",
+ "integrity": "sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.19.0"
+ "@babel/helper-plugin-utils": "^7.18.6"
},
"engines": {
"node": ">=6.9.0"
@@ -598,31 +584,31 @@
}
},
"node_modules/@babel/template": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
- "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
+ "version": "7.18.10",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
+ "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==",
"dependencies": {
"@babel/code-frame": "^7.18.6",
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7"
+ "@babel/parser": "^7.18.10",
+ "@babel/types": "^7.18.10"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
- "version": "7.20.10",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
- "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz",
+ "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==",
"dependencies": {
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.20.7",
+ "@babel/generator": "^7.19.4",
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.19.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7",
+ "@babel/parser": "^7.19.4",
+ "@babel/types": "^7.19.4",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -631,9 +617,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
- "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
+ "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
"dependencies": {
"@babel/helper-string-parser": "^7.19.4",
"@babel/helper-validator-identifier": "^7.19.1",
@@ -816,24 +802,16 @@
}
},
"node_modules/@chakra-ui/color-mode": {
- "version": "2.1.11",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.11.tgz",
- "integrity": "sha512-556wqI/MohJAqzP9AD+YsKGi982TzrsAaRGr7RCY5fChNe/wHraLPjMPNITPjjDQWiUmZYkaEos78/4u3qOdpA==",
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
"dependencies": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.4"
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
},
"peerDependencies": {
"react": ">=18"
}
},
- "node_modules/@chakra-ui/color-mode/node_modules/@chakra-ui/react-use-safe-layout-effect": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.4.tgz",
- "integrity": "sha512-GbQIdhiesXZ8DV+JxiERz3/zki6PELhYPz/7JxyFUk8xInJnUcuEz2L4bV7rXIm9/bd2kjf4gfV+lHOGfpJdLw==",
- "peerDependencies": {
- "react": ">=18"
- }
- },
"node_modules/@chakra-ui/control-box": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@chakra-ui/control-box/-/control-box-2.0.10.tgz",
@@ -1204,35 +1182,6 @@
"react-dom": ">=18"
}
},
- "node_modules/@chakra-ui/provider/node_modules/@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
- "dependencies": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
- },
- "peerDependencies": {
- "react": ">=18"
- }
- },
- "node_modules/@chakra-ui/provider/node_modules/@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "dependencies": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
- "react-fast-compare": "3.2.0"
- },
- "peerDependencies": {
- "@emotion/react": "^11.0.0",
- "@emotion/styled": "^11.0.0",
- "react": ">=18"
- }
- },
"node_modules/@chakra-ui/radio": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@chakra-ui/radio/-/radio-2.0.12.tgz",
@@ -1529,55 +1478,6 @@
"react": ">=18"
}
},
- "node_modules/@chakra-ui/react/node_modules/@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
- "dependencies": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
- },
- "peerDependencies": {
- "react": ">=18"
- }
- },
- "node_modules/@chakra-ui/react/node_modules/@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "dependencies": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
- "react-fast-compare": "3.2.0"
- },
- "peerDependencies": {
- "@emotion/react": "^11.0.0",
- "@emotion/styled": "^11.0.0",
- "react": ">=18"
- }
- },
- "node_modules/@chakra-ui/react/node_modules/@chakra-ui/toast": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
- "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
- "dependencies": {
- "@chakra-ui/alert": "2.0.11",
- "@chakra-ui/close-button": "2.0.11",
- "@chakra-ui/portal": "2.0.10",
- "@chakra-ui/react-use-timeout": "2.0.2",
- "@chakra-ui/react-use-update-effect": "2.0.4",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme": "2.1.14"
- },
- "peerDependencies": {
- "@chakra-ui/system": "2.3.0",
- "framer-motion": ">=4.0.0",
- "react": ">=18",
- "react-dom": ">=18"
- }
- },
"node_modules/@chakra-ui/select": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@chakra-ui/select/-/select-2.0.12.tgz",
@@ -1674,15 +1574,15 @@
}
},
"node_modules/@chakra-ui/system": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.7.tgz",
- "integrity": "sha512-sUmLyo+zjv+Im56slRaQA5fw04y7JuVGKgGW8xcQan+jVtMI2gGBvnecOUeNNiEWglpW/pZ/AE9rgJX9dKkrkA==",
- "dependencies": {
- "@chakra-ui/color-mode": "2.1.11",
- "@chakra-ui/react-utils": "2.0.11",
- "@chakra-ui/styled-system": "2.5.1",
- "@chakra-ui/theme-utils": "2.0.8",
- "@chakra-ui/utils": "2.0.14",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "dependencies": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
"react-fast-compare": "3.2.0"
},
"peerDependencies": {
@@ -1691,93 +1591,6 @@
"react": ">=18"
}
},
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/anatomy": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/@chakra-ui/anatomy/-/anatomy-2.1.1.tgz",
- "integrity": "sha512-LUHAoqJAgxAqmyckG5bUpBrfEo1FleEyY+1A8hkWciy58gZ+h3GoY9oBpHcdo7XdHPpy3G+3hieK/7i9NLwxAw=="
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/react-utils": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/@chakra-ui/react-utils/-/react-utils-2.0.11.tgz",
- "integrity": "sha512-LdE0Ay5Em2ew7fuux9MJAwaxoaU/QwVoH/t6uiUw/JCWpmiMGY6tw6t3eZTvZSRZNfyPWY0MmvOHR1UvIS9JIw==",
- "dependencies": {
- "@chakra-ui/utils": "2.0.14"
- },
- "peerDependencies": {
- "react": ">=18"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/shared-utils": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/shared-utils/-/shared-utils-2.0.4.tgz",
- "integrity": "sha512-JGWr+BBj3PXGZQ2gxbKSD1wYjESbYsZjkCeE2nevyVk4rN3amV1wQzCnBAhsuJktMaZD6KC/lteo9ou9QUDzpA=="
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/styled-system": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@chakra-ui/styled-system/-/styled-system-2.5.1.tgz",
- "integrity": "sha512-HhaXR/r5eGlC7vkoOWQ31yZEj+Aq+kFee7ZZb0fBRGKQichn06S9Ugr8CsFyzb+jNexHdtBlIcTBm0ufJ8HsFA==",
- "dependencies": {
- "@chakra-ui/shared-utils": "2.0.4",
- "csstype": "^3.0.11",
- "lodash.mergewith": "4.6.2"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme/-/theme-2.2.4.tgz",
- "integrity": "sha512-zo1FBfkJBsvpOGGByRB4aEvekdeT/9BB7Lz3rAluKkC+Wo8yce1tTSlvPMpf2f4lsEI8zVid5ATQ6u3+kIFg4w==",
- "dependencies": {
- "@chakra-ui/anatomy": "2.1.1",
- "@chakra-ui/shared-utils": "2.0.4",
- "@chakra-ui/theme-tools": "2.0.16"
- },
- "peerDependencies": {
- "@chakra-ui/styled-system": ">=2.0.0"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme-tools": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme-tools/-/theme-tools-2.0.16.tgz",
- "integrity": "sha512-B/LD+2LNDeHYd/LVCHIJqckVZfhrycTUpNbhRVAiDRaS0AAcsPxKas7liTFkkMkM076YjiHlcla3KpVX+E9tzg==",
- "dependencies": {
- "@chakra-ui/anatomy": "2.1.1",
- "@chakra-ui/shared-utils": "2.0.4",
- "color2k": "^2.0.0"
- },
- "peerDependencies": {
- "@chakra-ui/styled-system": ">=2.0.0"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/theme-utils": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme-utils/-/theme-utils-2.0.8.tgz",
- "integrity": "sha512-E4GT1tT5JTwsxRCgopdkLWx6oxd1lrI7DBLiwW0WxvtPmHfy5I9CB4CVnYBNHQZNXiJZyUQpCwKyGg2npGxv5Q==",
- "dependencies": {
- "@chakra-ui/shared-utils": "2.0.4",
- "@chakra-ui/styled-system": "2.5.1",
- "@chakra-ui/theme": "2.2.4",
- "lodash.mergewith": "4.6.2"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/@chakra-ui/utils": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/@chakra-ui/utils/-/utils-2.0.14.tgz",
- "integrity": "sha512-vYxtAUPY09Ex2Ae2ZvQKA1d2+lMKq/wUaRiqpwmeLfutEQuPQZc3qzQcAIMRQx3wLgXr9BUFDtHgBoOz0XKtZw==",
- "dependencies": {
- "@types/lodash.mergewith": "4.6.6",
- "css-box-model": "1.2.1",
- "framesync": "6.1.2",
- "lodash.mergewith": "4.6.2"
- }
- },
- "node_modules/@chakra-ui/system/node_modules/framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "dependencies": {
- "tslib": "2.4.0"
- }
- },
"node_modules/@chakra-ui/table": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@chakra-ui/table/-/table-2.0.11.tgz",
@@ -1868,6 +1681,26 @@
"lodash.mergewith": "4.6.2"
}
},
+ "node_modules/@chakra-ui/toast": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
+ "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
+ "dependencies": {
+ "@chakra-ui/alert": "2.0.11",
+ "@chakra-ui/close-button": "2.0.11",
+ "@chakra-ui/portal": "2.0.10",
+ "@chakra-ui/react-use-timeout": "2.0.2",
+ "@chakra-ui/react-use-update-effect": "2.0.4",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme": "2.1.14"
+ },
+ "peerDependencies": {
+ "@chakra-ui/system": "2.3.0",
+ "framer-motion": ">=4.0.0",
+ "react": ">=18",
+ "react-dom": ">=18"
+ }
+ },
"node_modules/@chakra-ui/tooltip": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@chakra-ui/tooltip/-/tooltip-2.2.0.tgz",
@@ -2929,59 +2762,59 @@
}
},
"node_modules/@motionone/animation": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz",
- "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz",
+ "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==",
"dependencies": {
- "@motionone/easing": "^10.15.1",
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "@motionone/easing": "^10.14.0",
+ "@motionone/types": "^10.14.0",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/dom": {
- "version": "10.15.3",
- "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.15.3.tgz",
- "integrity": "sha512-FQ7a2zMBXc1UeU8CG9G3yDpst55fbb0+C9A0VGfwOITitBCzigKZnXRgsRSWWR+FW57GSc13eGQxtYB0lKG0Ng==",
- "dependencies": {
- "@motionone/animation": "^10.15.1",
- "@motionone/generators": "^10.15.1",
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "version": "10.13.1",
+ "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz",
+ "integrity": "sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ==",
+ "dependencies": {
+ "@motionone/animation": "^10.13.1",
+ "@motionone/generators": "^10.13.1",
+ "@motionone/types": "^10.13.0",
+ "@motionone/utils": "^10.13.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/easing": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz",
- "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz",
+ "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==",
"dependencies": {
- "@motionone/utils": "^10.15.1",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/generators": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz",
- "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz",
+ "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==",
"dependencies": {
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "@motionone/types": "^10.14.0",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"node_modules/@motionone/types": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz",
- "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA=="
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz",
+ "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ=="
},
"node_modules/@motionone/utils": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz",
- "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz",
+ "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==",
"dependencies": {
- "@motionone/types": "^10.15.1",
+ "@motionone/types": "^10.14.0",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
@@ -3019,9 +2852,9 @@
}
},
"node_modules/@remix-run/router": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
- "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz",
+ "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg==",
"engines": {
"node": ">=14"
}
@@ -3867,17 +3700,17 @@
"dev": true
},
"node_modules/@vitejs/plugin-react": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.2.0.tgz",
- "integrity": "sha512-FFpefhvExd1toVRlokZgxgy2JtnBOdp4ZDsq7ldCWaqGSGn9UhWMAVm/1lxPL14JfNS5yGz+s9yFrQY6shoStA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.1.0.tgz",
+ "integrity": "sha512-am6rPyyU3LzUYne3Gd9oj9c4Rzbq5hQnuGXSMT6Gujq45Il/+bunwq3lrB7wghLkiF45ygMwft37vgJ/NE8IAA==",
"dev": true,
"dependencies": {
- "@babel/core": "^7.19.6",
- "@babel/plugin-transform-react-jsx": "^7.19.0",
+ "@babel/core": "^7.18.13",
+ "@babel/plugin-transform-react-jsx": "^7.18.10",
"@babel/plugin-transform-react-jsx-development": "^7.18.6",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
- "@babel/plugin-transform-react-jsx-source": "^7.19.6",
- "magic-string": "^0.26.7",
+ "@babel/plugin-transform-react-jsx-source": "^7.18.6",
+ "magic-string": "^0.26.2",
"react-refresh": "^0.14.0"
},
"engines": {
@@ -4539,9 +4372,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001441",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz",
- "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==",
+ "version": "1.0.30001419",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz",
+ "integrity": "sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==",
"funding": [
{
"type": "opencollective",
@@ -4937,11 +4770,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
- "node_modules/color2k": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.0.tgz",
- "integrity": "sha512-DWX9eXOC4fbJNiuvdH4QSHvvfLWyFo9TuFp7V9OzdsbPAdrWAuYc8qvFP2bIQ/LKh4LrAVnJ6vhiQYPvAHdtTg=="
- },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -5220,9 +5048,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
- "version": "1.4.284",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
- "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
+ "version": "1.4.281",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.281.tgz",
+ "integrity": "sha512-yer0w5wCYdFoZytfmbNhwiGI/3cW06+RV7E23ln4490DVMxs7PvYpbsrSmAiBn/V6gode8wvJlST2YfWgvzWIg=="
},
"node_modules/emittery": {
"version": "0.10.2",
@@ -5820,13 +5648,16 @@
}
},
"node_modules/framer-motion": {
- "version": "8.1.3",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-8.1.3.tgz",
- "integrity": "sha512-pvlAEwjl4W6EMRp0rvWABCk+YyrlnPMXYzgyhkLSnBq9TdACFNeJBql7E40pMS0ttaWMKfwmH1A/raFCtcMf/A==",
+ "version": "7.6.17",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.6.17.tgz",
+ "integrity": "sha512-NmGBjKMCWlTDT156zR8G+jcpiM8OXbvmlgf1CPsVNk5x2RqJ9tieBKMNr6/OjJhirwyOp9s8bt8TsfrrCBIsEw==",
"dependencies": {
- "@motionone/dom": "^10.15.3",
+ "@motionone/dom": "10.13.1",
+ "framesync": "6.1.2",
"hey-listen": "^1.0.8",
- "tslib": "^2.4.0"
+ "popmotion": "11.0.5",
+ "style-value-types": "5.1.2",
+ "tslib": "2.4.0"
},
"optionalDependencies": {
"@emotion/is-prop-valid": "^0.8.2"
@@ -5851,6 +5682,14 @@
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
},
+ "node_modules/framer-motion/node_modules/framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "dependencies": {
+ "tslib": "2.4.0"
+ }
+ },
"node_modules/framesync": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/framesync/-/framesync-5.3.0.tgz",
@@ -10119,9 +9958,9 @@
"dev": true
},
"node_modules/node-releases": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz",
- "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A=="
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg=="
},
"node_modules/normalize-path": {
"version": "3.0.0",
@@ -10482,6 +10321,25 @@
"node": ">=8"
}
},
+ "node_modules/popmotion": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz",
+ "integrity": "sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA==",
+ "dependencies": {
+ "framesync": "6.1.2",
+ "hey-listen": "^1.0.8",
+ "style-value-types": "5.1.2",
+ "tslib": "2.4.0"
+ }
+ },
+ "node_modules/popmotion/node_modules/framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "dependencies": {
+ "tslib": "2.4.0"
+ }
+ },
"node_modules/postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
@@ -10735,9 +10593,9 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.41.3",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.41.3.tgz",
- "integrity": "sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw==",
+ "version": "7.39.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.39.0.tgz",
+ "integrity": "sha512-rekW5NMBVG0nslE2choOKThy0zxLWQeoew87yTLwb3C9F91LaXwu/dhfFL/D3hdnSMnrTG60gVN/v6rvCrSOTw==",
"engines": {
"node": ">=12.22.0"
},
@@ -10913,11 +10771,11 @@
}
},
"node_modules/react-router": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz",
- "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz",
+ "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==",
"dependencies": {
- "@remix-run/router": "1.2.1"
+ "@remix-run/router": "1.0.4"
},
"engines": {
"node": ">=14"
@@ -10927,12 +10785,12 @@
}
},
"node_modules/react-router-dom": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz",
- "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz",
+ "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==",
"dependencies": {
- "@remix-run/router": "1.2.1",
- "react-router": "6.6.1"
+ "@remix-run/router": "1.0.4",
+ "react-router": "6.4.4"
},
"engines": {
"node": ">=14"
@@ -11630,6 +11488,15 @@
"inline-style-parser": "0.1.1"
}
},
+ "node_modules/style-value-types": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz",
+ "integrity": "sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q==",
+ "dependencies": {
+ "hey-listen": "^1.0.8",
+ "tslib": "2.4.0"
+ }
+ },
"node_modules/stylis": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
@@ -12778,25 +12645,25 @@
}
},
"@babel/compat-data": {
- "version": "7.20.10",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz",
- "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg=="
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz",
+ "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw=="
},
"@babel/core": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz",
- "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==",
+ "version": "7.19.3",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz",
+ "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==",
"requires": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.20.7",
- "@babel/helper-compilation-targets": "^7.20.7",
- "@babel/helper-module-transforms": "^7.20.7",
- "@babel/helpers": "^7.20.7",
- "@babel/parser": "^7.20.7",
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.7",
- "@babel/types": "^7.20.7",
+ "@babel/generator": "^7.19.3",
+ "@babel/helper-compilation-targets": "^7.19.3",
+ "@babel/helper-module-transforms": "^7.19.0",
+ "@babel/helpers": "^7.19.0",
+ "@babel/parser": "^7.19.3",
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.3",
+ "@babel/types": "^7.19.3",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -12805,11 +12672,11 @@
}
},
"@babel/generator": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
- "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
+ "version": "7.19.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz",
+ "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==",
"requires": {
- "@babel/types": "^7.20.7",
+ "@babel/types": "^7.19.4",
"@jridgewell/gen-mapping": "^0.3.2",
"jsesc": "^2.5.1"
},
@@ -12836,30 +12703,14 @@
}
},
"@babel/helper-compilation-targets": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
- "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==",
+ "version": "7.19.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz",
+ "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==",
"requires": {
- "@babel/compat-data": "^7.20.5",
+ "@babel/compat-data": "^7.19.3",
"@babel/helper-validator-option": "^7.18.6",
"browserslist": "^4.21.3",
- "lru-cache": "^5.1.1",
"semver": "^6.3.0"
- },
- "dependencies": {
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "requires": {
- "yallist": "^3.0.2"
- }
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
}
},
"@babel/helper-environment-visitor": {
@@ -12893,18 +12744,18 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.20.11",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz",
- "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==",
+ "version": "7.19.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz",
+ "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==",
"requires": {
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-module-imports": "^7.18.6",
- "@babel/helper-simple-access": "^7.20.2",
+ "@babel/helper-simple-access": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/helper-validator-identifier": "^7.19.1",
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.10",
- "@babel/types": "^7.20.7"
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.0",
+ "@babel/types": "^7.19.0"
}
},
"@babel/helper-plugin-utils": {
@@ -12913,11 +12764,11 @@
"integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw=="
},
"@babel/helper-simple-access": {
- "version": "7.20.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
- "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz",
+ "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==",
"requires": {
- "@babel/types": "^7.20.2"
+ "@babel/types": "^7.19.4"
}
},
"@babel/helper-split-export-declaration": {
@@ -12944,13 +12795,13 @@
"integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw=="
},
"@babel/helpers": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz",
- "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz",
+ "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==",
"requires": {
- "@babel/template": "^7.20.7",
- "@babel/traverse": "^7.20.7",
- "@babel/types": "^7.20.7"
+ "@babel/template": "^7.18.10",
+ "@babel/traverse": "^7.19.4",
+ "@babel/types": "^7.19.4"
}
},
"@babel/highlight": {
@@ -12964,9 +12815,9 @@
}
},
"@babel/parser": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
- "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg=="
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz",
+ "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA=="
},
"@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
@@ -13125,12 +12976,12 @@
}
},
"@babel/plugin-transform-react-jsx-source": {
- "version": "7.19.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz",
- "integrity": "sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==",
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz",
+ "integrity": "sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.19.0"
+ "@babel/helper-plugin-utils": "^7.18.6"
}
},
"@babel/runtime": {
@@ -13142,36 +12993,36 @@
}
},
"@babel/template": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
- "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
+ "version": "7.18.10",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
+ "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==",
"requires": {
"@babel/code-frame": "^7.18.6",
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7"
+ "@babel/parser": "^7.18.10",
+ "@babel/types": "^7.18.10"
}
},
"@babel/traverse": {
- "version": "7.20.10",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
- "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz",
+ "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==",
"requires": {
"@babel/code-frame": "^7.18.6",
- "@babel/generator": "^7.20.7",
+ "@babel/generator": "^7.19.4",
"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.19.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7",
+ "@babel/parser": "^7.19.4",
+ "@babel/types": "^7.19.4",
"debug": "^4.1.0",
"globals": "^11.1.0"
}
},
"@babel/types": {
- "version": "7.20.7",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
- "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
+ "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
"requires": {
"@babel/helper-string-parser": "^7.19.4",
"@babel/helper-validator-identifier": "^7.19.1",
@@ -13317,19 +13168,11 @@
}
},
"@chakra-ui/color-mode": {
- "version": "2.1.11",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.11.tgz",
- "integrity": "sha512-556wqI/MohJAqzP9AD+YsKGi982TzrsAaRGr7RCY5fChNe/wHraLPjMPNITPjjDQWiUmZYkaEos78/4u3qOdpA==",
+ "version": "2.1.9",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
+ "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
"requires": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.4"
- },
- "dependencies": {
- "@chakra-ui/react-use-safe-layout-effect": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.4.tgz",
- "integrity": "sha512-GbQIdhiesXZ8DV+JxiERz3/zki6PELhYPz/7JxyFUk8xInJnUcuEz2L4bV7rXIm9/bd2kjf4gfV+lHOGfpJdLw==",
- "requires": {}
- }
+ "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
}
},
"@chakra-ui/control-box": {
@@ -13611,29 +13454,6 @@
"@chakra-ui/react-env": "2.0.10",
"@chakra-ui/system": "2.3.0",
"@chakra-ui/utils": "2.0.11"
- },
- "dependencies": {
- "@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
- "requires": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
- }
- },
- "@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "requires": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
- "react-fast-compare": "3.2.0"
- }
- }
}
},
"@chakra-ui/radio": {
@@ -13702,43 +13522,6 @@
"@chakra-ui/transition": "2.0.11",
"@chakra-ui/utils": "2.0.11",
"@chakra-ui/visually-hidden": "2.0.11"
- },
- "dependencies": {
- "@chakra-ui/color-mode": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@chakra-ui/color-mode/-/color-mode-2.1.9.tgz",
- "integrity": "sha512-0kx0I+AQon8oS23/X+qMtnhsv/1BUulyJvU56p3Uh8CRaBfgJ7Ly9CerShoUL+5kadu6hN1M9oty4cugaCwv2w==",
- "requires": {
- "@chakra-ui/react-use-safe-layout-effect": "2.0.2"
- }
- },
- "@chakra-ui/system": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
- "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
- "requires": {
- "@chakra-ui/color-mode": "2.1.9",
- "@chakra-ui/react-utils": "2.0.8",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme-utils": "2.0.1",
- "@chakra-ui/utils": "2.0.11",
- "react-fast-compare": "3.2.0"
- }
- },
- "@chakra-ui/toast": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
- "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
- "requires": {
- "@chakra-ui/alert": "2.0.11",
- "@chakra-ui/close-button": "2.0.11",
- "@chakra-ui/portal": "2.0.10",
- "@chakra-ui/react-use-timeout": "2.0.2",
- "@chakra-ui/react-use-update-effect": "2.0.4",
- "@chakra-ui/styled-system": "2.3.4",
- "@chakra-ui/theme": "2.1.14"
- }
- }
}
},
"@chakra-ui/react-children-utils": {
@@ -13974,96 +13757,16 @@
}
},
"@chakra-ui/system": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.7.tgz",
- "integrity": "sha512-sUmLyo+zjv+Im56slRaQA5fw04y7JuVGKgGW8xcQan+jVtMI2gGBvnecOUeNNiEWglpW/pZ/AE9rgJX9dKkrkA==",
- "requires": {
- "@chakra-ui/color-mode": "2.1.11",
- "@chakra-ui/react-utils": "2.0.11",
- "@chakra-ui/styled-system": "2.5.1",
- "@chakra-ui/theme-utils": "2.0.8",
- "@chakra-ui/utils": "2.0.14",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.3.0.tgz",
+ "integrity": "sha512-BxikahglBI0uU8FE3anEorDTU5oKTUuBIEKVcQrEVnrbNuRJEy1OVYyCNXfqW3MpruRO9ypYV2bWt02AZZWEaQ==",
+ "requires": {
+ "@chakra-ui/color-mode": "2.1.9",
+ "@chakra-ui/react-utils": "2.0.8",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme-utils": "2.0.1",
+ "@chakra-ui/utils": "2.0.11",
"react-fast-compare": "3.2.0"
- },
- "dependencies": {
- "@chakra-ui/anatomy": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/@chakra-ui/anatomy/-/anatomy-2.1.1.tgz",
- "integrity": "sha512-LUHAoqJAgxAqmyckG5bUpBrfEo1FleEyY+1A8hkWciy58gZ+h3GoY9oBpHcdo7XdHPpy3G+3hieK/7i9NLwxAw=="
- },
- "@chakra-ui/react-utils": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/@chakra-ui/react-utils/-/react-utils-2.0.11.tgz",
- "integrity": "sha512-LdE0Ay5Em2ew7fuux9MJAwaxoaU/QwVoH/t6uiUw/JCWpmiMGY6tw6t3eZTvZSRZNfyPWY0MmvOHR1UvIS9JIw==",
- "requires": {
- "@chakra-ui/utils": "2.0.14"
- }
- },
- "@chakra-ui/shared-utils": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/shared-utils/-/shared-utils-2.0.4.tgz",
- "integrity": "sha512-JGWr+BBj3PXGZQ2gxbKSD1wYjESbYsZjkCeE2nevyVk4rN3amV1wQzCnBAhsuJktMaZD6KC/lteo9ou9QUDzpA=="
- },
- "@chakra-ui/styled-system": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/@chakra-ui/styled-system/-/styled-system-2.5.1.tgz",
- "integrity": "sha512-HhaXR/r5eGlC7vkoOWQ31yZEj+Aq+kFee7ZZb0fBRGKQichn06S9Ugr8CsFyzb+jNexHdtBlIcTBm0ufJ8HsFA==",
- "requires": {
- "@chakra-ui/shared-utils": "2.0.4",
- "csstype": "^3.0.11",
- "lodash.mergewith": "4.6.2"
- }
- },
- "@chakra-ui/theme": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme/-/theme-2.2.4.tgz",
- "integrity": "sha512-zo1FBfkJBsvpOGGByRB4aEvekdeT/9BB7Lz3rAluKkC+Wo8yce1tTSlvPMpf2f4lsEI8zVid5ATQ6u3+kIFg4w==",
- "requires": {
- "@chakra-ui/anatomy": "2.1.1",
- "@chakra-ui/shared-utils": "2.0.4",
- "@chakra-ui/theme-tools": "2.0.16"
- }
- },
- "@chakra-ui/theme-tools": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme-tools/-/theme-tools-2.0.16.tgz",
- "integrity": "sha512-B/LD+2LNDeHYd/LVCHIJqckVZfhrycTUpNbhRVAiDRaS0AAcsPxKas7liTFkkMkM076YjiHlcla3KpVX+E9tzg==",
- "requires": {
- "@chakra-ui/anatomy": "2.1.1",
- "@chakra-ui/shared-utils": "2.0.4",
- "color2k": "^2.0.0"
- }
- },
- "@chakra-ui/theme-utils": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/@chakra-ui/theme-utils/-/theme-utils-2.0.8.tgz",
- "integrity": "sha512-E4GT1tT5JTwsxRCgopdkLWx6oxd1lrI7DBLiwW0WxvtPmHfy5I9CB4CVnYBNHQZNXiJZyUQpCwKyGg2npGxv5Q==",
- "requires": {
- "@chakra-ui/shared-utils": "2.0.4",
- "@chakra-ui/styled-system": "2.5.1",
- "@chakra-ui/theme": "2.2.4",
- "lodash.mergewith": "4.6.2"
- }
- },
- "@chakra-ui/utils": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/@chakra-ui/utils/-/utils-2.0.14.tgz",
- "integrity": "sha512-vYxtAUPY09Ex2Ae2ZvQKA1d2+lMKq/wUaRiqpwmeLfutEQuPQZc3qzQcAIMRQx3wLgXr9BUFDtHgBoOz0XKtZw==",
- "requires": {
- "@types/lodash.mergewith": "4.6.6",
- "css-box-model": "1.2.1",
- "framesync": "6.1.2",
- "lodash.mergewith": "4.6.2"
- }
- },
- "framesync": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
- "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
- "requires": {
- "tslib": "2.4.0"
- }
- }
}
},
"@chakra-ui/table": {
@@ -14134,6 +13837,20 @@
"lodash.mergewith": "4.6.2"
}
},
+ "@chakra-ui/toast": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@chakra-ui/toast/-/toast-4.0.0.tgz",
+ "integrity": "sha512-abeeloJac5T9WK2IN76fEM5FSRH+erNXln2HqDf5wLBn33avSBXWyTiUL8riVSUqto0lrIn6FuK/MmKo0DH4og==",
+ "requires": {
+ "@chakra-ui/alert": "2.0.11",
+ "@chakra-ui/close-button": "2.0.11",
+ "@chakra-ui/portal": "2.0.10",
+ "@chakra-ui/react-use-timeout": "2.0.2",
+ "@chakra-ui/react-use-update-effect": "2.0.4",
+ "@chakra-ui/styled-system": "2.3.4",
+ "@chakra-ui/theme": "2.1.14"
+ }
+ },
"@chakra-ui/tooltip": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@chakra-ui/tooltip/-/tooltip-2.2.0.tgz",
@@ -14948,59 +14665,59 @@
"requires": {}
},
"@motionone/animation": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz",
- "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz",
+ "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==",
"requires": {
- "@motionone/easing": "^10.15.1",
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "@motionone/easing": "^10.14.0",
+ "@motionone/types": "^10.14.0",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"@motionone/dom": {
- "version": "10.15.3",
- "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.15.3.tgz",
- "integrity": "sha512-FQ7a2zMBXc1UeU8CG9G3yDpst55fbb0+C9A0VGfwOITitBCzigKZnXRgsRSWWR+FW57GSc13eGQxtYB0lKG0Ng==",
- "requires": {
- "@motionone/animation": "^10.15.1",
- "@motionone/generators": "^10.15.1",
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "version": "10.13.1",
+ "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz",
+ "integrity": "sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ==",
+ "requires": {
+ "@motionone/animation": "^10.13.1",
+ "@motionone/generators": "^10.13.1",
+ "@motionone/types": "^10.13.0",
+ "@motionone/utils": "^10.13.1",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
},
"@motionone/easing": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz",
- "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz",
+ "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==",
"requires": {
- "@motionone/utils": "^10.15.1",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"@motionone/generators": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz",
- "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz",
+ "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==",
"requires": {
- "@motionone/types": "^10.15.1",
- "@motionone/utils": "^10.15.1",
+ "@motionone/types": "^10.14.0",
+ "@motionone/utils": "^10.14.0",
"tslib": "^2.3.1"
}
},
"@motionone/types": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz",
- "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA=="
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz",
+ "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ=="
},
"@motionone/utils": {
- "version": "10.15.1",
- "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz",
- "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==",
+ "version": "10.14.0",
+ "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz",
+ "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==",
"requires": {
- "@motionone/types": "^10.15.1",
+ "@motionone/types": "^10.14.0",
"hey-listen": "^1.0.8",
"tslib": "^2.3.1"
}
@@ -15022,9 +14739,9 @@
}
},
"@remix-run/router": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.2.1.tgz",
- "integrity": "sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ=="
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.4.tgz",
+ "integrity": "sha512-gTL8H5USTAKOyVA4xczzDJnC3HMssdFa3tRlwBicXynx9XfiXwneHnYQogwSKpdCkjXISrEKSTtX62rLpNEVQg=="
},
"@sinclair/typebox": {
"version": "0.24.26",
@@ -15677,17 +15394,17 @@
"dev": true
},
"@vitejs/plugin-react": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.2.0.tgz",
- "integrity": "sha512-FFpefhvExd1toVRlokZgxgy2JtnBOdp4ZDsq7ldCWaqGSGn9UhWMAVm/1lxPL14JfNS5yGz+s9yFrQY6shoStA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-2.1.0.tgz",
+ "integrity": "sha512-am6rPyyU3LzUYne3Gd9oj9c4Rzbq5hQnuGXSMT6Gujq45Il/+bunwq3lrB7wghLkiF45ygMwft37vgJ/NE8IAA==",
"dev": true,
"requires": {
- "@babel/core": "^7.19.6",
- "@babel/plugin-transform-react-jsx": "^7.19.0",
+ "@babel/core": "^7.18.13",
+ "@babel/plugin-transform-react-jsx": "^7.18.10",
"@babel/plugin-transform-react-jsx-development": "^7.18.6",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
- "@babel/plugin-transform-react-jsx-source": "^7.19.6",
- "magic-string": "^0.26.7",
+ "@babel/plugin-transform-react-jsx-source": "^7.18.6",
+ "magic-string": "^0.26.2",
"react-refresh": "^0.14.0"
},
"dependencies": {
@@ -16149,9 +15866,9 @@
"dev": true
},
"caniuse-lite": {
- "version": "1.0.30001441",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz",
- "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg=="
+ "version": "1.0.30001419",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz",
+ "integrity": "sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw=="
},
"ccount": {
"version": "2.0.0",
@@ -16449,11 +16166,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
- "color2k": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.0.tgz",
- "integrity": "sha512-DWX9eXOC4fbJNiuvdH4QSHvvfLWyFo9TuFp7V9OzdsbPAdrWAuYc8qvFP2bIQ/LKh4LrAVnJ6vhiQYPvAHdtTg=="
- },
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -16675,9 +16387,9 @@
"dev": true
},
"electron-to-chromium": {
- "version": "1.4.284",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
- "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
+ "version": "1.4.281",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.281.tgz",
+ "integrity": "sha512-yer0w5wCYdFoZytfmbNhwiGI/3cW06+RV7E23ln4490DVMxs7PvYpbsrSmAiBn/V6gode8wvJlST2YfWgvzWIg=="
},
"emittery": {
"version": "0.10.2",
@@ -17026,14 +16738,17 @@
"integrity": "sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs="
},
"framer-motion": {
- "version": "8.1.3",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-8.1.3.tgz",
- "integrity": "sha512-pvlAEwjl4W6EMRp0rvWABCk+YyrlnPMXYzgyhkLSnBq9TdACFNeJBql7E40pMS0ttaWMKfwmH1A/raFCtcMf/A==",
+ "version": "7.6.17",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.6.17.tgz",
+ "integrity": "sha512-NmGBjKMCWlTDT156zR8G+jcpiM8OXbvmlgf1CPsVNk5x2RqJ9tieBKMNr6/OjJhirwyOp9s8bt8TsfrrCBIsEw==",
"requires": {
"@emotion/is-prop-valid": "^0.8.2",
- "@motionone/dom": "^10.15.3",
+ "@motionone/dom": "10.13.1",
+ "framesync": "6.1.2",
"hey-listen": "^1.0.8",
- "tslib": "^2.4.0"
+ "popmotion": "11.0.5",
+ "style-value-types": "5.1.2",
+ "tslib": "2.4.0"
},
"dependencies": {
"@emotion/is-prop-valid": {
@@ -17050,6 +16765,14 @@
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
+ },
+ "framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "requires": {
+ "tslib": "2.4.0"
+ }
}
}
},
@@ -20056,9 +19779,9 @@
"dev": true
},
"node-releases": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz",
- "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A=="
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg=="
},
"normalize-path": {
"version": "3.0.0",
@@ -20315,6 +20038,27 @@
"find-up": "^4.0.0"
}
},
+ "popmotion": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz",
+ "integrity": "sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA==",
+ "requires": {
+ "framesync": "6.1.2",
+ "hey-listen": "^1.0.8",
+ "style-value-types": "5.1.2",
+ "tslib": "2.4.0"
+ },
+ "dependencies": {
+ "framesync": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz",
+ "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==",
+ "requires": {
+ "tslib": "2.4.0"
+ }
+ }
+ }
+ },
"postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
@@ -20495,9 +20239,9 @@
}
},
"react-hook-form": {
- "version": "7.41.3",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.41.3.tgz",
- "integrity": "sha512-5QNTmqJtDb88WV5n41b6+AmcDMVyaJ3tccPgHAgS215w3jZ3bmJhDO27kNTr8u4YHNYXmS7p1/4/KachBAlUtw==",
+ "version": "7.39.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.39.0.tgz",
+ "integrity": "sha512-rekW5NMBVG0nslE2choOKThy0zxLWQeoew87yTLwb3C9F91LaXwu/dhfFL/D3hdnSMnrTG60gVN/v6rvCrSOTw==",
"requires": {}
},
"react-icons": {
@@ -20597,20 +20341,20 @@
}
},
"react-router": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz",
- "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.4.tgz",
+ "integrity": "sha512-SA6tSrUCRfuLWeYsTJDuriRqfFIsrSvuH7SqAJHegx9ZgxadE119rU8oOX/rG5FYEthpdEaEljdjDlnBxvfr+Q==",
"requires": {
- "@remix-run/router": "1.2.1"
+ "@remix-run/router": "1.0.4"
}
},
"react-router-dom": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz",
- "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.4.tgz",
+ "integrity": "sha512-0Axverhw5d+4SBhLqLpzPhNkmv7gahUwlUVIOrRLGJ4/uwt30JVajVJXqv2Qr/LCwyvHhQc7YyK1Do8a9Jj7qA==",
"requires": {
- "@remix-run/router": "1.2.1",
- "react-router": "6.6.1"
+ "@remix-run/router": "1.0.4",
+ "react-router": "6.4.4"
}
},
"react-simple-animate": {
@@ -21123,6 +20867,15 @@
"inline-style-parser": "0.1.1"
}
},
+ "style-value-types": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz",
+ "integrity": "sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q==",
+ "requires": {
+ "hey-listen": "^1.0.8",
+ "tslib": "2.4.0"
+ }
+ },
"stylis": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
diff --git a/api-editor/gui/package.json b/api-editor/gui/package.json
index 9d6f68a2d..0ef10d841 100644
--- a/api-editor/gui/package.json
+++ b/api-editor/gui/package.json
@@ -15,14 +15,14 @@
"dependencies": {
"@chakra-ui/react": "^2.3.6",
"@chakra-ui/styled-system": "^2.3.4",
- "@chakra-ui/system": "^2.3.7",
+ "@chakra-ui/system": "^2.2.12",
"@chakra-ui/theme-tools": "^2.0.12",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.5",
"@reduxjs/toolkit": "^1.8.6",
"chart.js": "^3.9.1",
"fastest-levenshtein": "^1.0.16",
- "framer-motion": "^8.1.3",
+ "framer-motion": "^7.6.17",
"idb-keyval": "^6.2.0",
"katex": "^0.16.2",
"lodash": "^4.17.21",
@@ -30,12 +30,12 @@
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
- "react-hook-form": "^7.41.3",
+ "react-hook-form": "^7.39.0",
"react-icons": "^4.6.0",
"react-markdown": "^8.0.3",
"react-redux": "^8.0.4",
"react-router": "^6.3.0",
- "react-router-dom": "^6.6.1",
+ "react-router-dom": "^6.4.4",
"react-syntax-highlighter": "^15.5.0",
"react-window": "^1.8.7",
"rehype-katex": "^6.0.1",
@@ -56,7 +56,7 @@
"@types/react-syntax-highlighter": "^15.5.5",
"@types/react-window": "^1.8.4",
"@types/uuid": "^8.3.4",
- "@vitejs/plugin-react": "^2.2.0",
+ "@vitejs/plugin-react": "^2.1.0",
"jest": "^28.1.3",
"node-fetch": "^2.6.7",
"ts-jest": "^28.0.7",
diff --git a/package-parser/poetry.lock b/package-parser/poetry.lock
index d89a842aa..9a0468170 100644
--- a/package-parser/poetry.lock
+++ b/package-parser/poetry.lock
@@ -456,7 +456,7 @@ python-versions = "*"
[[package]]
name = "spacy"
-version = "3.2.5"
+version = "3.2.4"
description = "Industrial-strength Natural Language Processing (NLP) in Python"
category = "main"
optional = false
@@ -465,6 +465,7 @@ python-versions = ">=3.6"
[package.dependencies]
blis = ">=0.4.0,<0.8.0"
catalogue = ">=2.0.6,<2.1.0"
+click = "<8.1.0"
cymem = ">=2.0.2,<2.1.0"
jinja2 = "*"
langcodes = ">=3.2.0,<4.0.0"
@@ -476,7 +477,6 @@ preshed = ">=3.0.2,<3.1.0"
pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<1.9.0"
requests = ">=2.13.0,<3.0.0"
setuptools = "*"
-smart-open = ">=5.2.1,<7.0.0"
spacy-legacy = ">=3.0.8,<3.1.0"
spacy-loggers = ">=1.0.0,<2.0.0"
srsly = ">=2.4.1,<3.0.0"
@@ -762,7 +762,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
[metadata]
lock-version = "1.1"
python-versions = "^3.10,<3.11"
-content-hash = "9fc432508c7272f184e335ec3c993f5265dfe8e505755b6e47c0af3c9992f5a2"
+content-hash = "615b29f74dbb9eaf00a5ac90721896c65d1981fc0a81b3e0e1c877a8d683cdcb"
[metadata.files]
alabaster = [
@@ -1191,28 +1191,27 @@ snowballstemmer = [
{file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"},
]
spacy = [
- {file = "spacy-3.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eac1887d6b94d0a683e5d2938e0d858dd29fae4195d7cd5a54895aa932698db1"},
- {file = "spacy-3.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0f4f8519b6973f72e05f7a67ce4e76cf63bd2eb8df1d355d2753963dea521c2c"},
- {file = "spacy-3.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4488417a9feb50ee43debc9c9fa211d9a2cf3aba0b97c50e7be4a5ead6b12c4b"},
- {file = "spacy-3.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf402c4780521a4cb4aade219ab0ff787340801a97b1ed08b01d921b2a900f86"},
- {file = "spacy-3.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:44fa52d69f10596b681eda2acf4accfe5361fa39790204734f4d9366d3144f25"},
- {file = "spacy-3.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1950471a6c07f83f7543e048ab46e32f27b69ad6b7ece667b66f7d4621df51ab"},
- {file = "spacy-3.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c51f3e2e4fa3888d84119dfbab6528e78dc163163e5e9ceb4b5b9ecfe274e3d0"},
- {file = "spacy-3.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:db02efa3b81c204cc47cfc3c15d2539e2431e86e897ff15d41fe8843b712cefa"},
- {file = "spacy-3.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1838efe488a1fdeccceb7a8dab1e665e8fe95f0e7e3d7e04e4ee0c08ba7cc792"},
- {file = "spacy-3.2.5-cp36-cp36m-win_amd64.whl", hash = "sha256:c1462a16053548d9e974bcffc4282ec34970c92a052810790416e0a4da92a6bb"},
- {file = "spacy-3.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e737906c33cc0fe9ae9caf1c6eddb8c61c753717ac12029047a7927c0e8c5a6e"},
- {file = "spacy-3.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ac837e5431e861b7958a9f252ab5862ee5ab1a341104ecce75b6c702a647e5"},
- {file = "spacy-3.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:214a7d374e82ffde0387f912c6cee29726c930ac1e9304cefa983f7917251346"},
- {file = "spacy-3.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742483dc7585e83dee6cbc57791cd18be8fd54a3d7b2dd4f840acabc25d4a203"},
- {file = "spacy-3.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:edf5a87983b4803db0f194c3dd97b26e61ecef29eb0dde2a3bb0391aca50ee35"},
- {file = "spacy-3.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b387ed36f1f55db8f3a9081e78f5a27832cb1cd92e3a7b5da5b9c50772e17575"},
- {file = "spacy-3.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:4183944826f51bf67c7e2f97c5ffe9526e71ab33ae655efdb84fa52d92cb0ee4"},
- {file = "spacy-3.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f64e6c9d1ff3dbb37f35ab74848f1d486522e2c89bf3f1857334e7cbe5e2b12b"},
- {file = "spacy-3.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:482969d8f105ac0bf1d6e88810d5cf4715281064eca97bbece4fbbbec759e5c1"},
- {file = "spacy-3.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4517bc9e24a7c4dad43c891fc812b32ba23023c22df31972924b120cd5f15dd4"},
- {file = "spacy-3.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:e21c1cba71f6dec9dcce9a3ce135a83194102ee90399b6d21ba8eea705bec192"},
- {file = "spacy-3.2.5.tar.gz", hash = "sha256:3d440727df2ce813b37223f595034a38a904abe21ace2e7ef58e75e2d2dfc9dc"},
+ {file = "spacy-3.2.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7e20c63ba47eaa33ebd4b2cc6eefa3e8906505273799138ad8ab231b146d8875"},
+ {file = "spacy-3.2.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35be636d02b25984b94922d8851aaf9dc61cc20770a39193a08c59c647991235"},
+ {file = "spacy-3.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc9184973c9052e1bb9eeb975801e6906aacbe0c009533ec0c34f443832473fd"},
+ {file = "spacy-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:0168d97e7fbbddd3258016e4d3c10d1593b7129dddff146c14f3b103ade6b1cd"},
+ {file = "spacy-3.2.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cff47cdaa824802cd38ae94fe98af9cde6810d86334cd283659c868e0011831a"},
+ {file = "spacy-3.2.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:955539fb34230457a5e555fc7692b3b9287b02e92655c285c6960dbf2269d765"},
+ {file = "spacy-3.2.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:400af3490c36c1b6c895de526ec06f6c7655af5ca595743c07e09e9bc8f378ea"},
+ {file = "spacy-3.2.4-cp36-cp36m-win_amd64.whl", hash = "sha256:87bd072ccacedbf8bc5a692fea1d5c320abd26821c63af157a7c95baa47dc36d"},
+ {file = "spacy-3.2.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:36e9ef5a32834383d37bbd27fca49388e31e9b53f77c91ba8ccbf19af10e3aef"},
+ {file = "spacy-3.2.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ace1353902dd47cf7db57bde9b35e6900d6e400bda7e9191e35e7f625226ceed"},
+ {file = "spacy-3.2.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e9a98999b0fce03d4f483112837ac7111378449ace069c7cd050908f0fa5d9f"},
+ {file = "spacy-3.2.4-cp37-cp37m-win_amd64.whl", hash = "sha256:89be328ff378e4cdcfb4dcf38ca2fad740f87213825ed10e8ce9f54b822277b8"},
+ {file = "spacy-3.2.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ed29278fc89f07c1999ceca5f6702b379589c8e884a57816bdaeb05a1a7b2bbb"},
+ {file = "spacy-3.2.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79df903edd757767f3bed8d87d81da81f22636b701a9b79e6e0d9d2cbe5eb4c5"},
+ {file = "spacy-3.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:090e684eec551b5b7d56d9242cea18742515a706191ad158e32e16e8f2fe15ac"},
+ {file = "spacy-3.2.4-cp38-cp38-win_amd64.whl", hash = "sha256:2053cb78bcf4eec38aa266890a5700167a284d1a26197f851710d29f3d7071b3"},
+ {file = "spacy-3.2.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6db861f69f18ba5e00d0bd44744cf1662e00cc3b564d17a1ccdc4625ec3d5c3d"},
+ {file = "spacy-3.2.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6857d54b8de6f58b3091af1e3bd0838787c2a036872fabffe73ac153df7432d"},
+ {file = "spacy-3.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac2288e87de1066ad65676e930f53978d6ee97c34044dca4d24f64a24e2a88b6"},
+ {file = "spacy-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:e759e27da39e469b6367b82281a10eb4e50de04260ba49d42091cbdfe2d99633"},
+ {file = "spacy-3.2.4.tar.gz", hash = "sha256:3e4c6f298d54044582daca1142b082ee38831bb3d7bb931d2ee601e8b8dce64f"},
]
spacy-legacy = [
{file = "spacy-legacy-3.0.9.tar.gz", hash = "sha256:4f7dcbc4e6c8e8cb4eadbb009f9c0a1a2a67442e0032c8d6776c9470c3759903"},
diff --git a/package-parser/pyproject.toml b/package-parser/pyproject.toml
index 06597c2be..10611e289 100644
--- a/package-parser/pyproject.toml
+++ b/package-parser/pyproject.toml
@@ -12,7 +12,7 @@ parse-package = "package_parser.main:main"
python = "^3.10,<3.11"
astroid = "^2.12.13"
numpydoc = "^1.5"
-spacy = "^3.2.5"
+spacy = "^3.2.1"
scipy = "^1.9.3"
[tool.poetry.dependencies.en_core_web_sm]
From bc3920208421ea21ed8cd47cb67e2581cb145cdd Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:49:47 +0100
Subject: [PATCH 25/40] add test data
and improve RenameAnnotation
---
.../processing/migration/_migrate.py | 7 +-
.../annotations/_migrate_rename_annotation.py | 41 +++++++--
.../processing/migration/model/_mapping.py | 21 +++--
.../tests/data/migration/annotationv1.json | 25 +++--
.../tests/data/migration/annotationv2.json | 47 +++++-----
.../tests/data/migration/apiv1_data.json | 27 ++++++
.../tests/data/migration/apiv2_data.json | 37 +++++++-
.../data/migration/unsure_annotationv2.json | 55 +++--------
.../annotations/test_rename_migration.py | 91 ++++++-------------
.../processing/migration/test_migration.py | 11 +--
10 files changed, 196 insertions(+), 166 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index caf4040e3..20deed726 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,3 +1,4 @@
+from dataclasses import dataclass
from typing import Optional, Tuple
from package_parser.processing.annotations.model import (
@@ -40,14 +41,14 @@
class Migration:
reliable_similarity: float
unsure_similarity: float
- migrated_annotation_store: AnnotationStore = AnnotationStore()
- unsure_migrated_annotation_store: AnnotationStore = AnnotationStore()
def __init__(
- self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.5
+ self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.8
) -> None:
self.reliable_similarity = reliable_similarity
self.unsure_similarity = unsure_similarity
+ self.migrated_annotation_store: AnnotationStore = AnnotationStore()
+ self.unsure_migrated_annotation_store: AnnotationStore = AnnotationStore()
@staticmethod
def _get_mapping_from_annotation(
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index 5827da22e..b29e4fc62 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -14,6 +14,7 @@
)
from ._constants import migration_author
+from ._get_annotated_api_element import get_annotated_api_element
from ._get_migration_text import get_migration_text
@@ -33,20 +34,40 @@ def migrate_rename_annotation(
rename_annotation.target = element.id
return [rename_annotation]
- todo_annotations: list[AbstractAnnotation] = []
+ annotated_apiv1_element = get_annotated_api_element(
+ rename_annotation, mapping.get_apiv1_elements()
+ )
+ if annotated_apiv1_element is None:
+ return []
+
+ annotations: list[AbstractAnnotation] = []
for element in mapping.get_apiv2_elements():
- if not isinstance(element, (Attribute, Result)):
- if element.name in (
+ if isinstance(element, type(annotated_apiv1_element)):
+ if element.name not in (
new_name,
rename_annotation.target.split(".")[-1],
):
- rename_annotation.reviewResult = EnumReviewResult.UNSURE
- rename_annotation.comment = get_migration_text(
- rename_annotation, mapping
+ annotations.append(RenameAnnotation(
+ element.id,
+ authors,
+ rename_annotation.reviewers,
+ get_migration_text(rename_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ rename_annotation.newName,
+ )
+ )
+ else:
+ annotations.append(RenameAnnotation(
+ element.id,
+ authors,
+ rename_annotation.reviewers,
+ rename_annotation.comment,
+ EnumReviewResult.NONE,
+ rename_annotation.newName,
+ )
)
- rename_annotation.target = element.id
- return [rename_annotation]
- todo_annotations.append(
+ elif not isinstance(element, (Attribute, Result)):
+ annotations.append(
TodoAnnotation(
element.id,
authors,
@@ -58,4 +79,4 @@ def migrate_rename_annotation(
),
)
)
- return todo_annotations
+ return annotations
diff --git a/package-parser/package_parser/processing/migration/model/_mapping.py b/package-parser/package_parser/processing/migration/model/_mapping.py
index d50c41f38..53ee5650c 100644
--- a/package-parser/package_parser/processing/migration/model/_mapping.py
+++ b/package-parser/package_parser/processing/migration/model/_mapping.py
@@ -83,12 +83,8 @@ def get_apiv2_elements(self) -> list[api_element]:
def merge_mappings(mapping_a: Mapping, mapping_b: Mapping) -> Mapping:
similarity = (mapping_a.similarity + mapping_b.similarity) / 2
- codomain: list[api_element] = list(
- set(mapping_a.get_apiv2_elements()) | set(mapping_b.get_apiv2_elements())
- )
- domain: list[api_element] = list(
- set(mapping_a.get_apiv1_elements()) | set(mapping_b.get_apiv1_elements())
- )
+ codomain = merge_api_elements_and_remove_duplicates(mapping_a.get_apiv2_elements(), mapping_b.get_apiv2_elements())
+ domain: list[api_element] = merge_api_elements_and_remove_duplicates(mapping_a.get_apiv1_elements(), mapping_b.get_apiv1_elements())
if len(domain) == 1 and len(codomain) == 1:
return OneToOneMapping(similarity, domain[0], codomain[0])
if len(domain) == 1:
@@ -98,6 +94,19 @@ def merge_mappings(mapping_a: Mapping, mapping_b: Mapping) -> Mapping:
return ManyToManyMapping(similarity, domain, codomain)
+def merge_api_elements_and_remove_duplicates(list_a: list[api_element], list_b: list[api_element]) -> list[api_element]:
+ api_elements: list[api_element] = []
+ api_elements.extend(list_a)
+ api_elements.extend(list_b)
+ api_elements_tmp: list[api_element] = [
+ i
+ for n, i in enumerate(api_elements)
+ if i not in api_elements[:n]
+ ]
+ api_elements = api_elements_tmp
+ return api_elements
+
+
class APIMapping:
threshold_of_similarity_between_mappings: float
threshold_of_similarity_for_creation_of_mappings: float
diff --git a/package-parser/tests/data/migration/annotationv1.json b/package-parser/tests/data/migration/annotationv1.json
index b11d3dc23..d76faaafd 100644
--- a/package-parser/tests/data/migration/annotationv1.json
+++ b/package-parser/tests/data/migration/annotationv1.json
@@ -4,21 +4,22 @@
"calledAfterAnnotations": {},
"completeAnnotations": {},
"descriptionAnnotations": {
- "test/test/test_function": {
- "target": "test/test/test_function",
+ },
+ "enumAnnotations": {},
+ "expertAnnotations": {},
+ "groupAnnotations": {},
+ "moveAnnotations": {
+ "test/test/complete_different_function": {
+ "target": "test/test/complete_different_function",
"authors": [
"$autogen$"
],
"reviewers": [],
"comment": "",
"reviewResult": "",
- "newDescription": "new description"
+ "destination": "test/test.moved.package"
}
},
- "enumAnnotations": {},
- "expertAnnotations": {},
- "groupAnnotations": {},
- "moveAnnotations": {},
"pureAnnotations": {},
"removeAnnotations": {
"test/test/UnusedClass": {
@@ -53,6 +54,16 @@
"comment": "",
"reviewResult": "",
"newTodo": "this is a todo annotation"
+ },
+ "test/test/test_function/test_parameter": {
+ "target": "test/test/test_function/test_parameter",
+ "authors": [
+ "$autogen$"
+ ],
+ "reviewers": [],
+ "comment": "",
+ "reviewResult": "",
+ "newTodo": "another todo annotation"
}
},
"valueAnnotations": {}
diff --git a/package-parser/tests/data/migration/annotationv2.json b/package-parser/tests/data/migration/annotationv2.json
index b11d3dc23..4ef3e27c0 100644
--- a/package-parser/tests/data/migration/annotationv2.json
+++ b/package-parser/tests/data/migration/annotationv2.json
@@ -3,28 +3,17 @@
"boundaryAnnotations": {},
"calledAfterAnnotations": {},
"completeAnnotations": {},
- "descriptionAnnotations": {
- "test/test/test_function": {
- "target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
- "reviewers": [],
- "comment": "",
- "reviewResult": "",
- "newDescription": "new description"
- }
- },
+ "descriptionAnnotations": {},
"enumAnnotations": {},
"expertAnnotations": {},
"groupAnnotations": {},
"moveAnnotations": {},
"pureAnnotations": {},
"removeAnnotations": {
- "test/test/UnusedClass": {
+ "test/test/TestClass": {
"target": "test/test/TestClass",
"authors": [
- "$autogen$"
+ "$autogen$", "migration"
],
"reviewers": [],
"comment": "I removed this class because it has no known usages.",
@@ -33,27 +22,39 @@
},
"renameAnnotations": {
"test/test/test_function": {
- "target": "test/test/test_function",
"authors": [
- "$autogen$"
+ "$autogen$",
+ "migration"
],
- "reviewers": [],
"comment": "",
+ "newName": "renamed_test_function",
"reviewResult": "",
- "newName": "renamed_test_function"
+ "reviewers": [],
+ "target": "test/test/test_function"
}
},
"todoAnnotations": {
"test/test/test_function": {
- "target": "test/test/test_function",
"authors": [
- "$autogen$"
+ "$autogen$",
+ "migration"
],
- "reviewers": [],
"comment": "",
+ "newTodo": "this is a todo annotation",
"reviewResult": "",
- "newTodo": "this is a todo annotation"
- }
+ "reviewers": [],
+ "target": "test/test/test_function"
+ },
+ "test/test/test_function/test_parameter": {
+ "authors": [
+ "$autogen$",
+ "migration"
+ ],
+ "comment": "",
+ "newTodo": "another todo annotation",
+ "reviewResult": "unsure",
+ "reviewers": [],
+ "target": "test/test/test_function/test_parameter"}
},
"valueAnnotations": {}
}
diff --git a/package-parser/tests/data/migration/apiv1_data.json b/package-parser/tests/data/migration/apiv1_data.json
index 4162944ef..3b44505e1 100644
--- a/package-parser/tests/data/migration/apiv1_data.json
+++ b/package-parser/tests/data/migration/apiv1_data.json
@@ -52,6 +52,33 @@
}
],
"functions": [
+ {
+ "id": "test/test/complete_different_function",
+ "qname": "test.complete_different_function",
+ "decorators": [],
+ "parameters": [
+ {
+ "id": "test/test/test_function/test_parameter",
+ "name": "test_parameter",
+ "qname": "test.test_function.test_parameter",
+ "default_value": "",
+ "assigned_by": "POSITION_OR_NAME",
+ "is_public": false,
+ "docstring": {
+ "type": "",
+ "default_value": "",
+ "description": ""
+ },
+ "type": {}
+ }
+ ],
+ "results": [],
+ "is_public": true,
+ "reexported_by": [],
+ "description": "",
+ "docstring": "",
+ "code": "def complete_different_function():\n \"\"\"This function's only use is to hold a parameter\"\"\" return None"
+ },
{
"id": "test/test/test_function",
"qname": "test_function",
diff --git a/package-parser/tests/data/migration/apiv2_data.json b/package-parser/tests/data/migration/apiv2_data.json
index 7c598af0a..b667de436 100644
--- a/package-parser/tests/data/migration/apiv2_data.json
+++ b/package-parser/tests/data/migration/apiv2_data.json
@@ -16,16 +16,16 @@
],
"classes": [
{
- "id": "test/test/NewTestClass",
- "name": "NewTestClass",
- "qname": "test.NewTestClass",
+ "id": "test/test/TestClass",
+ "name": "TestClass",
+ "qname": "test.TestClass",
"methods": [],
"decorators": [],
"superclasses": [],
"is_public": true,
"reexported_by": [],
"documentation": "",
- "code": "class NewTestClass:\n\"\"\" This is a NewTestClass.\n It has no common use.\"\"\"\n pass",
+ "code": "class TestClass:\n\"\"\" This is a TestClass.\n It has no common use.\"\"\"\n pass",
"instance_attributes": [
{
"name": "a",
@@ -52,6 +52,33 @@
}
],
"functions": [
+ {
+ "id": "test/test/complete_different_function",
+ "qname": "test.complete_different_function",
+ "decorators": [],
+ "parameters": [
+ {
+ "id": "test/test/test_function/test_parameter",
+ "name": "test_parameter",
+ "qname": "test.test_function.test_parameter",
+ "default_value": "'new_optional_value'",
+ "assigned_by": "POSITIONAL_VARARG",
+ "is_public": false,
+ "docstring": {
+ "type": "",
+ "default_value": "",
+ "description": ""
+ },
+ "type": {}
+ }
+ ],
+ "results": [],
+ "is_public": true,
+ "reexported_by": [],
+ "description": "",
+ "docstring": "",
+ "code": "def complete_different_function():\n \"\"\"This function's only use is to hold a parameter\"\"\" return None"
+ },
{
"id": "test/test/test_function",
"qname": "test_function",
@@ -73,7 +100,7 @@
"reexported_by": [],
"description": "",
"docstring": "",
- "code": "def other_test_function():\n pass"
+ "code": "def other_test_function():\n \"\"\"This function is longer than the other function\n but have some attributes in common.\n Therfore, they should be in the unsure annotationstore\"\"\""
}
]
}
diff --git a/package-parser/tests/data/migration/unsure_annotationv2.json b/package-parser/tests/data/migration/unsure_annotationv2.json
index b11d3dc23..67d1ac263 100644
--- a/package-parser/tests/data/migration/unsure_annotationv2.json
+++ b/package-parser/tests/data/migration/unsure_annotationv2.json
@@ -3,57 +3,26 @@
"boundaryAnnotations": {},
"calledAfterAnnotations": {},
"completeAnnotations": {},
- "descriptionAnnotations": {
- "test/test/test_function": {
- "target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
- "reviewers": [],
- "comment": "",
- "reviewResult": "",
- "newDescription": "new description"
- }
- },
+ "descriptionAnnotations": {},
"enumAnnotations": {},
"expertAnnotations": {},
"groupAnnotations": {},
- "moveAnnotations": {},
- "pureAnnotations": {},
- "removeAnnotations": {
- "test/test/UnusedClass": {
- "target": "test/test/TestClass",
+ "moveAnnotations": {
+ "test/test/complete_different_function": {
"authors": [
- "$autogen$"
+ "$autogen$",
+ "migration"
],
- "reviewers": [],
- "comment": "I removed this class because it has no known usages.",
- "reviewResult": ""
- }
- },
- "renameAnnotations": {
- "test/test/test_function": {
- "target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
- "reviewers": [],
"comment": "",
+ "destination": "test/test.moved.package",
"reviewResult": "",
- "newName": "renamed_test_function"
- }
- },
- "todoAnnotations": {
- "test/test/test_function": {
- "target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
"reviewers": [],
- "comment": "",
- "reviewResult": "",
- "newTodo": "this is a todo annotation"
- }
+ "target": "test/test/complete_different_function"
+}
},
+ "pureAnnotations": {},
+ "removeAnnotations": {},
+ "renameAnnotations": {},
+ "todoAnnotations": {},
"valueAnnotations": {}
}
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index 9141e0436..5d9e14f9b 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -9,7 +9,7 @@
from package_parser.processing.api.model import (
Parameter,
ParameterAssignment,
- ParameterDocumentation,
+ ParameterDocumentation, Class, ClassDocumentation,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -67,58 +67,6 @@ def migrate_rename_annotation_data_one_to_one_mapping() -> Tuple[
# pylint: disable=duplicate-code
-def migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name() -> Tuple[
- Mapping,
- AbstractAnnotation,
- list[AbstractAnnotation],
-]:
- parameterv1 = Parameter(
- id_="test/test.rename.test2.Test",
- name="Test",
- qname="test.rename.test2.Test",
- default_value=None,
- assigned_by=ParameterAssignment.POSITION_OR_NAME,
- is_public=True,
- documentation=ParameterDocumentation("", "", ""),
- )
- parameterv2_a = Parameter(
- id_="test/test.rename.test2.TestA",
- name="TestA",
- qname="test.rename.test2.TestA",
- default_value=None,
- assigned_by=ParameterAssignment.POSITION_OR_NAME,
- is_public=True,
- documentation=ParameterDocumentation("", "", ""),
- )
- parameterv2_b = Parameter(
- id_="test/test.rename.test2.TestB",
- name="TestB",
- qname="test.rename.test2.TestB",
- default_value=None,
- assigned_by=ParameterAssignment.POSITION_OR_NAME,
- is_public=True,
- documentation=ParameterDocumentation("", "", ""),
- )
- mappings = OneToManyMapping(1.0, parameterv1, [parameterv2_a, parameterv2_b])
- annotationv1 = RenameAnnotation(
- target="test/test.rename.test2.Test",
- authors=["testauthor"],
- reviewers=[],
- comment="",
- reviewResult=EnumReviewResult.NONE,
- newName="TestA",
- )
- annotationv2 = RenameAnnotation(
- target="test/test.rename.test2.TestA",
- authors=["testauthor", migration_author],
- reviewers=[],
- comment=get_migration_text(annotationv1, mappings),
- reviewResult=EnumReviewResult.UNSURE,
- newName="TestA",
- )
- return mappings, annotationv1, [annotationv2]
-
-
def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
Mapping,
AbstractAnnotation,
@@ -143,15 +91,26 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
documentation=ParameterDocumentation("", "", ""),
)
parameterv2_b = Parameter(
- id_="test/test.rename.test3.TestB",
- name="TestB",
- qname="test.rename.test3.TestB",
+ id_="test/test.rename.test3.Test",
+ name="Test",
+ qname="test.rename.test3.Test",
default_value=None,
assigned_by=ParameterAssignment.POSITION_OR_NAME,
is_public=True,
documentation=ParameterDocumentation("", "", ""),
)
- mappings = OneToManyMapping(1.0, parameterv1, [parameterv2_a, parameterv2_b])
+ classv2 = Class(
+ id_="test/test.rename.test3/NewClass",
+ qname="test.rename.test3.NewClass",
+ decorators=[],
+ superclasses=[],
+ is_public=True,
+ reexported_by=[],
+ documentation=ClassDocumentation("", ""),
+ code="class NewClass:\n pass",
+ instance_attributes=[],
+ )
+ mappings = OneToManyMapping(1.0, parameterv1, [parameterv2_a, parameterv2_b, classv2])
annotationv1 = RenameAnnotation(
target="test/test.rename.test3.Test",
authors=["testauthor"],
@@ -160,16 +119,24 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
reviewResult=EnumReviewResult.NONE,
newName="TestZ",
)
- annotationv2_a = TodoAnnotation(
+ annotationv2_a = RenameAnnotation(
target="test/test.rename.test3.TestA",
authors=["testauthor", migration_author],
reviewers=[],
+ comment=get_migration_text(annotationv1, mappings),
+ reviewResult=EnumReviewResult.UNSURE,
+ newName="TestZ",
+ )
+ annotationv2_b = RenameAnnotation(
+ target="test/test.rename.test3.Test",
+ authors=["testauthor", migration_author],
+ reviewers=[],
comment="",
reviewResult=EnumReviewResult.NONE,
- newTodo=get_migration_text(annotationv1, mappings, for_todo_annotation=True),
+ newName="TestZ",
)
- annotationv2_b = TodoAnnotation(
- target="test/test.rename.test3.TestB",
+ annotationv2_c = TodoAnnotation(
+ target="test/test.rename.test3/NewClass",
authors=["testauthor", migration_author],
reviewers=[],
comment="",
@@ -179,7 +146,7 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
return (
mappings,
annotationv1,
- [annotationv2_a, annotationv2_b],
+ [annotationv2_a, annotationv2_b, annotationv2_c],
)
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index e9f1c5ba3..250d41404 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -1,7 +1,6 @@
import json
import os
-from package_parser.cli._run_migrate import _run_migrate_command
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
@@ -62,7 +61,6 @@
from tests.processing.migration.annotations.test_rename_migration import (
migrate_rename_annotation_data_duplicated,
migrate_rename_annotation_data_one_to_many_mapping,
- migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name,
migrate_rename_annotation_data_one_to_one_mapping,
)
from tests.processing.migration.annotations.test_todo_migration import (
@@ -130,7 +128,6 @@
migrate_remove_annotation_data_one_to_many_mapping(),
migrate_remove_annotation_data_duplicated(),
# rename annotation
- migrate_rename_annotation_data_one_to_many_mapping__with_changed_new_name(),
migrate_rename_annotation_data_one_to_one_mapping(),
migrate_rename_annotation_data_one_to_many_mapping(),
migrate_rename_annotation_data_duplicated(),
@@ -176,8 +173,8 @@ def test_migrate_all_annotations() -> None:
migration = Migration()
migration.migrate_annotations(annotation_store, mappings)
- for key, value in migration.unsure_migrated_annotation_store.to_json().values():
- if isinstance(value, list):
+ for value in migration.unsure_migrated_annotation_store.to_json().values():
+ if isinstance(value, dict):
assert len(value) == 0
actual_annotations = migration.migrated_annotation_store
@@ -259,9 +256,9 @@ def test_migrate_command_and_both_annotation_stores() -> None:
expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
differ = SimpleDiffer()
- api_mapping = APIMapping(apiv1, apiv2, differ)
+ api_mapping = APIMapping(apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3)
mappings = api_mapping.map_api()
- migration = Migration()
+ migration = Migration(reliable_similarity=0.9, unsure_similarity=0.75)
migration.migrate_annotations(annotationsv1, mappings)
assert migration.migrated_annotation_store.to_json() == expected_annotationsv2_json
From df4b9cfe0d282628444f94eced9041bc1b2ab3f0 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:50:02 +0100
Subject: [PATCH 26/40] add smoke test for migration
---
.github/workflows/main.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index eee32e12d..96332d731 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -98,7 +98,7 @@ jobs:
run: poetry run parse-package all -p package_parser -s package_parser -c package_parser -o out
- name: Smoke test (migration)
- run: poetry run parse-package migrate -a1 -a2 -a -o out #todo
+ run: poetry run parse-package migrate -a1 tests/data/migration/apiv1_data.json -a2 tests/data/migration/apiv2_data.json -a tests/data/migration/annotationv1.json -o out
# Requires installation of pytest and pytest-cov
- name: Test with pytest
From ed8e0b0173c34453dd1f799c500f2acc90c6538c Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:59:08 +0100
Subject: [PATCH 27/40] fix linter errrors
---
.../migration/annotations/_migrate_rename_annotation.py | 2 +-
.../package_parser/processing/migration/model/_mapping.py | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index b29e4fc62..40466ca54 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -42,7 +42,7 @@ def migrate_rename_annotation(
annotations: list[AbstractAnnotation] = []
for element in mapping.get_apiv2_elements():
- if isinstance(element, type(annotated_apiv1_element)):
+ if isinstance(element, type(annotated_apiv1_element)) and not isinstance(element, (Attribute, Result)):
if element.name not in (
new_name,
rename_annotation.target.split(".")[-1],
diff --git a/package-parser/package_parser/processing/migration/model/_mapping.py b/package-parser/package_parser/processing/migration/model/_mapping.py
index 53ee5650c..df590e28d 100644
--- a/package-parser/package_parser/processing/migration/model/_mapping.py
+++ b/package-parser/package_parser/processing/migration/model/_mapping.py
@@ -119,9 +119,9 @@ def __init__(
apiv1: API,
apiv2: API,
differ: AbstractDiffer,
- threshold_of_similarity_for_creation_of_mappings=0.5,
- threshold_of_similarity_between_mappings=0.05,
- ):
+ threshold_of_similarity_for_creation_of_mappings: float = 0.5,
+ threshold_of_similarity_between_mappings: float = 0.05,
+ ) -> None:
self.apiv1 = apiv1
self.apiv2 = apiv2
self.differ = differ
@@ -236,7 +236,7 @@ def _merge_similar_mappings(self, mappings: List[Mapping]) -> Optional[Mapping]:
def _merge_mappings_with_same_elements(
self, mapping_to_be_appended: Mapping, mappings: list[Mapping]
- ):
+ ) -> None:
"""
This method prevents that an element in a mapping appears multiple times in a list of mappings
by merging the affected mappings and include the result in the list. If there is no such element,
From f2923a0d54be74cfea536fca1e3858ade4b6335f Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:59:08 +0100
Subject: [PATCH 28/40] fix linter errrors
---
.../package_parser/processing/migration/_migrate.py | 1 -
.../annotations/_migrate_rename_annotation.py | 2 +-
.../processing/migration/model/_mapping.py | 8 ++++----
.../tests/processing/migration/test_migration.py | 10 +++++-----
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 20deed726..3c3a9dca6 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,4 +1,3 @@
-from dataclasses import dataclass
from typing import Optional, Tuple
from package_parser.processing.annotations.model import (
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index b29e4fc62..40466ca54 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -42,7 +42,7 @@ def migrate_rename_annotation(
annotations: list[AbstractAnnotation] = []
for element in mapping.get_apiv2_elements():
- if isinstance(element, type(annotated_apiv1_element)):
+ if isinstance(element, type(annotated_apiv1_element)) and not isinstance(element, (Attribute, Result)):
if element.name not in (
new_name,
rename_annotation.target.split(".")[-1],
diff --git a/package-parser/package_parser/processing/migration/model/_mapping.py b/package-parser/package_parser/processing/migration/model/_mapping.py
index 53ee5650c..df590e28d 100644
--- a/package-parser/package_parser/processing/migration/model/_mapping.py
+++ b/package-parser/package_parser/processing/migration/model/_mapping.py
@@ -119,9 +119,9 @@ def __init__(
apiv1: API,
apiv2: API,
differ: AbstractDiffer,
- threshold_of_similarity_for_creation_of_mappings=0.5,
- threshold_of_similarity_between_mappings=0.05,
- ):
+ threshold_of_similarity_for_creation_of_mappings: float = 0.5,
+ threshold_of_similarity_between_mappings: float = 0.05,
+ ) -> None:
self.apiv1 = apiv1
self.apiv2 = apiv2
self.differ = differ
@@ -236,7 +236,7 @@ def _merge_similar_mappings(self, mappings: List[Mapping]) -> Optional[Mapping]:
def _merge_mappings_with_same_elements(
self, mapping_to_be_appended: Mapping, mappings: list[Mapping]
- ):
+ ) -> None:
"""
This method prevents that an element in a mapping appears multiple times in a list of mappings
by merging the affected mappings and include the result in the list. If there is no such element,
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 250d41404..69782a75a 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -237,22 +237,22 @@ def test_migrate_command_and_both_annotation_stores() -> None:
os.getcwd(), "tests", "data", "migration", "unsure_annotationv2.json"
)
- with open(apiv1_json_path, "r") as apiv1_file:
+ with open(apiv1_json_path, "r", encoding="utf-8") as apiv1_file:
apiv1_json = json.load(apiv1_file)
apiv1 = API.from_json(apiv1_json)
- with open(apiv2_json_path, "r") as apiv2_file:
+ with open(apiv2_json_path, "r", encoding="utf-8") as apiv2_file:
apiv2_json = json.load(apiv2_file)
apiv2 = API.from_json(apiv2_json)
- with open(annotationsv1_json_path, "r") as annotationsv1_file:
+ with open(annotationsv1_json_path, "r", encoding="utf-8") as annotationsv1_file:
annotationsv1_json = json.load(annotationsv1_file)
annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
- with open(annotationsv2_json_path, "r") as annotationsv2_file:
+ with open(annotationsv2_json_path, "r", encoding="utf-8") as annotationsv2_file:
expected_annotationsv2_json = json.load(annotationsv2_file)
- with open(unsure_annotationsv2_json_path, "r") as unsure_annotationsv2_file:
+ with open(unsure_annotationsv2_json_path, "r", encoding="utf-8") as unsure_annotationsv2_file:
expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
differ = SimpleDiffer()
From b2025252efce25c3e468e00bb34d0c2fd8a7d010 Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Tue, 3 Jan 2023 18:07:54 +0000
Subject: [PATCH 29/40] style: apply automated linter fixes
---
.../package_parser/cli/_run_migrate.py | 18 +++++++---
.../annotations/_migrate_rename_annotation.py | 36 ++++++++++---------
.../processing/migration/model/_differ.py | 1 +
.../processing/migration/model/_mapping.py | 16 +++++----
.../tests/data/migration/annotationv1.json | 23 ++++--------
.../tests/data/migration/annotationv2.json | 22 ++++--------
.../tests/data/migration/apiv1_data.json | 8 ++---
.../tests/data/migration/apiv2_data.json | 11 +++---
.../data/migration/unsure_annotationv2.json | 7 ++--
.../annotations/test_rename_migration.py | 8 +++--
.../processing/migration/test_migration.py | 15 +++++---
11 files changed, 82 insertions(+), 83 deletions(-)
diff --git a/package-parser/package_parser/cli/_run_migrate.py b/package-parser/package_parser/cli/_run_migrate.py
index a6e417262..fd4549df2 100644
--- a/package-parser/package_parser/cli/_run_migrate.py
+++ b/package-parser/package_parser/cli/_run_migrate.py
@@ -25,7 +25,17 @@ def _run_migrate_command(
mappings = api_mapping.map_api()
migration = Migration()
migration.migrate_annotations(annotationsv1, mappings)
- migrated_annotations_file = Path(os.path.join(out_dir_path, "migrated_annotationsv" + apiv2.version + ".json"))
- unsure_migrated_annotations_file = Path(os.path.join(out_dir_path, "unsure_migrated_annotationsv" + apiv2.version + ".json"))
- _write_annotations_file(migration.migrated_annotation_store, migrated_annotations_file)
- _write_annotations_file(migration.unsure_migrated_annotation_store, unsure_migrated_annotations_file)
+ migrated_annotations_file = Path(
+ os.path.join(out_dir_path, "migrated_annotationsv" + apiv2.version + ".json")
+ )
+ unsure_migrated_annotations_file = Path(
+ os.path.join(
+ out_dir_path, "unsure_migrated_annotationsv" + apiv2.version + ".json"
+ )
+ )
+ _write_annotations_file(
+ migration.migrated_annotation_store, migrated_annotations_file
+ )
+ _write_annotations_file(
+ migration.unsure_migrated_annotation_store, unsure_migrated_annotations_file
+ )
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
index 40466ca54..2380ab775 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_rename_annotation.py
@@ -42,28 +42,32 @@ def migrate_rename_annotation(
annotations: list[AbstractAnnotation] = []
for element in mapping.get_apiv2_elements():
- if isinstance(element, type(annotated_apiv1_element)) and not isinstance(element, (Attribute, Result)):
+ if isinstance(element, type(annotated_apiv1_element)) and not isinstance(
+ element, (Attribute, Result)
+ ):
if element.name not in (
new_name,
rename_annotation.target.split(".")[-1],
):
- annotations.append(RenameAnnotation(
- element.id,
- authors,
- rename_annotation.reviewers,
- get_migration_text(rename_annotation, mapping),
- EnumReviewResult.UNSURE,
- rename_annotation.newName,
- )
+ annotations.append(
+ RenameAnnotation(
+ element.id,
+ authors,
+ rename_annotation.reviewers,
+ get_migration_text(rename_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ rename_annotation.newName,
+ )
)
else:
- annotations.append(RenameAnnotation(
- element.id,
- authors,
- rename_annotation.reviewers,
- rename_annotation.comment,
- EnumReviewResult.NONE,
- rename_annotation.newName,
+ annotations.append(
+ RenameAnnotation(
+ element.id,
+ authors,
+ rename_annotation.reviewers,
+ rename_annotation.comment,
+ EnumReviewResult.NONE,
+ rename_annotation.newName,
)
)
elif not isinstance(element, (Attribute, Result)):
diff --git a/package-parser/package_parser/processing/migration/model/_differ.py b/package-parser/package_parser/processing/migration/model/_differ.py
index f4968de0f..51dab638b 100644
--- a/package-parser/package_parser/processing/migration/model/_differ.py
+++ b/package-parser/package_parser/processing/migration/model/_differ.py
@@ -1,5 +1,6 @@
from abc import ABC, abstractmethod
from typing import Callable, Optional, TypeVar
+
from Levenshtein import distance
from package_parser.processing.api.model import (
AbstractType,
diff --git a/package-parser/package_parser/processing/migration/model/_mapping.py b/package-parser/package_parser/processing/migration/model/_mapping.py
index df590e28d..b67d2a167 100644
--- a/package-parser/package_parser/processing/migration/model/_mapping.py
+++ b/package-parser/package_parser/processing/migration/model/_mapping.py
@@ -83,8 +83,12 @@ def get_apiv2_elements(self) -> list[api_element]:
def merge_mappings(mapping_a: Mapping, mapping_b: Mapping) -> Mapping:
similarity = (mapping_a.similarity + mapping_b.similarity) / 2
- codomain = merge_api_elements_and_remove_duplicates(mapping_a.get_apiv2_elements(), mapping_b.get_apiv2_elements())
- domain: list[api_element] = merge_api_elements_and_remove_duplicates(mapping_a.get_apiv1_elements(), mapping_b.get_apiv1_elements())
+ codomain = merge_api_elements_and_remove_duplicates(
+ mapping_a.get_apiv2_elements(), mapping_b.get_apiv2_elements()
+ )
+ domain: list[api_element] = merge_api_elements_and_remove_duplicates(
+ mapping_a.get_apiv1_elements(), mapping_b.get_apiv1_elements()
+ )
if len(domain) == 1 and len(codomain) == 1:
return OneToOneMapping(similarity, domain[0], codomain[0])
if len(domain) == 1:
@@ -94,14 +98,14 @@ def merge_mappings(mapping_a: Mapping, mapping_b: Mapping) -> Mapping:
return ManyToManyMapping(similarity, domain, codomain)
-def merge_api_elements_and_remove_duplicates(list_a: list[api_element], list_b: list[api_element]) -> list[api_element]:
+def merge_api_elements_and_remove_duplicates(
+ list_a: list[api_element], list_b: list[api_element]
+) -> list[api_element]:
api_elements: list[api_element] = []
api_elements.extend(list_a)
api_elements.extend(list_b)
api_elements_tmp: list[api_element] = [
- i
- for n, i in enumerate(api_elements)
- if i not in api_elements[:n]
+ i for n, i in enumerate(api_elements) if i not in api_elements[:n]
]
api_elements = api_elements_tmp
return api_elements
diff --git a/package-parser/tests/data/migration/annotationv1.json b/package-parser/tests/data/migration/annotationv1.json
index d76faaafd..633aac45a 100644
--- a/package-parser/tests/data/migration/annotationv1.json
+++ b/package-parser/tests/data/migration/annotationv1.json
@@ -3,17 +3,14 @@
"boundaryAnnotations": {},
"calledAfterAnnotations": {},
"completeAnnotations": {},
- "descriptionAnnotations": {
- },
+ "descriptionAnnotations": {},
"enumAnnotations": {},
"expertAnnotations": {},
"groupAnnotations": {},
"moveAnnotations": {
"test/test/complete_different_function": {
"target": "test/test/complete_different_function",
- "authors": [
- "$autogen$"
- ],
+ "authors": ["$autogen$"],
"reviewers": [],
"comment": "",
"reviewResult": "",
@@ -24,9 +21,7 @@
"removeAnnotations": {
"test/test/UnusedClass": {
"target": "test/test/TestClass",
- "authors": [
- "$autogen$"
- ],
+ "authors": ["$autogen$"],
"reviewers": [],
"comment": "I removed this class because it has no known usages.",
"reviewResult": ""
@@ -35,9 +30,7 @@
"renameAnnotations": {
"test/test/test_function": {
"target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
+ "authors": ["$autogen$"],
"reviewers": [],
"comment": "",
"reviewResult": "",
@@ -47,9 +40,7 @@
"todoAnnotations": {
"test/test/test_function": {
"target": "test/test/test_function",
- "authors": [
- "$autogen$"
- ],
+ "authors": ["$autogen$"],
"reviewers": [],
"comment": "",
"reviewResult": "",
@@ -57,9 +48,7 @@
},
"test/test/test_function/test_parameter": {
"target": "test/test/test_function/test_parameter",
- "authors": [
- "$autogen$"
- ],
+ "authors": ["$autogen$"],
"reviewers": [],
"comment": "",
"reviewResult": "",
diff --git a/package-parser/tests/data/migration/annotationv2.json b/package-parser/tests/data/migration/annotationv2.json
index 4ef3e27c0..e2224edeb 100644
--- a/package-parser/tests/data/migration/annotationv2.json
+++ b/package-parser/tests/data/migration/annotationv2.json
@@ -12,9 +12,7 @@
"removeAnnotations": {
"test/test/TestClass": {
"target": "test/test/TestClass",
- "authors": [
- "$autogen$", "migration"
- ],
+ "authors": ["$autogen$", "migration"],
"reviewers": [],
"comment": "I removed this class because it has no known usages.",
"reviewResult": ""
@@ -22,10 +20,7 @@
},
"renameAnnotations": {
"test/test/test_function": {
- "authors": [
- "$autogen$",
- "migration"
- ],
+ "authors": ["$autogen$", "migration"],
"comment": "",
"newName": "renamed_test_function",
"reviewResult": "",
@@ -35,10 +30,7 @@
},
"todoAnnotations": {
"test/test/test_function": {
- "authors": [
- "$autogen$",
- "migration"
- ],
+ "authors": ["$autogen$", "migration"],
"comment": "",
"newTodo": "this is a todo annotation",
"reviewResult": "",
@@ -46,15 +38,13 @@
"target": "test/test/test_function"
},
"test/test/test_function/test_parameter": {
- "authors": [
- "$autogen$",
- "migration"
- ],
+ "authors": ["$autogen$", "migration"],
"comment": "",
"newTodo": "another todo annotation",
"reviewResult": "unsure",
"reviewers": [],
- "target": "test/test/test_function/test_parameter"}
+ "target": "test/test/test_function/test_parameter"
+ }
},
"valueAnnotations": {}
}
diff --git a/package-parser/tests/data/migration/apiv1_data.json b/package-parser/tests/data/migration/apiv1_data.json
index 3b44505e1..ab0d8321f 100644
--- a/package-parser/tests/data/migration/apiv1_data.json
+++ b/package-parser/tests/data/migration/apiv1_data.json
@@ -6,12 +6,8 @@
{
"id": "test/test",
"name": "test",
- "classes": [
- "test/test/TestClass"
- ],
- "functions": [
- "test/test/test_function"
- ]
+ "classes": ["test/test/TestClass"],
+ "functions": ["test/test/test_function"]
}
],
"classes": [
diff --git a/package-parser/tests/data/migration/apiv2_data.json b/package-parser/tests/data/migration/apiv2_data.json
index b667de436..1c3da0274 100644
--- a/package-parser/tests/data/migration/apiv2_data.json
+++ b/package-parser/tests/data/migration/apiv2_data.json
@@ -6,12 +6,8 @@
{
"id": "test/test",
"name": "test",
- "classes": [
- "test/test/NewTestClass"
- ],
- "functions": [
- ""
- ]
+ "classes": ["test/test/NewTestClass"],
+ "functions": [""]
}
],
"classes": [
@@ -90,7 +86,8 @@
"description": "",
"docstring": "",
"code": "def test_function():\n pass"
- },{
+ },
+ {
"id": "test/test/other_test_function",
"qname": "other_test_function",
"decorators": [],
diff --git a/package-parser/tests/data/migration/unsure_annotationv2.json b/package-parser/tests/data/migration/unsure_annotationv2.json
index 67d1ac263..d5e776fee 100644
--- a/package-parser/tests/data/migration/unsure_annotationv2.json
+++ b/package-parser/tests/data/migration/unsure_annotationv2.json
@@ -9,16 +9,13 @@
"groupAnnotations": {},
"moveAnnotations": {
"test/test/complete_different_function": {
- "authors": [
- "$autogen$",
- "migration"
- ],
+ "authors": ["$autogen$", "migration"],
"comment": "",
"destination": "test/test.moved.package",
"reviewResult": "",
"reviewers": [],
"target": "test/test/complete_different_function"
-}
+ }
},
"pureAnnotations": {},
"removeAnnotations": {},
diff --git a/package-parser/tests/processing/migration/annotations/test_rename_migration.py b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
index 5d9e14f9b..374b5eeb1 100644
--- a/package-parser/tests/processing/migration/annotations/test_rename_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_rename_migration.py
@@ -7,9 +7,11 @@
TodoAnnotation,
)
from package_parser.processing.api.model import (
+ Class,
+ ClassDocumentation,
Parameter,
ParameterAssignment,
- ParameterDocumentation, Class, ClassDocumentation,
+ ParameterDocumentation,
)
from package_parser.processing.migration.annotations import (
get_migration_text,
@@ -110,7 +112,9 @@ def migrate_rename_annotation_data_one_to_many_mapping() -> Tuple[
code="class NewClass:\n pass",
instance_attributes=[],
)
- mappings = OneToManyMapping(1.0, parameterv1, [parameterv2_a, parameterv2_b, classv2])
+ mappings = OneToManyMapping(
+ 1.0, parameterv1, [parameterv2_a, parameterv2_b, classv2]
+ )
annotationv1 = RenameAnnotation(
target="test/test.rename.test3.Test",
authors=["testauthor"],
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 69782a75a..d2402c62f 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -6,7 +6,7 @@
AnnotationStore,
)
from package_parser.processing.api.model import API
-from package_parser.processing.migration import Migration, SimpleDiffer, APIMapping
+from package_parser.processing.migration import APIMapping, Migration, SimpleDiffer
from package_parser.processing.migration.model import Mapping
from tests.processing.migration.annotations.test_boundary_migration import (
migrate_boundary_annotation_data_duplicated,
@@ -252,14 +252,21 @@ def test_migrate_command_and_both_annotation_stores() -> None:
with open(annotationsv2_json_path, "r", encoding="utf-8") as annotationsv2_file:
expected_annotationsv2_json = json.load(annotationsv2_file)
- with open(unsure_annotationsv2_json_path, "r", encoding="utf-8") as unsure_annotationsv2_file:
+ with open(
+ unsure_annotationsv2_json_path, "r", encoding="utf-8"
+ ) as unsure_annotationsv2_file:
expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
differ = SimpleDiffer()
- api_mapping = APIMapping(apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3)
+ api_mapping = APIMapping(
+ apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3
+ )
mappings = api_mapping.map_api()
migration = Migration(reliable_similarity=0.9, unsure_similarity=0.75)
migration.migrate_annotations(annotationsv1, mappings)
assert migration.migrated_annotation_store.to_json() == expected_annotationsv2_json
- assert migration.unsure_migrated_annotation_store.to_json() == expected_unsure_annotationsv2_json
+ assert (
+ migration.unsure_migrated_annotation_store.to_json()
+ == expected_unsure_annotationsv2_json
+ )
From 32815ddf1b77fb3d78fe72990a9e9255f9802c6b Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 19:22:26 +0100
Subject: [PATCH 30/40] improve enum and boundary annotatrion migration
---
.../annotations/_migrate_boundary_annotation.py | 4 ++--
.../annotations/_migrate_enum_annotation.py | 16 ++++++++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index 4136bd00b..5159ecf80 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -100,7 +100,7 @@ def migrate_boundary_annotation(
if parameter_expects_number:
if (
parameter_type_is_discrete
- is not boundary_annotation.interval.isDiscrete
+ != boundary_annotation.interval.isDiscrete
):
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
boundary_annotation.comment = get_migration_text(
@@ -135,7 +135,7 @@ def migrate_boundary_annotation(
if (
parameter.type is not None
and is_number
- and is_discrete is boundary_annotation.interval.isDiscrete
+ and is_discrete == boundary_annotation.interval.isDiscrete
):
migrated_annotations.append(
BoundaryAnnotation(
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 5a2ea14b6..83c8a7ea3 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -111,10 +111,22 @@ def migrate_enum_annotation(
enum_annotation.pairs,
)
)
+ continue
elif isinstance(parameter.type, NamedType):
continue
- else:
- migrated_annotations.append(
+ else:
+ migrated_annotations.append(
+ EnumAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ get_migration_text(enum_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ enum_annotation.enumName,
+ enum_annotation.pairs,
+ )
+ )
+ migrated_annotations.append(
TodoAnnotation(
parameter.id,
authors,
From 9a821ab399252abf04eae497040aeae54a47c840 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 19:27:46 +0100
Subject: [PATCH 31/40] fix linter errors
---
.../annotations/_migrate_enum_annotation.py | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 83c8a7ea3..d7beb94b2 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -111,7 +111,6 @@ def migrate_enum_annotation(
enum_annotation.pairs,
)
)
- continue
elif isinstance(parameter.type, NamedType):
continue
else:
@@ -126,16 +125,17 @@ def migrate_enum_annotation(
enum_annotation.pairs,
)
)
- migrated_annotations.append(
- TodoAnnotation(
- parameter.id,
- authors,
- enum_annotation.reviewers,
- enum_annotation.comment,
- EnumReviewResult.NONE,
- get_migration_text(
- enum_annotation, mapping, for_todo_annotation=True
- ),
+ elif not isinstance(parameter, (Attribute, Result)):
+ migrated_annotations.append(
+ TodoAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ enum_annotation.comment,
+ EnumReviewResult.NONE,
+ get_migration_text(
+ enum_annotation, mapping, for_todo_annotation=True
+ ),
+ )
)
- )
return migrated_annotations
From e6387167364bb394ed1282f214a72b14587cf967 Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Tue, 3 Jan 2023 18:31:00 +0000
Subject: [PATCH 32/40] style: apply automated linter fixes
---
.../annotations/_migrate_enum_annotation.py | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index d7beb94b2..5a0615049 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -127,15 +127,15 @@ def migrate_enum_annotation(
)
elif not isinstance(parameter, (Attribute, Result)):
migrated_annotations.append(
- TodoAnnotation(
- parameter.id,
- authors,
- enum_annotation.reviewers,
- enum_annotation.comment,
- EnumReviewResult.NONE,
- get_migration_text(
- enum_annotation, mapping, for_todo_annotation=True
- ),
- )
- )
+ TodoAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ enum_annotation.comment,
+ EnumReviewResult.NONE,
+ get_migration_text(
+ enum_annotation, mapping, for_todo_annotation=True
+ ),
+ )
+ )
return migrated_annotations
From f4dda4091f8f826c1be7f8b25770768fb0d24b7b Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Tue, 3 Jan 2023 19:36:31 +0100
Subject: [PATCH 33/40] fix else/elif/continue confusion
---
.../annotations/_migrate_enum_annotation.py | 45 +++++++++----------
.../annotations/test_enum_migration.py | 13 +++---
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index d7beb94b2..4e1d7e426 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -113,29 +113,28 @@ def migrate_enum_annotation(
)
elif isinstance(parameter.type, NamedType):
continue
- else:
- migrated_annotations.append(
- EnumAnnotation(
- parameter.id,
- authors,
- enum_annotation.reviewers,
- get_migration_text(enum_annotation, mapping),
- EnumReviewResult.UNSURE,
- enum_annotation.enumName,
- enum_annotation.pairs,
- )
- )
+ migrated_annotations.append(
+ EnumAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ get_migration_text(enum_annotation, mapping),
+ EnumReviewResult.UNSURE,
+ enum_annotation.enumName,
+ enum_annotation.pairs,
+ )
+ )
elif not isinstance(parameter, (Attribute, Result)):
migrated_annotations.append(
- TodoAnnotation(
- parameter.id,
- authors,
- enum_annotation.reviewers,
- enum_annotation.comment,
- EnumReviewResult.NONE,
- get_migration_text(
- enum_annotation, mapping, for_todo_annotation=True
- ),
- )
- )
+ TodoAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ enum_annotation.comment,
+ EnumReviewResult.NONE,
+ get_migration_text(
+ enum_annotation, mapping, for_todo_annotation=True
+ ),
+ )
+ )
return migrated_annotations
diff --git a/package-parser/tests/processing/migration/annotations/test_enum_migration.py b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
index 2d935da0e..aa476af6e 100644
--- a/package-parser/tests/processing/migration/annotations/test_enum_migration.py
+++ b/package-parser/tests/processing/migration/annotations/test_enum_migration.py
@@ -190,7 +190,7 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
enumName="EnumName",
pairs=[EnumPair("value", "name")],
)
- migrated_enum_annotation = EnumAnnotation(
+ migrated_enum_annotation_b = EnumAnnotation(
target="test/test.enum.test3.TestB",
authors=["testauthor", migration_author],
reviewers=[],
@@ -199,18 +199,19 @@ def migrate_enum_annotation_data_one_to_many_mapping__only_one_relevant_mapping(
enumName="EnumName",
pairs=[EnumPair("value", "name")],
)
- migrated_todo_annotation = TodoAnnotation(
+ migrated_enum_annotation_a = EnumAnnotation(
target="test/test.enum.test3.TestA",
authors=["testauthor", migration_author],
reviewers=[],
- reviewResult=EnumReviewResult.NONE,
- comment="",
- newTodo=get_migration_text(enum_annotation, mapping, for_todo_annotation=True),
+ reviewResult=EnumReviewResult.UNSURE,
+ comment=get_migration_text(enum_annotation, mapping),
+ enumName="EnumName",
+ pairs=[EnumPair("value", "name")],
)
return (
mapping,
enum_annotation,
- [migrated_enum_annotation, migrated_todo_annotation],
+ [migrated_enum_annotation_b, migrated_enum_annotation_a],
)
From 14add769f2649d0e97b535844fe198f07d6847d4 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Wed, 4 Jan 2023 19:40:24 +0100
Subject: [PATCH 34/40] some refactoring
---
.../package_parser/cli/_run_migrate.py | 4 +-
.../processing/annotations/__init__.py | 1 +
.../annotations/_are_semantic_equal.py | 95 +++++++++
.../processing/migration/_migrate.py | 192 +++++-------------
.../annotations/_migrate_enum_annotation.py | 1 +
.../processing/migration/test_migration.py | 104 +++++-----
6 files changed, 194 insertions(+), 203 deletions(-)
create mode 100644 package-parser/package_parser/processing/annotations/_are_semantic_equal.py
diff --git a/package-parser/package_parser/cli/_run_migrate.py b/package-parser/package_parser/cli/_run_migrate.py
index fd4549df2..26be25c5e 100644
--- a/package-parser/package_parser/cli/_run_migrate.py
+++ b/package-parser/package_parser/cli/_run_migrate.py
@@ -23,8 +23,8 @@ def _run_migrate_command(
differ = SimpleDiffer()
api_mapping = APIMapping(apiv1, apiv2, differ)
mappings = api_mapping.map_api()
- migration = Migration()
- migration.migrate_annotations(annotationsv1, mappings)
+ migration = Migration(annotationsv1, mappings)
+ migration.migrate_annotations()
migrated_annotations_file = Path(
os.path.join(out_dir_path, "migrated_annotationsv" + apiv2.version + ".json")
)
diff --git a/package-parser/package_parser/processing/annotations/__init__.py b/package-parser/package_parser/processing/annotations/__init__.py
index c4bf3b4d8..c76d14b05 100644
--- a/package-parser/package_parser/processing/annotations/__init__.py
+++ b/package-parser/package_parser/processing/annotations/__init__.py
@@ -1 +1,2 @@
from ._generate_annotations import generate_annotations
+from ._are_semantic_equal import are_semantic_equal
diff --git a/package-parser/package_parser/processing/annotations/_are_semantic_equal.py b/package-parser/package_parser/processing/annotations/_are_semantic_equal.py
new file mode 100644
index 000000000..ff42e3953
--- /dev/null
+++ b/package-parser/package_parser/processing/annotations/_are_semantic_equal.py
@@ -0,0 +1,95 @@
+from package_parser.processing.annotations.model import AbstractAnnotation, BoundaryAnnotation, CalledAfterAnnotation, \
+ DescriptionAnnotation, EnumAnnotation, ExpertAnnotation, GroupAnnotation, MoveAnnotation, RemoveAnnotation, \
+ RenameAnnotation, TodoAnnotation, ValueAnnotation, ConstantAnnotation, OptionalAnnotation, OmittedAnnotation, \
+ RequiredAnnotation
+
+
+def are_semantic_equal(
+ annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation
+) -> bool:
+ if (
+ annotation_a.target == annotation_b.target
+ and isinstance(annotation_a, type(annotation_b))
+ and isinstance(annotation_b, type(annotation_a))
+ ):
+ if isinstance(annotation_a, BoundaryAnnotation) and isinstance(
+ annotation_b, BoundaryAnnotation
+ ):
+ return annotation_a.interval == annotation_b.interval
+ if isinstance(annotation_a, CalledAfterAnnotation) and isinstance(
+ annotation_b, CalledAfterAnnotation
+ ):
+ return annotation_a.calledAfterName == annotation_b.calledAfterName
+ if isinstance(annotation_a, DescriptionAnnotation) and isinstance(
+ annotation_b, DescriptionAnnotation
+ ):
+ return annotation_a.newDescription == annotation_b.newDescription
+ if (
+ isinstance(annotation_a, EnumAnnotation)
+ and isinstance(annotation_b, EnumAnnotation)
+ and annotation_a.enumName == annotation_b.enumName
+ and len(annotation_a.pairs) == len(annotation_a.pairs)
+ ):
+ list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
+ list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
+ for i in range(len(annotation_a.pairs)):
+ if (
+ list_a[i].stringValue != list_b[i].stringValue
+ or list_a[i].instanceName != list_b[i].instanceName
+ ):
+ return False
+ return True
+ if isinstance(annotation_a, ExpertAnnotation) and isinstance(
+ annotation_b, ExpertAnnotation
+ ):
+ return True
+ if isinstance(annotation_a, GroupAnnotation) and isinstance(
+ annotation_b, GroupAnnotation
+ ):
+ return annotation_a.groupName == annotation_b.groupName and set(
+ annotation_a.parameters
+ ) == set(annotation_b.parameters)
+ if isinstance(annotation_a, MoveAnnotation) and isinstance(
+ annotation_b, MoveAnnotation
+ ):
+ return annotation_a.destination == annotation_b.destination
+ if isinstance(annotation_a, RemoveAnnotation) and isinstance(
+ annotation_b, RemoveAnnotation
+ ):
+ return True
+ if isinstance(annotation_a, RenameAnnotation) and isinstance(
+ annotation_b, RenameAnnotation
+ ):
+ return annotation_a.newName == annotation_b.newName
+ if isinstance(annotation_a, TodoAnnotation) and isinstance(
+ annotation_b, TodoAnnotation
+ ):
+ return annotation_a.newTodo == annotation_b.newTodo
+ if (
+ isinstance(annotation_a, ValueAnnotation)
+ and isinstance(annotation_b, ValueAnnotation)
+ and annotation_a.variant == annotation_b.variant
+ ):
+ if isinstance(annotation_a, ConstantAnnotation) and isinstance(
+ annotation_b, ConstantAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OptionalAnnotation) and isinstance(
+ annotation_b, OptionalAnnotation
+ ):
+ return (
+ annotation_a.defaultValue == annotation_b.defaultValue
+ and annotation_a.defaultValueType == annotation_b.defaultValueType
+ )
+ if isinstance(annotation_a, OmittedAnnotation) and isinstance(
+ annotation_b, OmittedAnnotation
+ ):
+ return True
+ if isinstance(annotation_a, RequiredAnnotation) and isinstance(
+ annotation_b, RequiredAnnotation
+ ):
+ return True
+ return False
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 3c3a9dca6..0a6870a79 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -1,24 +1,11 @@
+from dataclasses import dataclass, field
from typing import Optional, Tuple
+from package_parser.processing.annotations import are_semantic_equal
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
- BoundaryAnnotation,
- CalledAfterAnnotation,
- ConstantAnnotation,
- DescriptionAnnotation,
- EnumAnnotation,
EnumReviewResult,
- ExpertAnnotation,
- GroupAnnotation,
- MoveAnnotation,
- OmittedAnnotation,
- OptionalAnnotation,
- RemoveAnnotation,
- RenameAnnotation,
- RequiredAnnotation,
- TodoAnnotation,
- ValueAnnotation,
)
from package_parser.processing.api.model import Attribute, Result
from package_parser.processing.migration.annotations import (
@@ -37,23 +24,23 @@
from package_parser.processing.migration.model import Mapping
+@dataclass
class Migration:
- reliable_similarity: float
- unsure_similarity: float
+ annotationsv1: AnnotationStore
+ mappings: list[Mapping]
+ reliable_similarity: float = 0.9
+ unsure_similarity: float = 0.8
+ migrated_annotation_store: AnnotationStore = field(init=False)
+ unsure_migrated_annotation_store: AnnotationStore = field(init=False)
- def __init__(
- self, reliable_similarity: float = 0.9, unsure_similarity: float = 0.8
- ) -> None:
- self.reliable_similarity = reliable_similarity
- self.unsure_similarity = unsure_similarity
- self.migrated_annotation_store: AnnotationStore = AnnotationStore()
- self.unsure_migrated_annotation_store: AnnotationStore = AnnotationStore()
+ def __post_init__(self) -> None:
+ self.migrated_annotation_store = AnnotationStore()
+ self.unsure_migrated_annotation_store = AnnotationStore()
- @staticmethod
def _get_mapping_from_annotation(
- annotation: AbstractAnnotation, mappings: list[Mapping]
+ self, annotation: AbstractAnnotation
) -> Optional[Mapping]:
- for mapping in mappings:
+ for mapping in self.mappings:
for element in mapping.get_apiv1_elements():
if (
not isinstance(element, (Attribute, Result))
@@ -62,11 +49,9 @@ def _get_mapping_from_annotation(
return mapping
return None
- def migrate_annotations(
- self, annotationsv1: AnnotationStore, mappings: list[Mapping]
- ) -> None:
- for boundary_annotation in annotationsv1.boundaryAnnotations:
- mapping = self._get_mapping_from_annotation(boundary_annotation, mappings)
+ def migrate_annotations(self) -> None:
+ for boundary_annotation in self.annotationsv1.boundaryAnnotations:
+ mapping = self._get_mapping_from_annotation(boundary_annotation)
if mapping is not None:
for annotation in migrate_boundary_annotation(
boundary_annotation, mapping
@@ -75,21 +60,21 @@ def migrate_annotations(
annotation, mapping.get_similarity()
)
- for called_after_annotation in annotationsv1.calledAfterAnnotations:
+ for called_after_annotation in self.annotationsv1.calledAfterAnnotations:
mapping = self._get_mapping_from_annotation(
- called_after_annotation, mappings
+ called_after_annotation
)
if mapping is not None:
for annotation in migrate_called_after_annotation(
- called_after_annotation, mapping, mappings
+ called_after_annotation, mapping, self.mappings
):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for description_annotation in annotationsv1.descriptionAnnotations:
+ for description_annotation in self.annotationsv1.descriptionAnnotations:
mapping = self._get_mapping_from_annotation(
- description_annotation, mappings
+ description_annotation
)
if mapping is not None:
for annotation in migrate_description_annotation(
@@ -99,66 +84,66 @@ def migrate_annotations(
annotation, mapping.get_similarity()
)
- for enum_annotation in annotationsv1.enumAnnotations:
- mapping = self._get_mapping_from_annotation(enum_annotation, mappings)
+ for enum_annotation in self.annotationsv1.enumAnnotations:
+ mapping = self._get_mapping_from_annotation(enum_annotation)
if mapping is not None:
for annotation in migrate_enum_annotation(enum_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for expert_annotation in annotationsv1.expertAnnotations:
- mapping = self._get_mapping_from_annotation(expert_annotation, mappings)
+ for expert_annotation in self.annotationsv1.expertAnnotations:
+ mapping = self._get_mapping_from_annotation(expert_annotation)
if mapping is not None:
for annotation in migrate_expert_annotation(expert_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for group_annotation in annotationsv1.groupAnnotations:
- mapping = self._get_mapping_from_annotation(group_annotation, mappings)
+ for group_annotation in self.annotationsv1.groupAnnotations:
+ mapping = self._get_mapping_from_annotation(group_annotation)
if mapping is not None:
for annotation in migrate_group_annotation(
- group_annotation, mapping, mappings
+ group_annotation, mapping, self.mappings
):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for move_annotation in annotationsv1.moveAnnotations:
- mapping = self._get_mapping_from_annotation(move_annotation, mappings)
+ for move_annotation in self.annotationsv1.moveAnnotations:
+ mapping = self._get_mapping_from_annotation(move_annotation)
if mapping is not None:
for annotation in migrate_move_annotation(move_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for rename_annotation in annotationsv1.renameAnnotations:
- mapping = self._get_mapping_from_annotation(rename_annotation, mappings)
+ for rename_annotation in self.annotationsv1.renameAnnotations:
+ mapping = self._get_mapping_from_annotation(rename_annotation)
if mapping is not None:
for annotation in migrate_rename_annotation(rename_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for remove_annotation in annotationsv1.removeAnnotations:
- mapping = self._get_mapping_from_annotation(remove_annotation, mappings)
+ for remove_annotation in self.annotationsv1.removeAnnotations:
+ mapping = self._get_mapping_from_annotation(remove_annotation)
if mapping is not None:
for annotation in migrate_remove_annotation(remove_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for todo_annotation in annotationsv1.todoAnnotations:
- mapping = self._get_mapping_from_annotation(todo_annotation, mappings)
+ for todo_annotation in self.annotationsv1.todoAnnotations:
+ mapping = self._get_mapping_from_annotation(todo_annotation)
if mapping is not None:
for annotation in migrate_todo_annotation(todo_annotation, mapping):
self.add_annotations_based_on_similarity(
annotation, mapping.get_similarity()
)
- for value_annotation in annotationsv1.valueAnnotations:
- mapping = self._get_mapping_from_annotation(value_annotation, mappings)
+ for value_annotation in self.annotationsv1.valueAnnotations:
+ mapping = self._get_mapping_from_annotation(value_annotation)
if mapping is not None:
for annotation in migrate_value_annotation(value_annotation, mapping):
self.add_annotations_based_on_similarity(
@@ -206,11 +191,17 @@ def _remove_duplicates(self) -> None:
if annotation_a is annotation_b:
continue
if (
- _are_semantic_equal(annotation_a, annotation_b)
+ are_semantic_equal(annotation_a, annotation_b)
and (annotation_b, annotation_a) not in duplicates
):
duplicates.append((annotation_a, annotation_b))
for annotation_a, annotation_b in duplicates:
+ if (
+ annotation_a.reviewResult != annotation_b.reviewResult
+ and EnumReviewResult.UNSURE in (annotation_a.reviewResult, annotation_b.reviewResult)
+ ):
+ annotation_a.reviewResult = EnumReviewResult.UNSURE
+ annotation_b.reviewResult = EnumReviewResult.UNSURE
b_in_migrated_annotation_store = annotation_b in getattr(
self.migrated_annotation_store, annotation_type
)
@@ -239,94 +230,3 @@ def _remove_duplicates(self) -> None:
getattr(
self.unsure_migrated_annotation_store, annotation_type
).remove(annotation_b)
-
-
-def _are_semantic_equal(
- annotation_a: AbstractAnnotation, annotation_b: AbstractAnnotation
-) -> bool:
- if (
- annotation_a.target == annotation_b.target
- and isinstance(annotation_a, type(annotation_b))
- and isinstance(annotation_b, type(annotation_a))
- ):
- if isinstance(annotation_a, BoundaryAnnotation) and isinstance(
- annotation_b, BoundaryAnnotation
- ):
- return annotation_a.interval == annotation_b.interval
- if isinstance(annotation_a, CalledAfterAnnotation) and isinstance(
- annotation_b, CalledAfterAnnotation
- ):
- return annotation_a.calledAfterName == annotation_b.calledAfterName
- if isinstance(annotation_a, DescriptionAnnotation) and isinstance(
- annotation_b, DescriptionAnnotation
- ):
- return annotation_a.newDescription == annotation_b.newDescription
- if (
- isinstance(annotation_a, EnumAnnotation)
- and isinstance(annotation_b, EnumAnnotation)
- and annotation_a.enumName == annotation_b.enumName
- and len(annotation_a.pairs) == len(annotation_a.pairs)
- ):
- list_a = sorted(list(annotation_a.pairs), key=lambda x: x.stringValue)
- list_b = sorted(list(annotation_b.pairs), key=lambda x: x.stringValue)
- for i in range(len(annotation_a.pairs)):
- if (
- list_a[i].stringValue != list_b[i].stringValue
- or list_a[i].instanceName != list_b[i].instanceName
- ):
- return False
- return True
- if isinstance(annotation_a, ExpertAnnotation) and isinstance(
- annotation_b, ExpertAnnotation
- ):
- return True
- if isinstance(annotation_a, GroupAnnotation) and isinstance(
- annotation_b, GroupAnnotation
- ):
- return annotation_a.groupName == annotation_b.groupName and set(
- annotation_a.parameters
- ) == set(annotation_b.parameters)
- if isinstance(annotation_a, MoveAnnotation) and isinstance(
- annotation_b, MoveAnnotation
- ):
- return annotation_a.destination == annotation_b.destination
- if isinstance(annotation_a, RemoveAnnotation) and isinstance(
- annotation_b, RemoveAnnotation
- ):
- return True
- if isinstance(annotation_a, RenameAnnotation) and isinstance(
- annotation_b, RenameAnnotation
- ):
- return annotation_a.newName == annotation_b.newName
- if isinstance(annotation_a, TodoAnnotation) and isinstance(
- annotation_b, TodoAnnotation
- ):
- return annotation_a.newTodo == annotation_b.newTodo
- if (
- isinstance(annotation_a, ValueAnnotation)
- and isinstance(annotation_b, ValueAnnotation)
- and annotation_a.variant == annotation_b.variant
- ):
- if isinstance(annotation_a, ConstantAnnotation) and isinstance(
- annotation_b, ConstantAnnotation
- ):
- return (
- annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType == annotation_b.defaultValueType
- )
- if isinstance(annotation_a, OptionalAnnotation) and isinstance(
- annotation_b, OptionalAnnotation
- ):
- return (
- annotation_a.defaultValue == annotation_b.defaultValue
- and annotation_a.defaultValueType == annotation_b.defaultValueType
- )
- if isinstance(annotation_a, OmittedAnnotation) and isinstance(
- annotation_b, OmittedAnnotation
- ):
- return True
- if isinstance(annotation_a, RequiredAnnotation) and isinstance(
- annotation_b, RequiredAnnotation
- ):
- return True
- return False
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 4e1d7e426..4b796871a 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -111,6 +111,7 @@ def migrate_enum_annotation(
enum_annotation.pairs,
)
)
+ continue
elif isinstance(parameter.type, NamedType):
continue
migrated_annotations.append(
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index d2402c62f..64ee987b3 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -1,6 +1,8 @@
import json
import os
+import pytest
+
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
@@ -170,15 +172,59 @@ def test_migrate_all_annotations() -> None:
for expected_annotation in annotationsv2:
expected_annotation_store.add_annotation(expected_annotation)
- migration = Migration()
- migration.migrate_annotations(annotation_store, mappings)
+ migration = Migration(annotation_store, mappings)
+ migration.migrate_annotations()
for value in migration.unsure_migrated_annotation_store.to_json().values():
if isinstance(value, dict):
assert len(value) == 0
- actual_annotations = migration.migrated_annotation_store
+ _assert_annotation_stores_are_equal(migration.migrated_annotation_store, expected_annotation_store)
+
+def test_migrate_command_and_both_annotation_stores() -> None:
+ apiv1_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "apiv1_data.json"
+ )
+ apiv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "apiv2_data.json"
+ )
+ annotationsv1_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "annotationv1.json"
+ )
+ annotationsv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "annotationv2.json"
+ )
+ unsure_annotationsv2_json_path = os.path.join(
+ os.getcwd(), "tests", "data", "migration", "unsure_annotationv2.json"
+ )
+ with open(apiv1_json_path, "r", encoding="utf-8") as apiv1_file, open(apiv2_json_path, "r", encoding="utf-8") as apiv2_file, open(annotationsv1_json_path, "r", encoding="utf-8") as annotationsv1_file, open(annotationsv2_json_path, "r", encoding="utf-8") as annotationsv2_file, open(
+ unsure_annotationsv2_json_path, "r", encoding="utf-8"
+ ) as unsure_annotationsv2_file:
+ apiv1_json = json.load(apiv1_file)
+ apiv1 = API.from_json(apiv1_json)
+ apiv2_json = json.load(apiv2_file)
+ apiv2 = API.from_json(apiv2_json)
+ annotationsv1_json = json.load(annotationsv1_file)
+ annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
+ expected_annotationsv2_json = json.load(annotationsv2_file)
+ annotationsv2 = AnnotationStore.from_json(expected_annotationsv2_json)
+ expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
+ unsure_annotationsv2 = AnnotationStore.from_json(expected_unsure_annotationsv2_json)
+
+ differ = SimpleDiffer()
+ api_mapping = APIMapping(
+ apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3
+ )
+ mappings = api_mapping.map_api()
+ migration = Migration(annotationsv1, mappings, reliable_similarity=0.9, unsure_similarity=0.75)
+ migration.migrate_annotations()
+
+ _assert_annotation_stores_are_equal(migration.migrated_annotation_store, annotationsv2)
+ _assert_annotation_stores_are_equal(migration.unsure_migrated_annotation_store, unsure_annotationsv2)
+
+
+def _assert_annotation_stores_are_equal(actual_annotations, expected_annotation_store):
def get_key(annotation: AbstractAnnotation) -> str:
return annotation.target
@@ -218,55 +264,3 @@ def get_key(annotation: AbstractAnnotation) -> str:
assert sorted(actual_annotations.valueAnnotations, key=get_key) == sorted(
expected_annotation_store.valueAnnotations, key=get_key
)
-
-
-def test_migrate_command_and_both_annotation_stores() -> None:
- apiv1_json_path = os.path.join(
- os.getcwd(), "tests", "data", "migration", "apiv1_data.json"
- )
- apiv2_json_path = os.path.join(
- os.getcwd(), "tests", "data", "migration", "apiv2_data.json"
- )
- annotationsv1_json_path = os.path.join(
- os.getcwd(), "tests", "data", "migration", "annotationv1.json"
- )
- annotationsv2_json_path = os.path.join(
- os.getcwd(), "tests", "data", "migration", "annotationv2.json"
- )
- unsure_annotationsv2_json_path = os.path.join(
- os.getcwd(), "tests", "data", "migration", "unsure_annotationv2.json"
- )
-
- with open(apiv1_json_path, "r", encoding="utf-8") as apiv1_file:
- apiv1_json = json.load(apiv1_file)
- apiv1 = API.from_json(apiv1_json)
-
- with open(apiv2_json_path, "r", encoding="utf-8") as apiv2_file:
- apiv2_json = json.load(apiv2_file)
- apiv2 = API.from_json(apiv2_json)
-
- with open(annotationsv1_json_path, "r", encoding="utf-8") as annotationsv1_file:
- annotationsv1_json = json.load(annotationsv1_file)
- annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
-
- with open(annotationsv2_json_path, "r", encoding="utf-8") as annotationsv2_file:
- expected_annotationsv2_json = json.load(annotationsv2_file)
-
- with open(
- unsure_annotationsv2_json_path, "r", encoding="utf-8"
- ) as unsure_annotationsv2_file:
- expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
-
- differ = SimpleDiffer()
- api_mapping = APIMapping(
- apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3
- )
- mappings = api_mapping.map_api()
- migration = Migration(reliable_similarity=0.9, unsure_similarity=0.75)
- migration.migrate_annotations(annotationsv1, mappings)
-
- assert migration.migrated_annotation_store.to_json() == expected_annotationsv2_json
- assert (
- migration.unsure_migrated_annotation_store.to_json()
- == expected_unsure_annotationsv2_json
- )
From 9b9ad849868f67c29a2705499a1a7e55a070e893 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Wed, 4 Jan 2023 19:56:32 +0100
Subject: [PATCH 35/40] further refactoring and fixing tests
---
.../annotations/_get_migration_text.py | 40 +++++++------------
.../annotations/_migrate_enum_annotation.py | 2 +-
.../processing/migration/test_migration.py | 2 -
3 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
index 9712154a6..378f0785d 100644
--- a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
+++ b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
@@ -88,23 +88,25 @@ def _get_further_information(annotation: AbstractAnnotation) -> str:
return " with the data '" + str(annotation.to_json()) + "'"
-def _get_migration_text(
- annotation: AbstractAnnotation, mapping: Mapping, additional_information: Any = None
+def get_migration_text(
+ annotation: AbstractAnnotation,
+ mapping: Mapping,
+ for_todo_annotation: bool = False,
+ additional_information: Any = None,
) -> str:
class_name = str(annotation.__class__.__name__)
if class_name.endswith("Annotation"):
class_name = class_name[:-10]
if issubclass(type(annotation), ValueAnnotation):
class_name = "Value"
-
migrate_text = (
- "The @" + class_name + " Annotation" + _get_further_information(annotation)
+ "The @" + class_name + " Annotation" + _get_further_information(annotation)
)
migrate_text += (
- " from the previous version was at '"
- + annotation.target
- + "' and the possible alternatives in the new version of the api are: "
- + _list_api_elements(mapping.get_apiv2_elements())
+ " from the previous version was at '"
+ + annotation.target
+ + "' and the possible alternatives in the new version of the api are: "
+ + _list_api_elements(mapping.get_apiv2_elements())
)
if additional_information is not None and isinstance(additional_information, list):
functions = [
@@ -114,7 +116,7 @@ def _get_migration_text(
]
if len(functions) > 0:
migrate_text += (
- " and the possible replacements (" + _list_api_elements(functions) + ")"
+ " and the possible replacements (" + _list_api_elements(functions) + ")"
)
parameters = [
@@ -124,23 +126,11 @@ def _get_migration_text(
]
if len(parameters) > 0:
migrate_text += (
- " and the possible replacements ("
- + _list_api_elements(parameters)
- + ")"
+ " and the possible replacements ("
+ + _list_api_elements(parameters)
+ + ")"
)
-
- return migrate_text
-
-
-def get_migration_text(
- annotation: AbstractAnnotation,
- mapping: Mapping,
- for_todo_annotation: bool = False,
- additional_information: Any = None,
-) -> str:
- migration_text = _get_migration_text(
- annotation, mapping, additional_information=additional_information
- )
+ migration_text = migrate_text
if for_todo_annotation:
return migration_text
if len(annotation.comment) == 0:
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 4b796871a..b95a37db9 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -112,7 +112,7 @@ def migrate_enum_annotation(
)
)
continue
- elif isinstance(parameter.type, NamedType):
+ if isinstance(parameter.type, NamedType):
continue
migrated_annotations.append(
EnumAnnotation(
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 64ee987b3..cfe384eb1 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -1,8 +1,6 @@
import json
import os
-import pytest
-
from package_parser.processing.annotations.model import (
AbstractAnnotation,
AnnotationStore,
From bc728f9e933c374dc5172aa354f6590ed7db447b Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Wed, 4 Jan 2023 20:13:11 +0100
Subject: [PATCH 36/40] fix linter errors
---
package-parser/tests/processing/migration/test_migration.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index cfe384eb1..47462a5f5 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -222,7 +222,7 @@ def test_migrate_command_and_both_annotation_stores() -> None:
_assert_annotation_stores_are_equal(migration.unsure_migrated_annotation_store, unsure_annotationsv2)
-def _assert_annotation_stores_are_equal(actual_annotations, expected_annotation_store):
+def _assert_annotation_stores_are_equal(actual_annotations: AnnotationStore, expected_annotation_store: AnnotationStore) -> None:
def get_key(annotation: AbstractAnnotation) -> str:
return annotation.target
From d9b100b5dc74bd8b04a3be3c2c4c62bcbf91d20d Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Wed, 4 Jan 2023 19:17:24 +0000
Subject: [PATCH 37/40] style: apply automated linter fixes
---
.../processing/annotations/__init__.py | 2 +-
.../annotations/_are_semantic_equal.py | 22 +++++--
.../processing/migration/_migrate.py | 11 ++--
.../annotations/_get_migration_text.py | 18 +++---
.../processing/migration/test_migration.py | 62 ++++++++++++-------
5 files changed, 72 insertions(+), 43 deletions(-)
diff --git a/package-parser/package_parser/processing/annotations/__init__.py b/package-parser/package_parser/processing/annotations/__init__.py
index c76d14b05..3cc45dd44 100644
--- a/package-parser/package_parser/processing/annotations/__init__.py
+++ b/package-parser/package_parser/processing/annotations/__init__.py
@@ -1,2 +1,2 @@
-from ._generate_annotations import generate_annotations
from ._are_semantic_equal import are_semantic_equal
+from ._generate_annotations import generate_annotations
diff --git a/package-parser/package_parser/processing/annotations/_are_semantic_equal.py b/package-parser/package_parser/processing/annotations/_are_semantic_equal.py
index ff42e3953..54438299e 100644
--- a/package-parser/package_parser/processing/annotations/_are_semantic_equal.py
+++ b/package-parser/package_parser/processing/annotations/_are_semantic_equal.py
@@ -1,7 +1,21 @@
-from package_parser.processing.annotations.model import AbstractAnnotation, BoundaryAnnotation, CalledAfterAnnotation, \
- DescriptionAnnotation, EnumAnnotation, ExpertAnnotation, GroupAnnotation, MoveAnnotation, RemoveAnnotation, \
- RenameAnnotation, TodoAnnotation, ValueAnnotation, ConstantAnnotation, OptionalAnnotation, OmittedAnnotation, \
- RequiredAnnotation
+from package_parser.processing.annotations.model import (
+ AbstractAnnotation,
+ BoundaryAnnotation,
+ CalledAfterAnnotation,
+ ConstantAnnotation,
+ DescriptionAnnotation,
+ EnumAnnotation,
+ ExpertAnnotation,
+ GroupAnnotation,
+ MoveAnnotation,
+ OmittedAnnotation,
+ OptionalAnnotation,
+ RemoveAnnotation,
+ RenameAnnotation,
+ RequiredAnnotation,
+ TodoAnnotation,
+ ValueAnnotation,
+)
def are_semantic_equal(
diff --git a/package-parser/package_parser/processing/migration/_migrate.py b/package-parser/package_parser/processing/migration/_migrate.py
index 0a6870a79..b534dbb72 100644
--- a/package-parser/package_parser/processing/migration/_migrate.py
+++ b/package-parser/package_parser/processing/migration/_migrate.py
@@ -61,9 +61,7 @@ def migrate_annotations(self) -> None:
)
for called_after_annotation in self.annotationsv1.calledAfterAnnotations:
- mapping = self._get_mapping_from_annotation(
- called_after_annotation
- )
+ mapping = self._get_mapping_from_annotation(called_after_annotation)
if mapping is not None:
for annotation in migrate_called_after_annotation(
called_after_annotation, mapping, self.mappings
@@ -73,9 +71,7 @@ def migrate_annotations(self) -> None:
)
for description_annotation in self.annotationsv1.descriptionAnnotations:
- mapping = self._get_mapping_from_annotation(
- description_annotation
- )
+ mapping = self._get_mapping_from_annotation(description_annotation)
if mapping is not None:
for annotation in migrate_description_annotation(
description_annotation, mapping
@@ -198,7 +194,8 @@ def _remove_duplicates(self) -> None:
for annotation_a, annotation_b in duplicates:
if (
annotation_a.reviewResult != annotation_b.reviewResult
- and EnumReviewResult.UNSURE in (annotation_a.reviewResult, annotation_b.reviewResult)
+ and EnumReviewResult.UNSURE
+ in (annotation_a.reviewResult, annotation_b.reviewResult)
):
annotation_a.reviewResult = EnumReviewResult.UNSURE
annotation_b.reviewResult = EnumReviewResult.UNSURE
diff --git a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
index 378f0785d..6503cae7a 100644
--- a/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
+++ b/package-parser/package_parser/processing/migration/annotations/_get_migration_text.py
@@ -100,13 +100,13 @@ def get_migration_text(
if issubclass(type(annotation), ValueAnnotation):
class_name = "Value"
migrate_text = (
- "The @" + class_name + " Annotation" + _get_further_information(annotation)
+ "The @" + class_name + " Annotation" + _get_further_information(annotation)
)
migrate_text += (
- " from the previous version was at '"
- + annotation.target
- + "' and the possible alternatives in the new version of the api are: "
- + _list_api_elements(mapping.get_apiv2_elements())
+ " from the previous version was at '"
+ + annotation.target
+ + "' and the possible alternatives in the new version of the api are: "
+ + _list_api_elements(mapping.get_apiv2_elements())
)
if additional_information is not None and isinstance(additional_information, list):
functions = [
@@ -116,7 +116,7 @@ def get_migration_text(
]
if len(functions) > 0:
migrate_text += (
- " and the possible replacements (" + _list_api_elements(functions) + ")"
+ " and the possible replacements (" + _list_api_elements(functions) + ")"
)
parameters = [
@@ -126,9 +126,9 @@ def get_migration_text(
]
if len(parameters) > 0:
migrate_text += (
- " and the possible replacements ("
- + _list_api_elements(parameters)
- + ")"
+ " and the possible replacements ("
+ + _list_api_elements(parameters)
+ + ")"
)
migration_text = migrate_text
if for_todo_annotation:
diff --git a/package-parser/tests/processing/migration/test_migration.py b/package-parser/tests/processing/migration/test_migration.py
index 47462a5f5..e85e58176 100644
--- a/package-parser/tests/processing/migration/test_migration.py
+++ b/package-parser/tests/processing/migration/test_migration.py
@@ -177,7 +177,9 @@ def test_migrate_all_annotations() -> None:
if isinstance(value, dict):
assert len(value) == 0
- _assert_annotation_stores_are_equal(migration.migrated_annotation_store, expected_annotation_store)
+ _assert_annotation_stores_are_equal(
+ migration.migrated_annotation_store, expected_annotation_store
+ )
def test_migrate_command_and_both_annotation_stores() -> None:
@@ -196,33 +198,49 @@ def test_migrate_command_and_both_annotation_stores() -> None:
unsure_annotationsv2_json_path = os.path.join(
os.getcwd(), "tests", "data", "migration", "unsure_annotationv2.json"
)
- with open(apiv1_json_path, "r", encoding="utf-8") as apiv1_file, open(apiv2_json_path, "r", encoding="utf-8") as apiv2_file, open(annotationsv1_json_path, "r", encoding="utf-8") as annotationsv1_file, open(annotationsv2_json_path, "r", encoding="utf-8") as annotationsv2_file, open(
+ with open(apiv1_json_path, "r", encoding="utf-8") as apiv1_file, open(
+ apiv2_json_path, "r", encoding="utf-8"
+ ) as apiv2_file, open(
+ annotationsv1_json_path, "r", encoding="utf-8"
+ ) as annotationsv1_file, open(
+ annotationsv2_json_path, "r", encoding="utf-8"
+ ) as annotationsv2_file, open(
unsure_annotationsv2_json_path, "r", encoding="utf-8"
) as unsure_annotationsv2_file:
- apiv1_json = json.load(apiv1_file)
- apiv1 = API.from_json(apiv1_json)
- apiv2_json = json.load(apiv2_file)
- apiv2 = API.from_json(apiv2_json)
- annotationsv1_json = json.load(annotationsv1_file)
- annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
- expected_annotationsv2_json = json.load(annotationsv2_file)
- annotationsv2 = AnnotationStore.from_json(expected_annotationsv2_json)
- expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
- unsure_annotationsv2 = AnnotationStore.from_json(expected_unsure_annotationsv2_json)
+ apiv1_json = json.load(apiv1_file)
+ apiv1 = API.from_json(apiv1_json)
+ apiv2_json = json.load(apiv2_file)
+ apiv2 = API.from_json(apiv2_json)
+ annotationsv1_json = json.load(annotationsv1_file)
+ annotationsv1 = AnnotationStore.from_json(annotationsv1_json)
+ expected_annotationsv2_json = json.load(annotationsv2_file)
+ annotationsv2 = AnnotationStore.from_json(expected_annotationsv2_json)
+ expected_unsure_annotationsv2_json = json.load(unsure_annotationsv2_file)
+ unsure_annotationsv2 = AnnotationStore.from_json(
+ expected_unsure_annotationsv2_json
+ )
- differ = SimpleDiffer()
- api_mapping = APIMapping(
- apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3
- )
- mappings = api_mapping.map_api()
- migration = Migration(annotationsv1, mappings, reliable_similarity=0.9, unsure_similarity=0.75)
- migration.migrate_annotations()
+ differ = SimpleDiffer()
+ api_mapping = APIMapping(
+ apiv1, apiv2, differ, threshold_of_similarity_between_mappings=0.3
+ )
+ mappings = api_mapping.map_api()
+ migration = Migration(
+ annotationsv1, mappings, reliable_similarity=0.9, unsure_similarity=0.75
+ )
+ migration.migrate_annotations()
- _assert_annotation_stores_are_equal(migration.migrated_annotation_store, annotationsv2)
- _assert_annotation_stores_are_equal(migration.unsure_migrated_annotation_store, unsure_annotationsv2)
+ _assert_annotation_stores_are_equal(
+ migration.migrated_annotation_store, annotationsv2
+ )
+ _assert_annotation_stores_are_equal(
+ migration.unsure_migrated_annotation_store, unsure_annotationsv2
+ )
-def _assert_annotation_stores_are_equal(actual_annotations: AnnotationStore, expected_annotation_store: AnnotationStore) -> None:
+def _assert_annotation_stores_are_equal(
+ actual_annotations: AnnotationStore, expected_annotation_store: AnnotationStore
+) -> None:
def get_key(annotation: AbstractAnnotation) -> str:
return annotation.target
From c4393fe5c9519bd7afe6cd89688d37f7184191ff Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Thu, 5 Jan 2023 15:01:34 +0100
Subject: [PATCH 38/40] migrate not unsure annotations if both types of the
elements are None
---
.../_migrate_boundary_annotation.py | 28 +++++----
.../annotations/_migrate_enum_annotation.py | 59 ++++++++++---------
2 files changed, 49 insertions(+), 38 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index 5159ecf80..d2dea7898 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -25,6 +25,7 @@
)
from ._constants import migration_author
+from ._get_annotated_api_element import get_annotated_api_element
from ._get_migration_text import get_migration_text
@@ -81,6 +82,10 @@ def migrate_boundary_annotation(
authors.append(migration_author)
boundary_annotation.authors = authors
+ annotated_apiv1_element = get_annotated_api_element(boundary_annotation, mapping.get_apiv1_elements())
+ if annotated_apiv1_element is None:
+ return []
+
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
parameter = mapping.get_apiv2_elements()[0]
if isinstance(parameter, (Attribute, Result)):
@@ -90,27 +95,29 @@ def migrate_boundary_annotation(
parameter_expects_number,
parameter_type_is_discrete,
) = _contains_number_and_is_discrete(parameter.type)
- if parameter.type is None:
+ if parameter.type is None and annotated_apiv1_element.type is not None:
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
boundary_annotation.comment = get_migration_text(
boundary_annotation, mapping
)
boundary_annotation.target = parameter.id
return [boundary_annotation]
- if parameter_expects_number:
+ if parameter_expects_number or (parameter.type is None and annotated_apiv1_element.type is None):
if (
- parameter_type_is_discrete
- != boundary_annotation.interval.isDiscrete
+ (parameter_type_is_discrete
+ != boundary_annotation.interval.isDiscrete)
+ and not (parameter.type is None and annotated_apiv1_element.type is None)
):
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
boundary_annotation.comment = get_migration_text(
boundary_annotation, mapping
)
- boundary_annotation.interval = (
- migrate_interval_to_fit_parameter_type(
- boundary_annotation.interval, parameter_type_is_discrete
+ if parameter_expects_number:
+ boundary_annotation.interval = (
+ migrate_interval_to_fit_parameter_type(
+ boundary_annotation.interval, parameter_type_is_discrete
+ )
)
- )
boundary_annotation.target = parameter.id
return [boundary_annotation]
return [
@@ -133,9 +140,10 @@ def migrate_boundary_annotation(
parameter.type
)
if (
- parameter.type is not None
+ (parameter.type is not None
and is_number
- and is_discrete == boundary_annotation.interval.isDiscrete
+ and is_discrete == boundary_annotation.interval.isDiscrete)
+ or (parameter.type is None and annotated_apiv1_element.type is None)
):
migrated_annotations.append(
BoundaryAnnotation(
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index b95a37db9..13dfb3767 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -25,6 +25,7 @@
)
from ._constants import migration_author
+from ._get_annotated_api_element import get_annotated_api_element
from ._get_migration_text import get_migration_text
@@ -57,20 +58,23 @@ def migrate_enum_annotation(
authors.append(migration_author)
enum_annotation.authors = authors
+ annotated_apiv1_element = get_annotated_api_element(enum_annotation, mapping.get_apiv1_elements())
+ if annotated_apiv1_element is None:
+ return []
+
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
parameter = mapping.get_apiv2_elements()[0]
if isinstance(parameter, (Attribute, Result)):
return []
if isinstance(parameter, Parameter):
- if parameter.type is not None:
- if _contains_string(
- parameter.type
- ) and _default_value_is_in_instance_values_or_is_empty(
- parameter.default_value, enum_annotation.pairs
- ):
- enum_annotation.target = parameter.id
- return [enum_annotation]
- if isinstance(parameter.type, NamedType):
+ if (parameter.type is not None and _contains_string(
+ parameter.type
+ ) and _default_value_is_in_instance_values_or_is_empty(
+ parameter.default_value, enum_annotation.pairs
+ )) or (parameter.type is None and annotated_apiv1_element.type is None):
+ enum_annotation.target = parameter.id
+ return [enum_annotation]
+ if isinstance(parameter.type, NamedType):
# assuming api has been chanced to an enum type:
# do not migrate annotation
return []
@@ -94,26 +98,25 @@ def migrate_enum_annotation(
if isinstance(mapping, (OneToManyMapping, ManyToManyMapping)):
for parameter in mapping.get_apiv2_elements():
if isinstance(parameter, Parameter):
- if parameter.type is not None:
- if _contains_string(
- parameter.type
- ) and _default_value_is_in_instance_values_or_is_empty(
- parameter.default_value, enum_annotation.pairs
- ):
- migrated_annotations.append(
- EnumAnnotation(
- parameter.id,
- authors,
- enum_annotation.reviewers,
- enum_annotation.comment,
- EnumReviewResult.NONE,
- enum_annotation.enumName,
- enum_annotation.pairs,
- )
+ if (parameter.type is not None and _contains_string(
+ parameter.type
+ ) and _default_value_is_in_instance_values_or_is_empty(
+ parameter.default_value, enum_annotation.pairs
+ )) or (parameter.type is None and annotated_apiv1_element.type is None):
+ migrated_annotations.append(
+ EnumAnnotation(
+ parameter.id,
+ authors,
+ enum_annotation.reviewers,
+ enum_annotation.comment,
+ EnumReviewResult.NONE,
+ enum_annotation.enumName,
+ enum_annotation.pairs,
)
- continue
- if isinstance(parameter.type, NamedType):
- continue
+ )
+ continue
+ if isinstance(parameter.type, NamedType):
+ continue
migrated_annotations.append(
EnumAnnotation(
parameter.id,
From bc9a761bbc668b503eeb0ea9ce66b18d7756ae83 Mon Sep 17 00:00:00 2001
From: Aclrian <32142988+Aclrian@users.noreply.github.com>
Date: Thu, 5 Jan 2023 15:41:31 +0100
Subject: [PATCH 39/40] fix linter errors
---
.../annotations/_migrate_boundary_annotation.py | 2 +-
.../migration/annotations/_migrate_enum_annotation.py | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index d2dea7898..9bf747759 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -83,7 +83,7 @@ def migrate_boundary_annotation(
boundary_annotation.authors = authors
annotated_apiv1_element = get_annotated_api_element(boundary_annotation, mapping.get_apiv1_elements())
- if annotated_apiv1_element is None:
+ if annotated_apiv1_element is None or not isinstance(annotated_apiv1_element, Parameter):
return []
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 13dfb3767..18a69fedd 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -59,7 +59,7 @@ def migrate_enum_annotation(
enum_annotation.authors = authors
annotated_apiv1_element = get_annotated_api_element(enum_annotation, mapping.get_apiv1_elements())
- if annotated_apiv1_element is None:
+ if annotated_apiv1_element is None or not isinstance(annotated_apiv1_element, Parameter):
return []
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
@@ -78,11 +78,10 @@ def migrate_enum_annotation(
# assuming api has been chanced to an enum type:
# do not migrate annotation
return []
- else:
- enum_annotation.reviewResult = EnumReviewResult.UNSURE
- enum_annotation.comment = get_migration_text(enum_annotation, mapping)
- enum_annotation.target = parameter.id
- return [enum_annotation]
+ enum_annotation.reviewResult = EnumReviewResult.UNSURE
+ enum_annotation.comment = get_migration_text(enum_annotation, mapping)
+ enum_annotation.target = parameter.id
+ return [enum_annotation]
return [
TodoAnnotation(
parameter.id,
From bbde0b49e6d4fe8087d6d6d1474c71638667ac64 Mon Sep 17 00:00:00 2001
From: Aclrian
Date: Thu, 5 Jan 2023 14:49:30 +0000
Subject: [PATCH 40/40] style: apply automated linter fixes
---
.../_migrate_boundary_annotation.py | 26 ++++++++-----
.../annotations/_migrate_enum_annotation.py | 38 +++++++++++--------
2 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
index 9bf747759..97c1b3a3a 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_boundary_annotation.py
@@ -82,8 +82,12 @@ def migrate_boundary_annotation(
authors.append(migration_author)
boundary_annotation.authors = authors
- annotated_apiv1_element = get_annotated_api_element(boundary_annotation, mapping.get_apiv1_elements())
- if annotated_apiv1_element is None or not isinstance(annotated_apiv1_element, Parameter):
+ annotated_apiv1_element = get_annotated_api_element(
+ boundary_annotation, mapping.get_apiv1_elements()
+ )
+ if annotated_apiv1_element is None or not isinstance(
+ annotated_apiv1_element, Parameter
+ ):
return []
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
@@ -102,11 +106,14 @@ def migrate_boundary_annotation(
)
boundary_annotation.target = parameter.id
return [boundary_annotation]
- if parameter_expects_number or (parameter.type is None and annotated_apiv1_element.type is None):
+ if parameter_expects_number or (
+ parameter.type is None and annotated_apiv1_element.type is None
+ ):
if (
- (parameter_type_is_discrete
- != boundary_annotation.interval.isDiscrete)
- and not (parameter.type is None and annotated_apiv1_element.type is None)
+ parameter_type_is_discrete
+ != boundary_annotation.interval.isDiscrete
+ ) and not (
+ parameter.type is None and annotated_apiv1_element.type is None
):
boundary_annotation.reviewResult = EnumReviewResult.UNSURE
boundary_annotation.comment = get_migration_text(
@@ -140,11 +147,10 @@ def migrate_boundary_annotation(
parameter.type
)
if (
- (parameter.type is not None
+ parameter.type is not None
and is_number
- and is_discrete == boundary_annotation.interval.isDiscrete)
- or (parameter.type is None and annotated_apiv1_element.type is None)
- ):
+ and is_discrete == boundary_annotation.interval.isDiscrete
+ ) or (parameter.type is None and annotated_apiv1_element.type is None):
migrated_annotations.append(
BoundaryAnnotation(
parameter.id,
diff --git a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
index 18a69fedd..07d59bdf0 100644
--- a/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
+++ b/package-parser/package_parser/processing/migration/annotations/_migrate_enum_annotation.py
@@ -58,8 +58,12 @@ def migrate_enum_annotation(
authors.append(migration_author)
enum_annotation.authors = authors
- annotated_apiv1_element = get_annotated_api_element(enum_annotation, mapping.get_apiv1_elements())
- if annotated_apiv1_element is None or not isinstance(annotated_apiv1_element, Parameter):
+ annotated_apiv1_element = get_annotated_api_element(
+ enum_annotation, mapping.get_apiv1_elements()
+ )
+ if annotated_apiv1_element is None or not isinstance(
+ annotated_apiv1_element, Parameter
+ ):
return []
if isinstance(mapping, (OneToOneMapping, ManyToOneMapping)):
@@ -67,17 +71,19 @@ def migrate_enum_annotation(
if isinstance(parameter, (Attribute, Result)):
return []
if isinstance(parameter, Parameter):
- if (parameter.type is not None and _contains_string(
- parameter.type
- ) and _default_value_is_in_instance_values_or_is_empty(
- parameter.default_value, enum_annotation.pairs
- )) or (parameter.type is None and annotated_apiv1_element.type is None):
+ if (
+ parameter.type is not None
+ and _contains_string(parameter.type)
+ and _default_value_is_in_instance_values_or_is_empty(
+ parameter.default_value, enum_annotation.pairs
+ )
+ ) or (parameter.type is None and annotated_apiv1_element.type is None):
enum_annotation.target = parameter.id
return [enum_annotation]
if isinstance(parameter.type, NamedType):
- # assuming api has been chanced to an enum type:
- # do not migrate annotation
- return []
+ # assuming api has been chanced to an enum type:
+ # do not migrate annotation
+ return []
enum_annotation.reviewResult = EnumReviewResult.UNSURE
enum_annotation.comment = get_migration_text(enum_annotation, mapping)
enum_annotation.target = parameter.id
@@ -97,11 +103,13 @@ def migrate_enum_annotation(
if isinstance(mapping, (OneToManyMapping, ManyToManyMapping)):
for parameter in mapping.get_apiv2_elements():
if isinstance(parameter, Parameter):
- if (parameter.type is not None and _contains_string(
- parameter.type
- ) and _default_value_is_in_instance_values_or_is_empty(
- parameter.default_value, enum_annotation.pairs
- )) or (parameter.type is None and annotated_apiv1_element.type is None):
+ if (
+ parameter.type is not None
+ and _contains_string(parameter.type)
+ and _default_value_is_in_instance_values_or_is_empty(
+ parameter.default_value, enum_annotation.pairs
+ )
+ ) or (parameter.type is None and annotated_apiv1_element.type is None):
migrated_annotations.append(
EnumAnnotation(
parameter.id,