cgse-common 2024.1.4__tar.gz → 2025.0.1__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.
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/PKG-INFO +1 -1
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/pyproject.toml +1 -1
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/env.py +34 -8
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/version.py +2 -2
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/.gitignore +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/README.md +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/bits.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/calibration.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/command.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/config.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/control.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/decorators.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/device.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/exceptions.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/hk.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/metrics.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/mixin.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/monitoring.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/observer.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/obsid.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/persistence.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/plugin.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/process.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/protocol.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/proxy.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/reload.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/resource.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/response.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/services.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/services.yaml +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/settings.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/settings.yaml +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/setup.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/state.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/system.py +0 -0
- {cgse_common-2024.1.4 → cgse_common-2025.0.1}/src/egse/zmq_ser.py +0 -0
|
@@ -448,6 +448,12 @@ def main(args: list | None = None): # pragma: no cover
|
|
|
448
448
|
action="store_true",
|
|
449
449
|
help="Print help on the environment variables and paths.",
|
|
450
450
|
)
|
|
451
|
+
parser.add_argument(
|
|
452
|
+
"--mkdir",
|
|
453
|
+
default=False,
|
|
454
|
+
action="store_true",
|
|
455
|
+
help="Create directory that doesn't exist.",
|
|
456
|
+
)
|
|
451
457
|
|
|
452
458
|
args = parser.parse_args(args or [])
|
|
453
459
|
|
|
@@ -497,34 +503,54 @@ def main(args: list | None = None): # pragma: no cover
|
|
|
497
503
|
with all_logging_disabled():
|
|
498
504
|
warnings.filterwarnings("ignore", category=UserWarning)
|
|
499
505
|
try:
|
|
500
|
-
rich.print(f" {get_data_storage_location() = }", flush=True)
|
|
506
|
+
rich.print(f" {get_data_storage_location() = }", flush=True, end="")
|
|
501
507
|
location = get_data_storage_location()
|
|
502
508
|
if not Path(location).exists():
|
|
503
|
-
|
|
509
|
+
if args.mkdir:
|
|
510
|
+
rich.print(f" [green]⟶ Creating data storage location: {location}[/]")
|
|
511
|
+
Path(location).mkdir(parents=True)
|
|
512
|
+
else:
|
|
513
|
+
rich.print(" [red]⟶ ERROR: The data storage location doesn't exist![/]")
|
|
514
|
+
else:
|
|
515
|
+
rich.print()
|
|
504
516
|
except ValueError as exc:
|
|
505
517
|
rich.print(f" get_data_storage_location() = [red]{exc}[/]")
|
|
506
518
|
|
|
507
519
|
try:
|
|
508
|
-
rich.print(f" {get_conf_data_location() = }", flush=True)
|
|
520
|
+
rich.print(f" {get_conf_data_location() = }", flush=True, end="")
|
|
509
521
|
location = get_conf_data_location()
|
|
510
522
|
if not Path(location).exists():
|
|
511
|
-
|
|
523
|
+
if args.mkdir:
|
|
524
|
+
rich.print(f" [green]⟶ Creating configuration data location: {location}[/]")
|
|
525
|
+
Path(location).mkdir(parents=True)
|
|
526
|
+
else:
|
|
527
|
+
rich.print(" [red]⟶ ERROR: The configuration data location doesn't exist![/]")
|
|
528
|
+
else:
|
|
529
|
+
rich.print()
|
|
512
530
|
except ValueError as exc:
|
|
513
531
|
rich.print(f" get_conf_data_location() = [red]{exc}[/]")
|
|
514
532
|
|
|
515
533
|
try:
|
|
516
|
-
rich.print(f" {get_log_file_location() = }", flush=True)
|
|
534
|
+
rich.print(f" {get_log_file_location() = }", flush=True, end="")
|
|
517
535
|
location = get_log_file_location()
|
|
518
536
|
if not Path(location).exists():
|
|
519
|
-
|
|
537
|
+
if args.mkdir:
|
|
538
|
+
rich.print(f" [green]⟶ Creating log files location: {location}[/]")
|
|
539
|
+
Path(location).mkdir(parents=True)
|
|
540
|
+
else:
|
|
541
|
+
rich.print(" [red]⟶ ERROR: The log files location doesn't exist![/]")
|
|
542
|
+
else:
|
|
543
|
+
rich.print()
|
|
520
544
|
except ValueError as exc:
|
|
521
545
|
rich.print(f" get_log_file_location() = [red]{exc}[/]")
|
|
522
546
|
|
|
523
547
|
try:
|
|
524
|
-
rich.print(f" {get_local_settings() = }", flush=True)
|
|
548
|
+
rich.print(f" {get_local_settings() = }", flush=True, end="")
|
|
525
549
|
location = get_local_settings()
|
|
526
550
|
if location is None or not Path(location).exists():
|
|
527
|
-
rich.print("[red]ERROR: The local settings file doesn't exist![/]")
|
|
551
|
+
rich.print(" [red]⟶ ERROR: The local settings file is not defined or doesn't exist![/]")
|
|
552
|
+
else:
|
|
553
|
+
rich.print()
|
|
528
554
|
except ValueError as exc:
|
|
529
555
|
rich.print(f" get_local_settings() = [red]{exc}[/]")
|
|
530
556
|
|
|
@@ -154,7 +154,8 @@ def get_version_installed(package_name: str) -> str:
|
|
|
154
154
|
return version
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
VERSION = get_version_from_settings_file_raw("Common-EGSE", location=HERE)
|
|
157
|
+
# VERSION = get_version_from_settings_file_raw("Common-EGSE", location=HERE)
|
|
158
|
+
VERSION = get_version_installed('cgse')
|
|
158
159
|
|
|
159
160
|
# The __PYPI_VERSION__ is the version number that will be used for the installation.
|
|
160
161
|
# The version will appear in PyPI and also as the `installed version`.
|
|
@@ -164,7 +165,6 @@ __PYPI_VERSION__ = VERSION.split('+')[0]
|
|
|
164
165
|
|
|
165
166
|
if __name__ == "__main__":
|
|
166
167
|
import rich
|
|
167
|
-
from egse.system import get_module_location
|
|
168
168
|
from egse.plugin import entry_points
|
|
169
169
|
|
|
170
170
|
if VERSION:
|
|
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
|
|
File without changes
|
|
File without changes
|