config-cli-gui 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/HISTORY.md +12 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/PKG-INFO +1 -1
- config_cli_gui-0.2.6/config.yaml +52 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/usage/config.md +10 -8
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/_version.py +3 -3
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/config.py +42 -1
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/gui.py +30 -6
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/PKG-INFO +1 -1
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/config/config_example.py +13 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/test_config_manager.py +13 -0
- config_cli_gui-0.2.4/config.yaml +0 -48
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/FUNDING.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/actions/setup-environment/action.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/dependabot.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/init.sh +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/release_message.sh +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/update_funding.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/workflows/main.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/workflows/release.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.github/workflows/update_readme.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.gitignore +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.idea/runConfigurations/config_generate.xml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.idea/runConfigurations/example_project_cli.xml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.idea/runConfigurations/example_project_gui.xml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.pre-commit-config.yaml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.readthedocs.yaml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/LICENSE +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/Makefile +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/README.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/.nav.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/_static/img/favicon.png +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/_static/img/logo.png +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/css/custom.css +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/develop/contributing.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/develop/make_windows.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/develop/naming_convention.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/funding/funding.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/getting-started/install.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/getting-started/virtual-environment.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/index.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/docs/usage/cli.md +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/mkdocs.yml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/pyproject.toml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/scripts/show_filelist.ps1 +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/scripts/show_tree.ps1 +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/scripts/show_tree.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/scripts/update_readme.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/setup.cfg +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/cli.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui/docs.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/SOURCES.txt +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/dependency_links.txt +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/entry_points.txt +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/requires.txt +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/top_level.txt +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/template.yml.url +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/__main__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/cli/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/cli/__main__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/cli/cli_example.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/config/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/core/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/core/base.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/core/logging.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/example.gpx +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/gui/__init__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/gui/__main__.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/gui/config.yaml +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/gui/gui_example.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/test_cli.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/test_docs.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/test_generic_cli.py +0 -0
- {config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/uv.lock +0 -0
|
@@ -4,6 +4,18 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
(unreleased)
|
|
6
6
|
------------
|
|
7
|
+
- Vector: Add property for 2d and 3d vectors. [Paul Magister]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
0.2.5 (2025-11-19)
|
|
11
|
+
------------------
|
|
12
|
+
- Docs: Update HISTORY.md for release 0.2.5. [Paul Magister]
|
|
13
|
+
- Path widget: file or dir buttons. [Paul Magister]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
0.2.4 (2025-11-17)
|
|
17
|
+
------------------
|
|
18
|
+
- Docs: Update HISTORY.md for release 0.2.4. [Paul Magister]
|
|
7
19
|
- Color: return rgb tuple. [Paul Magister]
|
|
8
20
|
|
|
9
21
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
app:
|
|
2
|
+
# Date format to use | type=str
|
|
3
|
+
date_format: '%Y-%m-%d'
|
|
4
|
+
# Enable logging to console | type=bool | choices=[True, False]
|
|
5
|
+
enable_console_logging: true
|
|
6
|
+
# Enable logging to file | type=bool | choices=[True, False]
|
|
7
|
+
enable_file_logging: true
|
|
8
|
+
# Number of backup log files to keep | type=int
|
|
9
|
+
log_backup_count: 5
|
|
10
|
+
# Maximum log file size in MB before rotation | type=int
|
|
11
|
+
log_file_max_size: 10
|
|
12
|
+
# Log message format style | type=str | choices=['simple', 'detailed', 'json']
|
|
13
|
+
log_format: detailed
|
|
14
|
+
# Logging level for the application | type=str | choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
|
|
15
|
+
log_level: INFO
|
|
16
|
+
# Maximum number of worker threads | type=int
|
|
17
|
+
max_workers: 4
|
|
18
|
+
cli:
|
|
19
|
+
# Include elevation data in waypoints | type=bool [CLI] | choices=[True, False]
|
|
20
|
+
elevation: false
|
|
21
|
+
# Extract starting points of each track as waypoint | type=bool [CLI] | choices=[True, False]
|
|
22
|
+
extract_waypoints: true
|
|
23
|
+
# Path to input (file or folder) | type=str [CLI]
|
|
24
|
+
input: ''
|
|
25
|
+
# Maximum distance between two waypoints | type=int [CLI]
|
|
26
|
+
min_dist: 20
|
|
27
|
+
# Path to output destination | type=str [CLI]
|
|
28
|
+
output: ''
|
|
29
|
+
gui:
|
|
30
|
+
# Automatically scroll to the newest log entries | type=bool | choices=[True, False]
|
|
31
|
+
auto_scroll_log: true
|
|
32
|
+
# Height of the log window in pixels | type=int
|
|
33
|
+
log_window_height: 200
|
|
34
|
+
# Maximum number of log lines to keep in GUI | type=int
|
|
35
|
+
max_log_lines: 1000
|
|
36
|
+
# Point in 2D space | type=Vector
|
|
37
|
+
point2D: (7, 11)
|
|
38
|
+
# Point in 3D space | type=Vector
|
|
39
|
+
point3D: (1.2, 3.4, 5.6)
|
|
40
|
+
# GUI theme setting | type=str | choices=['light', 'dark', 'auto']
|
|
41
|
+
theme: light
|
|
42
|
+
# Default window height | type=int
|
|
43
|
+
window_height: 600
|
|
44
|
+
# Default window width | type=int
|
|
45
|
+
window_width: 800
|
|
46
|
+
misc:
|
|
47
|
+
# Color setting for the application | type=Color
|
|
48
|
+
some_color: '#ff0000'
|
|
49
|
+
# Date setting for the application | type=datetime
|
|
50
|
+
some_date: '2025-12-31T10:30:45'
|
|
51
|
+
# Path to the file to use | type=PosixPath
|
|
52
|
+
some_file: some_file.txt
|
|
@@ -28,14 +28,16 @@ The parameters in the cli category can be accessed via the command line interfac
|
|
|
28
28
|
|
|
29
29
|
## Category "gui"
|
|
30
30
|
|
|
31
|
-
| Name | Type
|
|
32
|
-
|
|
33
|
-
| theme | str
|
|
34
|
-
| window_width | int
|
|
35
|
-
| window_height | int
|
|
36
|
-
| log_window_height | int
|
|
37
|
-
| auto_scroll_log | bool
|
|
38
|
-
| max_log_lines | int
|
|
31
|
+
| Name | Type | Description | Default | Choices |
|
|
32
|
+
|-------------------|--------|------------------------------------------------|-----------------------|---------------------------|
|
|
33
|
+
| theme | str | GUI theme setting | 'light' | ['light', 'dark', 'auto'] |
|
|
34
|
+
| window_width | int | Default window width | 800 | - |
|
|
35
|
+
| window_height | int | Default window height | 600 | - |
|
|
36
|
+
| log_window_height | int | Height of the log window in pixels | 200 | - |
|
|
37
|
+
| auto_scroll_log | bool | Automatically scroll to the newest log entries | True | [True, False] |
|
|
38
|
+
| max_log_lines | int | Maximum number of log lines to keep in GUI | 1000 | - |
|
|
39
|
+
| point2D | Vector | Point in 2D space | Vector(7, 11) | - |
|
|
40
|
+
| point3D | Vector | Point in 3D space | Vector(1.2, 3.4, 5.6) | - |
|
|
39
41
|
|
|
40
42
|
## Category "misc"
|
|
41
43
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.6'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 6)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g614991261'
|
|
@@ -9,6 +9,39 @@ import yaml
|
|
|
9
9
|
from pydantic import BaseModel
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
class Vector:
|
|
13
|
+
"""Class that represents a vector or point in 2D or 3D"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, x: int | float, y: int | float, z: int | float | None = None):
|
|
16
|
+
self.x = x
|
|
17
|
+
self.y = y
|
|
18
|
+
self.z = z
|
|
19
|
+
|
|
20
|
+
def to_list(self) -> list[int]:
|
|
21
|
+
return [self.x, self.y, self.z] if self.z is not None else [self.x, self.y]
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def from_list(cls, coordinate: list[int | str | float]) -> "Vector":
|
|
25
|
+
if len(coordinate) == 2:
|
|
26
|
+
return cls(float(coordinate[0]), float(coordinate[1]))
|
|
27
|
+
if len(coordinate) >= 3:
|
|
28
|
+
return cls(float(coordinate[0]), float(coordinate[1]), float(coordinate[2]))
|
|
29
|
+
return cls()
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_str(cls, coordinate: str) -> "Vector":
|
|
33
|
+
return cls.from_list(coordinate.strip("()[]").split(","))
|
|
34
|
+
|
|
35
|
+
def to_str(self) -> str:
|
|
36
|
+
return f"({self.x}, {self.y}, {self.z})" if self.z is not None else f"({self.x}, {self.y})" # type: ignore
|
|
37
|
+
|
|
38
|
+
def __str__(self):
|
|
39
|
+
return self.to_str()
|
|
40
|
+
|
|
41
|
+
def __repr__(self):
|
|
42
|
+
return f"Vector{str(self)}"
|
|
43
|
+
|
|
44
|
+
|
|
12
45
|
class Color:
|
|
13
46
|
"""Simple color class for RGB values."""
|
|
14
47
|
|
|
@@ -168,6 +201,10 @@ class ConfigManager:
|
|
|
168
201
|
param_value = Color.from_list(param_value)
|
|
169
202
|
if isinstance(param.value, Color) and isinstance(param_value, str):
|
|
170
203
|
param_value = Color.from_hex(param_value)
|
|
204
|
+
if isinstance(param.value, Vector) and isinstance(param_value, list):
|
|
205
|
+
param_value = Vector.from_list(param_value)
|
|
206
|
+
if isinstance(param.value, Vector) and isinstance(param_value, str):
|
|
207
|
+
param_value = Vector.from_str(param_value)
|
|
171
208
|
elif isinstance(param.value, Path):
|
|
172
209
|
param_value = Path(param_value)
|
|
173
210
|
elif isinstance(param.value, datetime):
|
|
@@ -202,6 +239,8 @@ class ConfigManager:
|
|
|
202
239
|
val = getattr(category, param.name).value
|
|
203
240
|
if isinstance(val, Color):
|
|
204
241
|
val = val.to_hex()
|
|
242
|
+
elif isinstance(val, Vector):
|
|
243
|
+
val = str(val.to_str())
|
|
205
244
|
elif isinstance(val, Path):
|
|
206
245
|
val = str(val.as_posix())
|
|
207
246
|
elif isinstance(val, datetime):
|
|
@@ -242,9 +281,11 @@ class ConfigManager:
|
|
|
242
281
|
indent = " " * (len(line) - len(stripped))
|
|
243
282
|
comment = (
|
|
244
283
|
f"{indent}# {param.help} | "
|
|
245
|
-
f"type={param.type_.__name__}
|
|
284
|
+
f"type={param.type_.__name__}"
|
|
246
285
|
f"{' [CLI]' if param.is_cli else ''}"
|
|
247
286
|
)
|
|
287
|
+
if param.choices:
|
|
288
|
+
comment = comment + f" | choices={param.choices}"
|
|
248
289
|
new_lines.append(comment)
|
|
249
290
|
|
|
250
291
|
new_lines.append(line)
|
|
@@ -7,7 +7,7 @@ from datetime import datetime
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from tkinter import colorchooser, filedialog, messagebox, ttk
|
|
9
9
|
|
|
10
|
-
from config_cli_gui.config import Color, ConfigCategory, ConfigManager, ConfigParameter
|
|
10
|
+
from config_cli_gui.config import Color, ConfigCategory, ConfigManager, ConfigParameter, Vector
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class ToolTip:
|
|
@@ -315,6 +315,10 @@ class GenericSettingsDialog:
|
|
|
315
315
|
elif isinstance(param.value, Color):
|
|
316
316
|
return self._create_color_widget(parent, param)
|
|
317
317
|
|
|
318
|
+
# Vector type - Vector editor
|
|
319
|
+
elif isinstance(param.value, Vector):
|
|
320
|
+
return self._create_vector_widget(parent, param)
|
|
321
|
+
|
|
318
322
|
# DateTime type - DateTime picker
|
|
319
323
|
elif isinstance(param.value, datetime):
|
|
320
324
|
return self._create_datetime_widget(parent, param)
|
|
@@ -368,14 +372,19 @@ class GenericSettingsDialog:
|
|
|
368
372
|
entry.pack(side=tk.LEFT, fill=tk.X, expand=True)
|
|
369
373
|
|
|
370
374
|
def browse_file():
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
+
path = filedialog.askopenfilename(initialdir=str(param.value.parent))
|
|
376
|
+
if path:
|
|
377
|
+
var.set(path)
|
|
378
|
+
|
|
379
|
+
def browse_dir():
|
|
380
|
+
path = filedialog.askdirectory(initialdir=str(param.value.parent))
|
|
375
381
|
if path:
|
|
376
382
|
var.set(path)
|
|
377
383
|
|
|
378
|
-
browse_btn = ttk.Button(frame, text="
|
|
384
|
+
browse_btn = ttk.Button(frame, text="File", command=browse_file)
|
|
385
|
+
browse_btn.pack(side=tk.RIGHT, padx=(5, 0))
|
|
386
|
+
|
|
387
|
+
browse_btn = ttk.Button(frame, text="Directory", command=browse_dir)
|
|
379
388
|
browse_btn.pack(side=tk.RIGHT, padx=(5, 0))
|
|
380
389
|
|
|
381
390
|
frame.var = var
|
|
@@ -416,6 +425,19 @@ class GenericSettingsDialog:
|
|
|
416
425
|
frame.entry_widget = entry
|
|
417
426
|
return frame
|
|
418
427
|
|
|
428
|
+
def _create_vector_widget(self, parent, param: ConfigParameter):
|
|
429
|
+
"""Create vector editor widget."""
|
|
430
|
+
frame = ttk.Frame(parent)
|
|
431
|
+
|
|
432
|
+
vector_value = param.value if isinstance(param.value, Vector) else Vector()
|
|
433
|
+
var = tk.StringVar(value=vector_value.to_str().strip("()[]"))
|
|
434
|
+
entry = ttk.Entry(frame, textvariable=var)
|
|
435
|
+
entry.pack(side=tk.LEFT, fill=tk.X, expand=True)
|
|
436
|
+
|
|
437
|
+
frame.var = var
|
|
438
|
+
frame.entry_widget = entry
|
|
439
|
+
return frame
|
|
440
|
+
|
|
419
441
|
def _create_datetime_widget(self, parent, param: ConfigParameter):
|
|
420
442
|
"""Create datetime picker widget."""
|
|
421
443
|
frame = ttk.Frame(parent)
|
|
@@ -512,6 +534,8 @@ class GenericSettingsDialog:
|
|
|
512
534
|
import json
|
|
513
535
|
|
|
514
536
|
overrides[key] = json.loads(value)
|
|
537
|
+
elif type(param_value) == Vector:
|
|
538
|
+
overrides[key] = Vector.from_str(value)
|
|
515
539
|
elif type(param_value) == int:
|
|
516
540
|
overrides[key] = int(value)
|
|
517
541
|
elif type(param_value) == float:
|
{config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/tests/example_project/config/config_example.py
RENAMED
|
@@ -13,6 +13,7 @@ from config_cli_gui.config import (
|
|
|
13
13
|
ConfigCategory,
|
|
14
14
|
ConfigManager,
|
|
15
15
|
ConfigParameter,
|
|
16
|
+
Vector,
|
|
16
17
|
)
|
|
17
18
|
from config_cli_gui.docs import DocumentationGenerator
|
|
18
19
|
|
|
@@ -162,6 +163,18 @@ class GuiConfig(ConfigCategory):
|
|
|
162
163
|
help="Maximum number of log lines to keep in GUI",
|
|
163
164
|
)
|
|
164
165
|
|
|
166
|
+
point2D: ConfigParameter = ConfigParameter(
|
|
167
|
+
name="point2D",
|
|
168
|
+
value=Vector(7, 11),
|
|
169
|
+
help="Point in 2D space",
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
point3D: ConfigParameter = ConfigParameter(
|
|
173
|
+
name="point3D",
|
|
174
|
+
value=Vector(1.2, 3.4, 5.6),
|
|
175
|
+
help="Point in 3D space",
|
|
176
|
+
)
|
|
177
|
+
|
|
165
178
|
|
|
166
179
|
class MiscConfig(ConfigCategory):
|
|
167
180
|
def get_category_name(self) -> str:
|
|
@@ -10,6 +10,7 @@ from config_cli_gui.config import (
|
|
|
10
10
|
ConfigCategory,
|
|
11
11
|
ConfigManager,
|
|
12
12
|
ConfigParameter,
|
|
13
|
+
Vector,
|
|
13
14
|
)
|
|
14
15
|
|
|
15
16
|
|
|
@@ -38,6 +39,18 @@ def test_color_basic():
|
|
|
38
39
|
assert str(c) == "#0033ff"
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
def test_vector_2d():
|
|
43
|
+
v = Vector(1, 2)
|
|
44
|
+
assert v.to_list() == [1, 2]
|
|
45
|
+
assert str(v) == "(1, 2)"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_vector_3d():
|
|
49
|
+
v = Vector.from_str("1.2, 2.3, 3.4")
|
|
50
|
+
assert v.to_list() == [1.2, 2.3, 3.4]
|
|
51
|
+
assert str(v) == "(1.2, 2.3, 3.4)"
|
|
52
|
+
|
|
53
|
+
|
|
41
54
|
def test_color_clamping():
|
|
42
55
|
c = Color(-5, 260, 500)
|
|
43
56
|
assert c.to_list() == [0, 255, 255]
|
config_cli_gui-0.2.4/config.yaml
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
app:
|
|
2
|
-
# Date format to use | type=str, default=%Y-%m-%d
|
|
3
|
-
date_format: '%Y-%m-%d'
|
|
4
|
-
# Enable logging to console | type=bool, default=True
|
|
5
|
-
enable_console_logging: true
|
|
6
|
-
# Enable logging to file | type=bool, default=True
|
|
7
|
-
enable_file_logging: true
|
|
8
|
-
# Number of backup log files to keep | type=int, default=5
|
|
9
|
-
log_backup_count: 5
|
|
10
|
-
# Maximum log file size in MB before rotation | type=int, default=10
|
|
11
|
-
log_file_max_size: 10
|
|
12
|
-
# Log message format style | type=str, default=detailed
|
|
13
|
-
log_format: detailed
|
|
14
|
-
# Logging level for the application | type=str, default=INFO
|
|
15
|
-
log_level: INFO
|
|
16
|
-
# Maximum number of worker threads | type=int, default=4
|
|
17
|
-
max_workers: 4
|
|
18
|
-
cli:
|
|
19
|
-
# Include elevation data in waypoints | type=bool, default=False [CLI]
|
|
20
|
-
elevation: false
|
|
21
|
-
# Extract starting points of each track as waypoint | type=bool, default=True [CLI]
|
|
22
|
-
extract_waypoints: true
|
|
23
|
-
# Path to input (file or folder) | type=str, default= [CLI]
|
|
24
|
-
input: ''
|
|
25
|
-
# Maximum distance between two waypoints | type=int, default=20 [CLI]
|
|
26
|
-
min_dist: 20
|
|
27
|
-
# Path to output destination | type=str, default= [CLI]
|
|
28
|
-
output: ''
|
|
29
|
-
gui:
|
|
30
|
-
# Automatically scroll to the newest log entries | type=bool, default=True
|
|
31
|
-
auto_scroll_log: true
|
|
32
|
-
# Height of the log window in pixels | type=int, default=200
|
|
33
|
-
log_window_height: 200
|
|
34
|
-
# Maximum number of log lines to keep in GUI | type=int, default=1000
|
|
35
|
-
max_log_lines: 1000
|
|
36
|
-
# GUI theme setting | type=str, default=light
|
|
37
|
-
theme: light
|
|
38
|
-
# Default window height | type=int, default=600
|
|
39
|
-
window_height: 600
|
|
40
|
-
# Default window width | type=int, default=800
|
|
41
|
-
window_width: 800
|
|
42
|
-
misc:
|
|
43
|
-
# Color setting for the application | type=Color, default=#ff0000
|
|
44
|
-
some_color: '#ff0000'
|
|
45
|
-
# Date setting for the application | type=datetime, default=2025-12-31 10:30:45
|
|
46
|
-
some_date: '2025-12-31T10:30:45'
|
|
47
|
-
# Path to the file to use | type=PosixPath, default=some_file.txt
|
|
48
|
-
some_file: some_file.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.idea/runConfigurations/example_project_cli.xml
RENAMED
|
File without changes
|
{config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/.idea/runConfigurations/example_project_gui.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{config_cli_gui-0.2.4 → config_cli_gui-0.2.6}/src/config_cli_gui.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|