config-cli-gui 0.2.5__tar.gz → 0.2.7__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.5 → config_cli_gui-0.2.7}/HISTORY.md +12 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/PKG-INFO +1 -1
- config_cli_gui-0.2.7/config.yaml +52 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/usage/config.md +10 -8
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/_version.py +3 -3
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/config.py +42 -1
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/gui.py +23 -1
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/PKG-INFO +1 -1
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/config/config_example.py +13 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/test_config_manager.py +13 -0
- config_cli_gui-0.2.5/config.yaml +0 -48
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/FUNDING.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/actions/setup-environment/action.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/dependabot.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/init.sh +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/release_message.sh +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/update_funding.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/workflows/main.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/workflows/release.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.github/workflows/update_readme.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.gitignore +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.idea/runConfigurations/config_generate.xml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.idea/runConfigurations/example_project_cli.xml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.idea/runConfigurations/example_project_gui.xml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.pre-commit-config.yaml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.readthedocs.yaml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/LICENSE +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/Makefile +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/README.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/.nav.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/_static/img/favicon.png +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/_static/img/logo.png +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/css/custom.css +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/develop/contributing.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/develop/make_windows.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/develop/naming_convention.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/funding/funding.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/getting-started/install.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/getting-started/virtual-environment.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/index.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/docs/usage/cli.md +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/mkdocs.yml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/pyproject.toml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/scripts/show_filelist.ps1 +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/scripts/show_tree.ps1 +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/scripts/show_tree.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/scripts/update_readme.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/setup.cfg +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/cli.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui/docs.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/SOURCES.txt +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/dependency_links.txt +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/entry_points.txt +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/requires.txt +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/src/config_cli_gui.egg-info/top_level.txt +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/template.yml.url +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/__main__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/cli/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/cli/__main__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/cli/cli_example.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/config/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/core/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/core/base.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/core/logging.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/example.gpx +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/gui/__init__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/gui/__main__.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/gui/config.yaml +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/example_project/gui/gui_example.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/test_cli.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/test_docs.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/tests/test_generic_cli.py +0 -0
- {config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/uv.lock +0 -0
|
@@ -4,6 +4,18 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
(unreleased)
|
|
6
6
|
------------
|
|
7
|
+
- Also show required params in gui. [Paul Magister]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
0.2.6 (2025-11-28)
|
|
11
|
+
------------------
|
|
12
|
+
- Docs: Update HISTORY.md for release 0.2.6. [Paul Magister]
|
|
13
|
+
- Vector: Add property for 2d and 3d vectors. [Paul Magister]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
0.2.5 (2025-11-19)
|
|
17
|
+
------------------
|
|
18
|
+
- Docs: Update HISTORY.md for release 0.2.5. [Paul Magister]
|
|
7
19
|
- Path widget: file or dir buttons. [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.7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 7)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g56f4529b2'
|
|
@@ -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:
|
|
@@ -271,9 +271,12 @@ class GenericSettingsDialog:
|
|
|
271
271
|
|
|
272
272
|
for param in parameters:
|
|
273
273
|
param.value = getattr(category, param.name).value
|
|
274
|
+
|
|
275
|
+
"""
|
|
274
276
|
if param.required:
|
|
275
277
|
# Skip required parameters as they are not configurable in GUI
|
|
276
278
|
continue
|
|
279
|
+
"""
|
|
277
280
|
|
|
278
281
|
# Create label
|
|
279
282
|
label = ttk.Label(parent, text=f"{param.name}:")
|
|
@@ -315,6 +318,10 @@ class GenericSettingsDialog:
|
|
|
315
318
|
elif isinstance(param.value, Color):
|
|
316
319
|
return self._create_color_widget(parent, param)
|
|
317
320
|
|
|
321
|
+
# Vector type - Vector editor
|
|
322
|
+
elif isinstance(param.value, Vector):
|
|
323
|
+
return self._create_vector_widget(parent, param)
|
|
324
|
+
|
|
318
325
|
# DateTime type - DateTime picker
|
|
319
326
|
elif isinstance(param.value, datetime):
|
|
320
327
|
return self._create_datetime_widget(parent, param)
|
|
@@ -421,6 +428,19 @@ class GenericSettingsDialog:
|
|
|
421
428
|
frame.entry_widget = entry
|
|
422
429
|
return frame
|
|
423
430
|
|
|
431
|
+
def _create_vector_widget(self, parent, param: ConfigParameter):
|
|
432
|
+
"""Create vector editor widget."""
|
|
433
|
+
frame = ttk.Frame(parent)
|
|
434
|
+
|
|
435
|
+
vector_value = param.value if isinstance(param.value, Vector) else Vector()
|
|
436
|
+
var = tk.StringVar(value=vector_value.to_str().strip("()[]"))
|
|
437
|
+
entry = ttk.Entry(frame, textvariable=var)
|
|
438
|
+
entry.pack(side=tk.LEFT, fill=tk.X, expand=True)
|
|
439
|
+
|
|
440
|
+
frame.var = var
|
|
441
|
+
frame.entry_widget = entry
|
|
442
|
+
return frame
|
|
443
|
+
|
|
424
444
|
def _create_datetime_widget(self, parent, param: ConfigParameter):
|
|
425
445
|
"""Create datetime picker widget."""
|
|
426
446
|
frame = ttk.Frame(parent)
|
|
@@ -517,6 +537,8 @@ class GenericSettingsDialog:
|
|
|
517
537
|
import json
|
|
518
538
|
|
|
519
539
|
overrides[key] = json.loads(value)
|
|
540
|
+
elif type(param_value) == Vector:
|
|
541
|
+
overrides[key] = Vector.from_str(value)
|
|
520
542
|
elif type(param_value) == int:
|
|
521
543
|
overrides[key] = int(value)
|
|
522
544
|
elif type(param_value) == float:
|
{config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/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.5/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.5 → config_cli_gui-0.2.7}/.idea/runConfigurations/example_project_cli.xml
RENAMED
|
File without changes
|
{config_cli_gui-0.2.5 → config_cli_gui-0.2.7}/.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.5 → config_cli_gui-0.2.7}/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
|