Skip to content

Commit

Permalink
feat: update desbordante package
Browse files Browse the repository at this point in the history
  • Loading branch information
vladyoslav committed Oct 28, 2024
1 parent f6424ae commit 58b4adb
Show file tree
Hide file tree
Showing 5 changed files with 1,114 additions and 1,022 deletions.
3 changes: 3 additions & 0 deletions internal/domain/task/entities/fd/fd_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
HyFD,
Pyro,
Tane,
PFDTane,
)

from internal.domain.task.entities.task import Task
Expand Down Expand Up @@ -76,6 +77,8 @@ def _match_algo_by_name(self, algo_name: str) -> FdAlgorithm:
return FdMine()
case FdAlgoName.HyFD:
return HyFD()
case FdAlgoName.PFDTane:
return PFDTane()
case FdAlgoName.Pyro:
return Pyro()
case FdAlgoName.Tane:
Expand Down
19 changes: 17 additions & 2 deletions internal/domain/task/value_objects/fd/algo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,34 @@ class BaseFdConfig(OptionalModel):
class AidConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.Aid]

is_null_equal_null: bool
max_lhs: Annotated[int, Field(ge=1, le=10)]


class DFDConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.DFD]

max_lhs: Annotated[int, Field(ge=1, le=10)]
is_null_equal_null: bool
threads: Annotated[int, Field(ge=1, le=8)]


class DepminerConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.Depminer]

max_lhs: Annotated[int, Field(ge=1, le=10)]
is_null_equal_null: bool


class FDepConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.FDep]

is_null_equal_null: bool
max_lhs: Annotated[int, Field(ge=1, le=10)]


class FUNConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.FUN]

max_lhs: Annotated[int, Field(ge=1, le=10)]
is_null_equal_null: bool


Expand All @@ -54,15 +57,26 @@ class FastFDsConfig(BaseFdConfig):
class FdMineConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.FdMine]

max_lhs: Annotated[int, Field(ge=1, le=10)]
is_null_equal_null: bool


class HyFDConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.HyFD]

max_lhs: Annotated[int, Field(ge=1, le=10)]
is_null_equal_null: bool


class PFDTaneConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.PFDTane]

is_null_equal_null: bool
error: Annotated[float, Field(ge=0, le=1)]
error_measure: Annotated[str, Literal["per_tuple", "per_value"]]
max_lhs: Annotated[int, Field(ge=1, le=10)]


class PyroConfig(BaseFdConfig):
algo_name: Literal[FdAlgoName.Pyro]

Expand Down Expand Up @@ -91,6 +105,7 @@ class TaneConfig(BaseFdConfig):
FastFDsConfig,
FdMineConfig,
HyFDConfig,
PFDTaneConfig,
PyroConfig,
TaneConfig,
],
Expand Down
1 change: 1 addition & 0 deletions internal/domain/task/value_objects/fd/algo_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ class FdAlgoName(StrEnum):
FastFDs = auto()
FdMine = auto()
HyFD = auto()
PFDTane = auto()
Pyro = auto()
Tane = auto()
Loading

0 comments on commit 58b4adb

Please sign in to comment.