-
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 branch 'main' into feature/flet-frontend
- Loading branch information
Showing
19 changed files
with
424 additions
and
7 deletions.
There are no files selected for viewing
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,17 @@ | ||
configure_file(presentation.qmd presentation.qmd COPYONLY) | ||
|
||
add_custom_target(presentation.2024.10.24 | ||
COMMAND | ||
${Quarto_EXECUTABLE} | ||
render ${CMAKE_CURRENT_BINARY_DIR}/presentation.qmd --to html | ||
BYPRODUCTS | ||
presentation.html | ||
) | ||
|
||
set_property( | ||
DIRECTORY | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
PROPERTY | ||
ADDITIONAL_CLEAN_FILES | ||
presentation_files | ||
) |
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,34 @@ | ||
--- | ||
title: "Adaptation pathways" | ||
subtitle: "Current status" | ||
date: "20241024" | ||
format: | ||
revealjs: | ||
theme: moon | ||
fontsize: 2em | ||
code-line-numbers: false | ||
highlight-style: nord | ||
standalone: true | ||
embed-resources: true | ||
--- | ||
|
||
|
||
::: {.incremental} | ||
- All code, tests, docs are in the Git repository | ||
- Generated targets: | ||
- Run tests | ||
- Documentation | ||
- Python package (Wheel package) | ||
- Portable distribution of GUI (zip file) | ||
- Bugs, TODOs are described in GitHub issues | ||
::: | ||
|
||
|
||
--- | ||
|
||
::: {.incremental} | ||
- Developer Manual | ||
- User Manual | ||
- GitHub issues | ||
- GitHub wiki (use?) | ||
::: |
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 @@ | ||
add_subdirectory(24) |
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,17 @@ | ||
configure_file(presentation.qmd presentation.qmd COPYONLY) | ||
|
||
add_custom_target(presentation.2024.11.12 | ||
COMMAND | ||
${Quarto_EXECUTABLE} | ||
render ${CMAKE_CURRENT_BINARY_DIR}/presentation.qmd --to html | ||
BYPRODUCTS | ||
presentation.html | ||
) | ||
|
||
set_property( | ||
DIRECTORY | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
PROPERTY | ||
ADDITIONAL_CLEAN_FILES | ||
presentation_files | ||
) |
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,186 @@ | ||
--- | ||
title: "Adaptation pathways" | ||
subtitle: "Technicalities" | ||
date: "20241112" | ||
format: | ||
revealjs: | ||
theme: moon | ||
fontsize: 2em | ||
code-line-numbers: false | ||
highlight-style: nord | ||
standalone: true | ||
embed-resources: true | ||
--- | ||
|
||
# Topics | ||
|
||
::: {.incremental} | ||
- GUI | ||
- Plotting | ||
::: | ||
|
||
|
||
# Assumptions | ||
|
||
::: {.incremental} | ||
- Pathway logic in Python package | ||
- More freedom WRT UI-specific code | ||
- UI is one of the possible interfaces | ||
- Generator useful in workshop setting → interactivity | ||
::: | ||
|
||
|
||
# GUI | ||
|
||
## Aspects | ||
|
||
::: {.incremental} | ||
- Web vs desktop | ||
- Installer vs URL | ||
- "Round trip latency" | ||
::: | ||
|
||
|
||
## Options | ||
|
||
::: {.incremental} | ||
- Qt | ||
- Flet | ||
- "Web" | ||
- Dash | ||
::: | ||
|
||
|
||
## Qt | ||
|
||
::: {.incremental} | ||
- Desktop application | ||
- Installer | ||
- Python bindings | ||
::: | ||
|
||
|
||
## Flet | ||
|
||
::: {.incremental} | ||
- Web, desktop and mobile application | ||
- Server process required: | ||
- Yes (default) | ||
- No (icw Pyodide) | ||
- Access to local file system → standard open/save dialogs | ||
- Python bindings (Flutter) | ||
- Pyodide | ||
::: | ||
|
||
|
||
## Web | ||
|
||
::: {.incremental} | ||
- Web application | ||
- Server process required | ||
- Yes (default) | ||
- No (icw Pyodide) | ||
- Styling using CSS (also in case of Flet and Dash) | ||
::: | ||
|
||
|
||
## Dash | ||
|
||
::: {.incremental} | ||
- Dashboard, but also useful for general UI dev | ||
- Integration with plotly | ||
- Web application and desktop application (Qt web widget) | ||
- Commercial (beware of enshittification?) | ||
- More popular than Flet | ||
::: | ||
|
||
|
||
# Plotting | ||
|
||
## Aspects | ||
|
||
::: {.incremental} | ||
- Support for visualization styles | ||
- Vector vs raster formats | ||
- Python | ||
- Interactivity | ||
- Hovering | ||
- Save as {pdf,png,...} from Python script | ||
::: | ||
|
||
|
||
## Options | ||
|
||
::: {.incremental} | ||
- matplotlib | ||
- plotly | ||
::: | ||
|
||
|
||
## matplotlib | ||
|
||
::: {.incremental} | ||
- Python | ||
- Vector + raster formats | ||
- Primitives for custom plots | ||
- Support for interactivity | ||
- We already use it | ||
- Installed by default | ||
::: | ||
|
||
|
||
## plotly | ||
|
||
::: {.incremental} | ||
- Python bindings | ||
- Vector + raster formats | ||
- Support for interactivity | ||
- Customization through JavaScript? | ||
- Commercial (enshittification?) | ||
::: | ||
|
||
|
||
# Solutions | ||
|
||
## Flet app | ||
|
||
::: {.incremental} | ||
- GUI: Flet | ||
- Plotting: matplotlib | ||
- Pyodide | ||
- ✓: | ||
- No installation | ||
- Works everywhere | ||
- Everything in Python | ||
- ~: | ||
- Will Flet fly? | ||
::: | ||
|
||
|
||
## Qt desktop app | ||
|
||
::: {.incremental} | ||
- GUI: Qt | ||
- Plotting: matplotlib | ||
- ✓: | ||
- Works on all desktop platforms | ||
- Everything in Python | ||
- No server process | ||
- Access to local file system | ||
- ~: | ||
- Requires installation | ||
- Package is platform specific | ||
::: | ||
|
||
|
||
## Dash app | ||
|
||
::: {.incremental} | ||
- GUI: Dash | ||
- Plotting: plotly | ||
- ✓: | ||
- Everything in Python | ||
- ~: | ||
- Server process | ||
- Dependence on a single company | ||
::: |
Empty file.
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
add_subdirectory(01) | ||
add_subdirectory(03) | ||
add_subdirectory(10) | ||
add_subdirectory(11) |
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,16 @@ | ||
from comparisons import SequenceComparison | ||
from metric import Metric, MetricValue | ||
|
||
class Action: | ||
id: str | ||
name: str | ||
color: str | ||
icon: str | ||
metric_data: dict[Metric, MetricValue | None] | ||
|
||
class ActionDependency: | ||
id: str | ||
action: Action | ||
relation: SequenceComparison | ||
other_actions: list[Action] | ||
actions_in_order: bool |
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,17 @@ | ||
from enum import Enum | ||
|
||
class SequenceComparison(Enum): | ||
STARTS_WITH = 1 | ||
DOESNT_START_WITH = 2 | ||
CONTAINS = 3 | ||
DOESNT_CONTAIN = 4 | ||
ENDS_WITH = 5 | ||
DOESNT_END_WITH = 6 | ||
|
||
class NumberComparison(Enum): | ||
EQUAL = 1 | ||
DOESNT_EQUAL = 2 | ||
LESS_THAN = 3 | ||
LESS_THAN_OR_EQUAL = 4 | ||
GREATER_THAN = 5 | ||
GREATER_THAN_OR_EQUAL = 6 |
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,13 @@ | ||
from comparisons import SequenceComparison, NumberComparison | ||
from metric import Metric | ||
from action import Action | ||
|
||
class ActionFilter: | ||
relation: SequenceComparison | ||
actions: list[Action] | ||
actions_in_order: bool | ||
|
||
class MetricFilter: | ||
metric: Metric | ||
relation: NumberComparison | ||
value: float |
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,25 @@ | ||
from enum import Enum | ||
|
||
class MetricEstimate(Enum): | ||
MANUAL = 1 | ||
SUM = 2 | ||
AVERAGE = 3 | ||
MINIMUM = 4 | ||
MAXIMUM = 5 | ||
LAST = 6 | ||
|
||
class MetricUnit: | ||
symbol: str | ||
place_after_value: bool | ||
value_format: str | ||
|
||
class Metric: | ||
id: str | ||
name: str | ||
unit: MetricUnit | ||
current_value: float | ||
estimate: MetricEstimate | ||
|
||
class MetricValue: | ||
value: float | ||
is_estimate: bool |
Oops, something went wrong.