machineconfig 5.16__py3-none-any.whl → 5.17__py3-none-any.whl
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.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/__init__.py +0 -28
- machineconfig/scripts/python/devops.py +2 -2
- machineconfig/scripts/python/interactive.py +2 -2
- machineconfig/utils/installer.py +20 -0
- {machineconfig-5.16.dist-info → machineconfig-5.17.dist-info}/METADATA +1 -1
- {machineconfig-5.16.dist-info → machineconfig-5.17.dist-info}/RECORD +9 -9
- {machineconfig-5.16.dist-info → machineconfig-5.17.dist-info}/WHEEL +0 -0
- {machineconfig-5.16.dist-info → machineconfig-5.17.dist-info}/entry_points.txt +0 -0
- {machineconfig-5.16.dist-info → machineconfig-5.17.dist-info}/top_level.txt +0 -0
machineconfig/__init__.py
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
1
|
|
|
3
|
-
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
import tomllib
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def _get_version() -> str:
|
|
9
|
-
name: str = "machineconfig"
|
|
10
|
-
try:
|
|
11
|
-
return _pkg_version(name)
|
|
12
|
-
except PackageNotFoundError:
|
|
13
|
-
pass
|
|
14
|
-
|
|
15
|
-
root: Path = Path(__file__).resolve().parents[2]
|
|
16
|
-
pyproject: Path = root / "pyproject.toml"
|
|
17
|
-
if pyproject.is_file():
|
|
18
|
-
with pyproject.open("rb") as f:
|
|
19
|
-
data: dict[str, object] = tomllib.load(f)
|
|
20
|
-
project = data.get("project")
|
|
21
|
-
if isinstance(project, dict):
|
|
22
|
-
version = project.get("version")
|
|
23
|
-
if isinstance(version, str) and version:
|
|
24
|
-
return version
|
|
25
|
-
return "0.0.0"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
__version__: str = _get_version()
|
|
29
|
-
__all__: list[str] = ["__version__"]
|
|
@@ -4,11 +4,11 @@ import machineconfig.utils.installer_utils.installer as installer_entry_point
|
|
|
4
4
|
import machineconfig.scripts.python.share_terminal as share_terminal
|
|
5
5
|
import machineconfig.scripts.python.repos as repos
|
|
6
6
|
|
|
7
|
-
from machineconfig import
|
|
7
|
+
from machineconfig.utils.installer import get_machineconfig_version
|
|
8
8
|
import typer
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
app = typer.Typer(help=f"🛠️ DevOps operations @ machineconfig {
|
|
11
|
+
app = typer.Typer(help=f"🛠️ DevOps operations @ machineconfig {get_machineconfig_version()}", no_args_is_help=True)
|
|
12
12
|
app.command(name="install", help="📦 Install essential packages")(installer_entry_point.main)
|
|
13
13
|
app.command(name="share-terminal", help="📡 Share terminal via web browser")(share_terminal.main)
|
|
14
14
|
app.add_typer(repos.app, name="repos", help="📁 Manage git repositories")
|
|
@@ -34,7 +34,8 @@ console = Console()
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def display_header() -> None:
|
|
37
|
-
|
|
37
|
+
from machineconfig.utils.installer import get_machineconfig_version
|
|
38
|
+
header_text = Text(f"MACHINE CONFIGURATION {get_machineconfig_version()}", style="bold magenta")
|
|
38
39
|
subtitle_text = Text("Interactive Installation Script", style="italic cyan")
|
|
39
40
|
console.print(Panel(f"📦 {header_text}\n{subtitle_text}", border_style="blue", padding=(1, 2)))
|
|
40
41
|
def display_completion_message() -> None:
|
|
@@ -188,7 +189,6 @@ Set-Service -Name sshd -StartupType 'Automatic'"""
|
|
|
188
189
|
|
|
189
190
|
|
|
190
191
|
def main() -> None:
|
|
191
|
-
"""Main function to run the interactive installation."""
|
|
192
192
|
display_header()
|
|
193
193
|
selected_options = get_installation_choices()
|
|
194
194
|
if not selected_options:
|
machineconfig/utils/installer.py
CHANGED
|
@@ -219,3 +219,23 @@ def install_bulk(installers_data: list[InstallerData], safe: bool = False, jobs:
|
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
|
|
222
|
+
def get_machineconfig_version() -> str:
|
|
223
|
+
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
224
|
+
from pathlib import Path
|
|
225
|
+
import tomllib
|
|
226
|
+
name: str = "machineconfig"
|
|
227
|
+
try:
|
|
228
|
+
return _pkg_version(name)
|
|
229
|
+
except PackageNotFoundError:
|
|
230
|
+
pass
|
|
231
|
+
root: Path = Path(__file__).resolve().parents[2]
|
|
232
|
+
pyproject: Path = root / "pyproject.toml"
|
|
233
|
+
if pyproject.is_file():
|
|
234
|
+
with pyproject.open("rb") as f:
|
|
235
|
+
data: dict[str, object] = tomllib.load(f)
|
|
236
|
+
project = data.get("project")
|
|
237
|
+
if isinstance(project, dict):
|
|
238
|
+
version = project.get("version")
|
|
239
|
+
if isinstance(version, str) and version:
|
|
240
|
+
return version
|
|
241
|
+
return "0.0.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
machineconfig/__init__.py,sha256=
|
|
1
|
+
machineconfig/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2
2
|
machineconfig/logger.py,sha256=XLckvZ8cPDpC5v75ESP3YNTputIrDYuvoYisj0YZtGw,1415
|
|
3
3
|
machineconfig/cluster/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
machineconfig/cluster/remote/cloud_manager.py,sha256=8f5mIkAnXNjhVswlv49bEgAGLJIv_e_tNbI_wgPBo0Q,26041
|
|
@@ -145,7 +145,7 @@ machineconfig/scripts/python/cloud_sync.py,sha256=RWGpAfJ9fnN18yNBSgN44dzA38Hmd4
|
|
|
145
145
|
machineconfig/scripts/python/count_lines.py,sha256=ZexMRsV70pe9fhLbGuens9EP5gCf078EwTDRHRZo5A0,15960
|
|
146
146
|
machineconfig/scripts/python/count_lines_frontend.py,sha256=bIha5lKjWxKiO1OJAbt9gKzVyECXFbWKWIy69bdyaJg,533
|
|
147
147
|
machineconfig/scripts/python/croshell.py,sha256=zHUhOqWG81AOTeawZoDkpURnV1fAisY2lyZ0apvlmVY,6547
|
|
148
|
-
machineconfig/scripts/python/devops.py,sha256=
|
|
148
|
+
machineconfig/scripts/python/devops.py,sha256=mt-WQ51Imwjt1K1WhjwpiJRryV5DEgv_JIwi_YHTT1A,3532
|
|
149
149
|
machineconfig/scripts/python/devops_add_identity.py,sha256=wvjNgqsLmqD2SxbNCW_usqfp0LI-TDvcJJKGOWt2oFw,3775
|
|
150
150
|
machineconfig/scripts/python/devops_add_ssh_key.py,sha256=BXB-9RvuSZO0YTbnM2azeABW2ngLW4SKhhAGAieMzfw,6873
|
|
151
151
|
machineconfig/scripts/python/devops_backup_retrieve.py,sha256=JLJHmi8JmZ_qVTeMW-qBEAYGt1fmfWXzZ7Gm-Q-GDcU,5585
|
|
@@ -162,7 +162,7 @@ machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_
|
|
|
162
162
|
machineconfig/scripts/python/ftpx.py,sha256=QfQTp-6jQP6yxfbLc5sKxiMtTgAgc8sjN7d17_uLiZc,9400
|
|
163
163
|
machineconfig/scripts/python/get_zellij_cmd.py,sha256=e35-18hoXM9N3PFbvbizfkNY_-63iMicieWE3TbGcCQ,576
|
|
164
164
|
machineconfig/scripts/python/gh_models.py,sha256=3BLfW25mBRiPO5VKtVm-nMlKLv-PaZDw7mObajq6F6M,5538
|
|
165
|
-
machineconfig/scripts/python/interactive.py,sha256=
|
|
165
|
+
machineconfig/scripts/python/interactive.py,sha256=BZ8Ly7fffSDaPZd1Bw0zzwT-JOVKGd0jYzhdPuEewB0,11230
|
|
166
166
|
machineconfig/scripts/python/mount_nfs.py,sha256=aECrL64j9g-9rF49sVJAjGmzaoGgcMnl3g9v17kQF4c,3239
|
|
167
167
|
machineconfig/scripts/python/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkuliVpPV5_uBTVVhXtjQ,1550
|
|
168
168
|
machineconfig/scripts/python/mount_ssh.py,sha256=k2fKq3f5dKq_7anrFOlqvJoI_3U4EWNHLRZ1o3Lsy6M,2268
|
|
@@ -396,7 +396,7 @@ machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6
|
|
|
396
396
|
machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
397
397
|
machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VBtzgQs,4340
|
|
398
398
|
machineconfig/utils/code.py,sha256=Q44GVBgI5wEphGAKsMmXE2wEtzjJngy5pfJV9NCJ8EA,5652
|
|
399
|
-
machineconfig/utils/installer.py,sha256=
|
|
399
|
+
machineconfig/utils/installer.py,sha256=dza-ElJ3I3yu-LBST1EBjj9VDFF4zmTZZsG19948WTk,10680
|
|
400
400
|
machineconfig/utils/io.py,sha256=ZXB3aataS1IZ_0WMcCRSmoN1nbkvEO-bWYcs-TpngqU,2872
|
|
401
401
|
machineconfig/utils/links.py,sha256=S0XICdbcFESUqm5RINDrOf3O8G1b7QEADncXXcC8IQc,15520
|
|
402
402
|
machineconfig/utils/notifications.py,sha256=vvdsY5IX6XEiILTnt5lNyHxhCi0ljdGX2T_67VRfrG4,9009
|
|
@@ -427,8 +427,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=pTxvLzIpD5RF
|
|
|
427
427
|
machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoSpdmTIdgS9LS-RvE-QZ-D260tD3o,1214
|
|
428
428
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
429
429
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
430
|
-
machineconfig-5.
|
|
431
|
-
machineconfig-5.
|
|
432
|
-
machineconfig-5.
|
|
433
|
-
machineconfig-5.
|
|
434
|
-
machineconfig-5.
|
|
430
|
+
machineconfig-5.17.dist-info/METADATA,sha256=OXk15eigcogzpcDysJF-s-8tdstpLaN3d16MWQm2OOw,8030
|
|
431
|
+
machineconfig-5.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
432
|
+
machineconfig-5.17.dist-info/entry_points.txt,sha256=2afE1mw-o4MUlfxyX73SV02XaQI4SV_LdL2r6_CzhPU,1074
|
|
433
|
+
machineconfig-5.17.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
434
|
+
machineconfig-5.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|