-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from OpenTrafficCam/feature/4641-implement-sa…
…ve-and-save-as Feature/4641 implement save and save as
- Loading branch information
Showing
46 changed files
with
1,345 additions
and
283 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
OTAnalytics/adapter_ui/abstract_button_quick_save_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class AbstractButtonQuickSaveConfig(ABC): | ||
|
||
@abstractmethod | ||
def set_state_changed_color(self) -> None: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def set_default_color(self) -> None: | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from pathlib import Path | ||
from typing import Callable | ||
|
||
Deserializer = Callable[[Path], dict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from abc import ABC, abstractmethod | ||
from pathlib import Path | ||
from typing import Iterable, Sequence | ||
|
||
from OTAnalytics.domain.flow import Flow | ||
from OTAnalytics.domain.section import Section | ||
|
||
|
||
class FlowParser(ABC): | ||
@abstractmethod | ||
def parse(self, file: Path) -> tuple[Sequence[Section], Sequence[Flow]]: | ||
pass | ||
|
||
@abstractmethod | ||
def parse_content( | ||
self, | ||
section_content: list[dict], | ||
flow_content: list[dict], | ||
) -> tuple[Sequence[Section], Sequence[Flow]]: | ||
pass | ||
|
||
@abstractmethod | ||
def parse_section(self, entry: dict) -> Section: | ||
pass | ||
|
||
@abstractmethod | ||
def serialize( | ||
self, | ||
sections: Iterable[Section], | ||
flows: Iterable[Flow], | ||
file: Path, | ||
) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def convert( | ||
self, | ||
sections: Iterable[Section], | ||
flows: Iterable[Flow], | ||
) -> dict[str, list[dict]]: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.