machineconfig 5.82__py3-none-any.whl → 5.84__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/scripts/python/croshell.py +1 -1
- machineconfig/scripts/python/devops_helpers/cli_config.py +1 -1
- machineconfig/scripts/python/devops_helpers/cli_self.py +3 -3
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +2 -2
- machineconfig/scripts/python/interactive.py +2 -2
- machineconfig/scripts/python/nw/mount_nfs +1 -1
- machineconfig/scripts/python/repos_helpers/count_lines_frontend.py +1 -1
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
- machineconfig/setup_linux/web_shortcuts/interactive.sh +7 -7
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +7 -7
- machineconfig/utils/ssh.py +30 -13
- machineconfig/utils/tst.py +20 -0
- {machineconfig-5.82.dist-info → machineconfig-5.84.dist-info}/METADATA +1 -1
- {machineconfig-5.82.dist-info → machineconfig-5.84.dist-info}/RECORD +17 -16
- {machineconfig-5.82.dist-info → machineconfig-5.84.dist-info}/WHEEL +0 -0
- {machineconfig-5.82.dist-info → machineconfig-5.84.dist-info}/entry_points.txt +0 -0
- {machineconfig-5.82.dist-info → machineconfig-5.84.dist-info}/top_level.txt +0 -0
|
@@ -149,7 +149,7 @@ from pathlib import Path
|
|
|
149
149
|
else:
|
|
150
150
|
console.print(Panel("❌ Could not determine the local machineconfig repo root. Please ensure the `REPO_ROOT` in `source_of_truth.py` is correctly set to the local path of the machineconfig repo, or do not use the `--local` flag.", title="Error", border_style="red"))
|
|
151
151
|
return
|
|
152
|
-
else: ve_line = """--with "machineconfig[plot]>=5.
|
|
152
|
+
else: ve_line = """--with "machineconfig[plot]>=5.84" """
|
|
153
153
|
fire_line = f"uv run --python 3.14 {ve_line} {interpreter} {interactivity} {profile} {str(pyfile)}"
|
|
154
154
|
|
|
155
155
|
from machineconfig.utils.code import run_shell_script
|
|
@@ -42,7 +42,7 @@ def path():
|
|
|
42
42
|
from pathlib import Path
|
|
43
43
|
path = Path(navigator.__file__).resolve().parent.joinpath("path_manager_tui.py")
|
|
44
44
|
from machineconfig.utils.code import run_shell_script
|
|
45
|
-
run_shell_script(f"""uv run --with "machineconfig>=5.
|
|
45
|
+
run_shell_script(f"""uv run --with "machineconfig>=5.84,textual" {path}""")
|
|
46
46
|
|
|
47
47
|
def pwsh_theme():
|
|
48
48
|
"""🔗 Select powershell prompt theme."""
|
|
@@ -30,9 +30,9 @@ def install():
|
|
|
30
30
|
# main_public_from_parser()
|
|
31
31
|
import platform
|
|
32
32
|
if platform.system() == "Windows":
|
|
33
|
-
run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.
|
|
33
|
+
run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.84""")
|
|
34
34
|
else:
|
|
35
|
-
run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.
|
|
35
|
+
run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.84""")
|
|
36
36
|
|
|
37
37
|
def navigate():
|
|
38
38
|
"""📚 NAVIGATE command structure with TUI"""
|
|
@@ -40,7 +40,7 @@ def navigate():
|
|
|
40
40
|
from pathlib import Path
|
|
41
41
|
path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
|
|
42
42
|
from machineconfig.utils.code import run_shell_script
|
|
43
|
-
run_shell_script(f"""uv run --with "machineconfig>=5.
|
|
43
|
+
run_shell_script(f"""uv run --with "machineconfig>=5.84,textual" {path}""")
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
def run_python(ip: str = typer.Argument(..., help="Python command to run in the machineconfig environment"),
|
|
@@ -101,7 +101,7 @@ git pull originEnc master
|
|
|
101
101
|
return "done"
|
|
102
102
|
from machineconfig.utils.meta import function_to_script
|
|
103
103
|
program_1_py = function_to_script(func=func2, call_with_args=None, call_with_kwargs={"remote_repo": str(repo_remote_root), "local_repo": str(repo_local_root), "cloud": cloud_resolved})
|
|
104
|
-
shell_file_1 = get_shell_file_executing_python_script(python_script=program_1_py, ve_path=None, executable="""uv run --with "machineconfig>=5.
|
|
104
|
+
shell_file_1 = get_shell_file_executing_python_script(python_script=program_1_py, ve_path=None, executable="""uv run --with "machineconfig>=5.84" """)
|
|
105
105
|
# ================================================================================
|
|
106
106
|
option2 = "Delete local repo and replace it with remote copy:"
|
|
107
107
|
program_2 = f"""
|
|
@@ -122,7 +122,7 @@ sudo chmod +x $HOME/dotfiles/scripts/linux -R
|
|
|
122
122
|
inspect_repos(repo_local_root=repo_local_root, repo_remote_root=repo_remote_root)
|
|
123
123
|
return "done"
|
|
124
124
|
program_3_py = function_to_script(func=func, call_with_args=None, call_with_kwargs={"repo_local_root": str(repo_local_root), "repo_remote_root": str(repo_remote_root)})
|
|
125
|
-
shell_file_3 = get_shell_file_executing_python_script(python_script=program_3_py, ve_path=None, executable="""uv run --with "machineconfig>=5.
|
|
125
|
+
shell_file_3 = get_shell_file_executing_python_script(python_script=program_3_py, ve_path=None, executable="""uv run --with "machineconfig>=5.84" """)
|
|
126
126
|
# ================================================================================
|
|
127
127
|
|
|
128
128
|
option4 = "Remove problematic rclone file from repo and replace with remote:"
|
|
@@ -130,9 +130,9 @@ def execute_installations(selected_options: list[str]) -> None:
|
|
|
130
130
|
console.print(Panel("🐍 [bold green]PYTHON ENVIRONMENT[/bold green]\n[italic]Virtual environment setup[/italic]", border_style="green"))
|
|
131
131
|
import platform
|
|
132
132
|
if platform.system() == "Windows":
|
|
133
|
-
run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.
|
|
133
|
+
run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.84""")
|
|
134
134
|
else:
|
|
135
|
-
run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.
|
|
135
|
+
run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.84""")
|
|
136
136
|
if "install_ssh_server" in selected_options:
|
|
137
137
|
console.print(Panel("🔒 [bold red]SSH SERVER[/bold red]\n[italic]Remote access setup[/italic]", border_style="red"))
|
|
138
138
|
import platform
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# mkdir ~/data/local
|
|
6
6
|
# sudo mount -o nolock,noatime,nodiratime,proto=tcp,timeo=600,retrans=2,noac alex-p51s-5:/home/alex/data/local ./data/local
|
|
7
7
|
|
|
8
|
-
uv run --python 3.14 --with "machineconfig>=5.
|
|
8
|
+
uv run --python 3.14 --with "machineconfig>=5.84" python -m machineconfig.scripts.python.mount_nfs
|
|
9
9
|
# Check if remote server is reachable and share folder exists
|
|
10
10
|
if ! ping -c 1 "$remote_server" &> /dev/null; then
|
|
11
11
|
echo "💥 Error: Remote server $remote_server is not reachable."
|
|
@@ -7,7 +7,7 @@ def analyze_repo_development(repo_path: str = typer.Argument(..., help="Path to
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
count_lines_path = Path(count_lines.__file__)
|
|
9
9
|
# --project $HOME/code/ machineconfig --group plot
|
|
10
|
-
cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=5.
|
|
10
|
+
cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=5.84" {count_lines_path} analyze-over-time {repo_path}"""
|
|
11
11
|
from machineconfig.utils.code import run_shell_script
|
|
12
12
|
run_shell_script(cmd)
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ $user = ''
|
|
|
7
7
|
$sharePath = ''
|
|
8
8
|
$driveLetter = ''
|
|
9
9
|
|
|
10
|
-
uv run --python 3.14 --with "machineconfig>=5.
|
|
10
|
+
uv run --python 3.14 --with "machineconfig>=5.84" python -m machineconfig.scripts.python.mount_ssh
|
|
11
11
|
|
|
12
12
|
net use T: \\sshfs.kr\$user@$host.local
|
|
13
13
|
# this worked: net use T: \\sshfs\alex@alex-p51s-5.local
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
. <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
|
|
3
3
|
devops() {
|
|
4
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
4
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" devops "$@"
|
|
5
5
|
}
|
|
6
6
|
agents() {
|
|
7
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
7
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" agents "$@"
|
|
8
8
|
}
|
|
9
9
|
cloud() {
|
|
10
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
10
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" cloud "$@"
|
|
11
11
|
}
|
|
12
12
|
croshell() {
|
|
13
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
13
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" croshell "$@"
|
|
14
14
|
}
|
|
15
15
|
fire() {
|
|
16
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
16
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" fire "$@"
|
|
17
17
|
}
|
|
18
18
|
ftpx() {
|
|
19
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
19
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" ftpx "$@"
|
|
20
20
|
}
|
|
21
21
|
sessions() {
|
|
22
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.
|
|
22
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=5.84" sessions "$@"
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
echo "devops command is now defined in this shell session."
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
|
|
4
4
|
function devops {
|
|
5
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
5
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" devops $args
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
function cloud {
|
|
9
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
9
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" cloud $args
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function croshell {
|
|
13
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
13
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" croshell $args
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function agents {
|
|
17
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
17
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" agents $args
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function fire {
|
|
21
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
21
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" fire $args
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function ftpx {
|
|
25
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
25
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" ftpx $args
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function sessions {
|
|
29
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.
|
|
29
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=5.84" sessions $args
|
|
30
30
|
}
|
|
31
31
|
|
machineconfig/utils/ssh.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional, Any, Union
|
|
1
|
+
from typing import Callable, Optional, Any, Union
|
|
2
2
|
import os
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
import rich.console
|
|
@@ -6,7 +6,7 @@ from machineconfig.utils.terminal import Response, MACHINE
|
|
|
6
6
|
from machineconfig.utils.accessories import pprint
|
|
7
7
|
|
|
8
8
|
UV_RUN_CMD = "$HOME/.local/bin/uv run"
|
|
9
|
-
MACHINECONFIG_VERSION = "
|
|
9
|
+
MACHINECONFIG_VERSION = "machineconfig>=5.84"
|
|
10
10
|
DEFAULT_PICKLE_SUBDIR = "tmp_results/tmp_scripts/ssh"
|
|
11
11
|
|
|
12
12
|
|
|
@@ -186,15 +186,32 @@ class SSH:
|
|
|
186
186
|
res.capture().print_if_unsuccessful(desc=description, strict_err=strict_stderr, strict_returncode=strict_return_code, assert_success=False)
|
|
187
187
|
self.terminal_responses.append(res)
|
|
188
188
|
return res
|
|
189
|
-
def run_py(self, python_code: str,
|
|
189
|
+
def run_py(self, python_code: str, dependencies: list[str], venv_path: Optional[str],
|
|
190
|
+
description: str, verbose_output: bool, strict_stderr: bool, strict_return_code: bool) -> Response:
|
|
190
191
|
from machineconfig.utils.accessories import randstr
|
|
191
192
|
cmd_path = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/runpy_{randstr()}.py")
|
|
192
193
|
cmd_path.parent.mkdir(parents=True, exist_ok=True)
|
|
193
194
|
cmd_path.write_text(python_code, encoding="utf-8")
|
|
194
195
|
self.copy_from_here(source_path=cmd_path, target_path=None, compress_with_zip=False, recursive=False, overwrite_existing=False)
|
|
195
|
-
|
|
196
|
+
if len(dependencies) > 0:
|
|
197
|
+
with_clause = " --with " + '"', ",".join(dependencies) + '"'
|
|
198
|
+
else:
|
|
199
|
+
with_clause = ""
|
|
200
|
+
uv_cmd = f"""{UV_RUN_CMD} {with_clause} python {cmd_path.relative_to(Path.home())}"""
|
|
201
|
+
if venv_path is not None:
|
|
202
|
+
if self.get_remote_machine() == "Windows":
|
|
203
|
+
venv_export = f"$env:VIRTUAL_ENV='{venv_path}';"
|
|
204
|
+
uv_cmd = venv_export + uv_cmd
|
|
205
|
+
else:
|
|
206
|
+
venv_export = f"VIRTUAL_ENV={venv_path}"
|
|
207
|
+
uv_cmd = venv_export + " " + uv_cmd
|
|
196
208
|
return self.run_shell(command=uv_cmd, verbose_output=verbose_output, description=description or f"run_py on {self.get_remote_repr(add_machine=False)}", strict_stderr=strict_stderr, strict_return_code=strict_return_code)
|
|
197
209
|
|
|
210
|
+
def run_py_func(self, func: Callable[..., Any], dependencies: list[str], venv_path: Optional[str]) -> Response:
|
|
211
|
+
from machineconfig.utils.meta import function_to_script
|
|
212
|
+
command = function_to_script(func=func, call_with_kwargs={})
|
|
213
|
+
return self.run_py(python_code=command, dependencies=dependencies, venv_path=venv_path, description=f"run_py_func {func.__name__} on {self.get_remote_repr(add_machine=False)}", verbose_output=True, strict_stderr=True, strict_return_code=True)
|
|
214
|
+
|
|
198
215
|
def _simple_sftp_get(self, remote_path: str, local_path: Path) -> None:
|
|
199
216
|
"""Simple SFTP get without any recursion or path expansion - for internal use only."""
|
|
200
217
|
if self.sftp is None:
|
|
@@ -225,7 +242,7 @@ class SSH:
|
|
|
225
242
|
from machineconfig.utils.accessories import randstr
|
|
226
243
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
227
244
|
command = function_to_script(func=create_target_dir, call_with_kwargs={"target_dir_path": Path(target_path).as_posix(), "overwrite": overwrite_existing, "json_output_path": remote_json_output})
|
|
228
|
-
response = self.run_py(python_code=command, description=f"Creating target directory `{Path(target_path).parent.as_posix()}` @ {self.get_remote_repr(add_machine=False)}", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
245
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description=f"Creating target directory `{Path(target_path).parent.as_posix()}` @ {self.get_remote_repr(add_machine=False)}", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
229
246
|
remote_json_path = response.op.strip()
|
|
230
247
|
if not remote_json_path:
|
|
231
248
|
raise RuntimeError(f"Failed to create target directory {target_path} - no response from remote")
|
|
@@ -308,7 +325,7 @@ class SSH:
|
|
|
308
325
|
archive_path.unlink()
|
|
309
326
|
from machineconfig.utils.meta import function_to_script
|
|
310
327
|
command = function_to_script(func=unzip_archive, call_with_kwargs={"zip_file_path": remotepath.as_posix(), "overwrite_flag": overwrite_existing})
|
|
311
|
-
_resp = self.run_py(python_code=command, description=f"UNZIPPING {remotepath.as_posix()}", verbose_output=False, strict_stderr=True, strict_return_code=True)
|
|
328
|
+
_resp = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description=f"UNZIPPING {remotepath.as_posix()}", verbose_output=False, strict_stderr=True, strict_return_code=True)
|
|
312
329
|
source_obj.unlink()
|
|
313
330
|
print("\n")
|
|
314
331
|
return source_obj
|
|
@@ -329,7 +346,7 @@ class SSH:
|
|
|
329
346
|
from machineconfig.utils.accessories import randstr
|
|
330
347
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
331
348
|
command = function_to_script(func=check_is_dir, call_with_kwargs={"path_to_check": str(source_path), "json_output_path": remote_json_output})
|
|
332
|
-
response = self.run_py(python_code=command, description=f"Check if source `{source_path}` is a dir", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
349
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description=f"Check if source `{source_path}` is a dir", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
333
350
|
remote_json_path = response.op.strip()
|
|
334
351
|
if not remote_json_path:
|
|
335
352
|
raise RuntimeError(f"Failed to check if {source_path} is directory - no response from remote")
|
|
@@ -363,7 +380,7 @@ class SSH:
|
|
|
363
380
|
from machineconfig.utils.accessories import randstr
|
|
364
381
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
365
382
|
command = function_to_script(func=expand_source, call_with_kwargs={"path_to_expand": str(source_path), "json_output_path": remote_json_output})
|
|
366
|
-
response = self.run_py(python_code=command, description="Resolving source path by expanding user", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
383
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description="Resolving source path by expanding user", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
367
384
|
remote_json_path = response.op.strip()
|
|
368
385
|
if not remote_json_path:
|
|
369
386
|
raise RuntimeError(f"Could not resolve source path {source_path} - no response from remote")
|
|
@@ -412,7 +429,7 @@ class SSH:
|
|
|
412
429
|
from machineconfig.utils.accessories import randstr
|
|
413
430
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
414
431
|
command = function_to_script(func=search_files, call_with_kwargs={"directory_path": expanded_source, "json_output_path": remote_json_output})
|
|
415
|
-
response = self.run_py(python_code=command, description="Searching for files in source", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
432
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description="Searching for files in source", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
416
433
|
remote_json_path = response.op.strip()
|
|
417
434
|
if not remote_json_path:
|
|
418
435
|
raise RuntimeError(f"Could not resolve source path {source} - no response from remote")
|
|
@@ -450,7 +467,7 @@ class SSH:
|
|
|
450
467
|
from machineconfig.utils.accessories import randstr
|
|
451
468
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
452
469
|
command = function_to_script(func=collapse_to_home_dir, call_with_kwargs={"absolute_path": expanded_source, "json_output_path": remote_json_output})
|
|
453
|
-
response = self.run_py(python_code=command, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
470
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
454
471
|
remote_json_path_dir = response.op.strip()
|
|
455
472
|
if not remote_json_path_dir:
|
|
456
473
|
raise RuntimeError("Could not resolve target path - no response from remote")
|
|
@@ -502,7 +519,7 @@ class SSH:
|
|
|
502
519
|
from machineconfig.utils.accessories import randstr
|
|
503
520
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
504
521
|
command = function_to_script(func=zip_source, call_with_kwargs={"path_to_zip": expanded_source, "json_output_path": remote_json_output})
|
|
505
|
-
response = self.run_py(python_code=command, description=f"Zipping source file {source}", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
522
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description=f"Zipping source file {source}", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
506
523
|
remote_json_path = response.op.strip()
|
|
507
524
|
if not remote_json_path:
|
|
508
525
|
raise RuntimeError(f"Could not zip {source} - no response from remote")
|
|
@@ -541,7 +558,7 @@ class SSH:
|
|
|
541
558
|
from machineconfig.utils.accessories import randstr
|
|
542
559
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
543
560
|
command = function_to_script(func=collapse_to_home, call_with_kwargs={"absolute_path": expanded_source, "json_output_path": remote_json_output})
|
|
544
|
-
response = self.run_py(python_code=command, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
561
|
+
response = self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
545
562
|
remote_json_path = response.op.strip()
|
|
546
563
|
if not remote_json_path:
|
|
547
564
|
raise RuntimeError("Could not resolve target path - no response from remote")
|
|
@@ -597,7 +614,7 @@ class SSH:
|
|
|
597
614
|
|
|
598
615
|
from machineconfig.utils.meta import function_to_script
|
|
599
616
|
command = function_to_script(func=delete_temp_zip, call_with_kwargs={"path_to_delete": expanded_source})
|
|
600
|
-
self.run_py(python_code=command, description="Cleaning temp zip files @ remote.", verbose_output=False, strict_stderr=True, strict_return_code=True)
|
|
617
|
+
self.run_py(python_code=command, dependencies=[MACHINECONFIG_VERSION], venv_path=None, description="Cleaning temp zip files @ remote.", verbose_output=False, strict_stderr=True, strict_return_code=True)
|
|
601
618
|
|
|
602
619
|
print("\n")
|
|
603
620
|
return target_obj
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Callable, ParamSpec, TypeVar, Any, Dict
|
|
2
|
+
|
|
3
|
+
P = ParamSpec('P')
|
|
4
|
+
R = TypeVar('R')
|
|
5
|
+
|
|
6
|
+
def typed_function(func: Callable[P, R], signature_dict: Dict[str, Any]) -> Callable[P, R]:
|
|
7
|
+
"""
|
|
8
|
+
Returns the function with its signature preserved using ParamSpec.
|
|
9
|
+
|
|
10
|
+
The signature_dict is passed for potential future use or documentation,
|
|
11
|
+
but is not currently used in the implementation.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
func: The function whose signature is to be preserved.
|
|
15
|
+
signature_dict: A dictionary describing the function's signature (not used).
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
The original function, typed with ParamSpec to preserve its signature.
|
|
19
|
+
"""
|
|
20
|
+
return func
|
|
@@ -122,13 +122,13 @@ machineconfig/scripts/linux/other/switch_ip,sha256=NQfeKMBSbFY3eP6M-BadD-TQo5qMP
|
|
|
122
122
|
machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
123
|
machineconfig/scripts/python/agents.py,sha256=DIfM7mqi8BhB7PWk-UiBNOYjUzQHdeA1hoS8v3FHKPQ,10446
|
|
124
124
|
machineconfig/scripts/python/cloud.py,sha256=ubLmf06FSdi1NawpQDgUDAtYb9cZSQqHbSUHzAwRIas,1199
|
|
125
|
-
machineconfig/scripts/python/croshell.py,sha256=
|
|
125
|
+
machineconfig/scripts/python/croshell.py,sha256=A4beywje-U2gyOcCCaXoqXP2nz47DShqNbikQWvCcH8,7083
|
|
126
126
|
machineconfig/scripts/python/devops.py,sha256=9VgoOQLLOpCgJDu6j4PbydKCsjvmNoPriuVL35WT3HE,2102
|
|
127
127
|
machineconfig/scripts/python/devops_navigator.py,sha256=4O9_-ACeP748NcMjWQXZF7mBQpMPxqCGhLvPG3DMi4Q,236
|
|
128
128
|
machineconfig/scripts/python/entry.py,sha256=Az7dK1eXHGW5l46Yg10Cd88VChCdhvLAzO3e1A3r56A,2176
|
|
129
129
|
machineconfig/scripts/python/fire_jobs.py,sha256=O5DrckUGLxGblOcLf_iXU31pmCSpTg-c0hQZxQKD1os,13591
|
|
130
130
|
machineconfig/scripts/python/ftpx.py,sha256=UBDP6IIfWkaML1uZT1FrfGUUy_Of5LI82IdqEzo05_U,9760
|
|
131
|
-
machineconfig/scripts/python/interactive.py,sha256=
|
|
131
|
+
machineconfig/scripts/python/interactive.py,sha256=Vl7ZR4A5qRSFg7IHIky-i8J8DmGu-KzuvhL6pmkfCHY,11790
|
|
132
132
|
machineconfig/scripts/python/sessions.py,sha256=Xaol7AzLItb3GIHo_sEVFUpFmTKDeTgqlK3-syqtNxw,9545
|
|
133
133
|
machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
134
|
machineconfig/scripts/python/ai/generate_files.py,sha256=VfjKdwgF8O6E4oiRtfWNliibLmmwGe7f9ld6wpOsXTw,14498
|
|
@@ -174,12 +174,12 @@ machineconfig/scripts/python/croshell_helpers/start_slidev.py,sha256=HfJReOusTPh
|
|
|
174
174
|
machineconfig/scripts/python/croshell_helpers/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
|
|
175
175
|
machineconfig/scripts/python/croshell_helpers/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
|
|
176
176
|
machineconfig/scripts/python/devops_helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
177
|
-
machineconfig/scripts/python/devops_helpers/cli_config.py,sha256=
|
|
177
|
+
machineconfig/scripts/python/devops_helpers/cli_config.py,sha256=1T8_BTtGcUBxKAvEgBAKnZ4xB_5hiqXla6JktqHgNKQ,5332
|
|
178
178
|
machineconfig/scripts/python/devops_helpers/cli_config_dotfile.py,sha256=rjTys4FNf9_feP9flWM7Zvq17dxWmetSiGaHPxp25nk,2737
|
|
179
179
|
machineconfig/scripts/python/devops_helpers/cli_data.py,sha256=kvJ7g2CccjjXIhCwdu_Vlif8JHC0qUoLjuGcTSqT-IU,514
|
|
180
180
|
machineconfig/scripts/python/devops_helpers/cli_nw.py,sha256=3KyzyoEyiLFrKxB5abkUq8UI3PoHWcI9PyczHf0YcSY,4023
|
|
181
181
|
machineconfig/scripts/python/devops_helpers/cli_repos.py,sha256=HJH5ZBob_Uzhc3fDgG9riOeW6YEJt88xTjQYcEUPmUY,12015
|
|
182
|
-
machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=
|
|
182
|
+
machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=eVGCoSmj24U6T0pqDkXw5GYdIasyCiMyHqMVkDuXB7Y,4531
|
|
183
183
|
machineconfig/scripts/python/devops_helpers/cli_share_server.py,sha256=285OzxttCx7YsrpOkaapMKP1eVGHmG5TkkaSQnY7i3c,3976
|
|
184
184
|
machineconfig/scripts/python/devops_helpers/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
|
|
185
185
|
machineconfig/scripts/python/devops_helpers/devops_backup_retrieve.py,sha256=nK47Rc7gQuDCnkk6_sW1y82gBnDJ9TdHU8XwMPFBK9c,5591
|
|
@@ -219,7 +219,7 @@ machineconfig/scripts/python/helpers_fire_command/fire_jobs_args_helper.py,sha25
|
|
|
219
219
|
machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py,sha256=4MrlCVijbx7GQyAN9s5LDh-7heSjMXYrXdqiP6uC3ug,5378
|
|
220
220
|
machineconfig/scripts/python/helpers_fire_command/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
221
221
|
machineconfig/scripts/python/helpers_repos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
222
|
-
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=
|
|
222
|
+
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=XGwZYoSEt6e1Q2wyU-fH76I9lNgeSX8AEqw3Lmhj5CQ,9609
|
|
223
223
|
machineconfig/scripts/python/helpers_repos/grource.py,sha256=IywQ1NDPcLXM5Tr9xhmq4tHfYspLRs3pF20LP2TlgIQ,14595
|
|
224
224
|
machineconfig/scripts/python/helpers_repos/secure_repo.py,sha256=g0o3SHBwicro1K51IY1Wg0_rkBJQ3esHPcsfNHu4Q8A,1005
|
|
225
225
|
machineconfig/scripts/python/nw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -227,7 +227,7 @@ machineconfig/scripts/python/nw/add_ssh_key.py,sha256=dYOK9vCB6I9YSeCLO7Hid1IaFj
|
|
|
227
227
|
machineconfig/scripts/python/nw/devops_add_identity.py,sha256=aPjcHbTLhxYwWYcandyAHdwuO15ZBu3fB82u6bI0tMQ,3773
|
|
228
228
|
machineconfig/scripts/python/nw/devops_add_ssh_key.py,sha256=EyLs2kc1A0Z-JncjDSleiBokgBzEaxlS-C024K4WuZQ,8847
|
|
229
229
|
machineconfig/scripts/python/nw/mount_drive,sha256=zemKofv7hOmRN_V3qK0q580GkfWw3VdikyVVQyiu8j8,3514
|
|
230
|
-
machineconfig/scripts/python/nw/mount_nfs,sha256=
|
|
230
|
+
machineconfig/scripts/python/nw/mount_nfs,sha256=yybRX-lJ0V6wgTLknQB9rp6HwFBZdbfJzVnDvpHM8Xc,1855
|
|
231
231
|
machineconfig/scripts/python/nw/mount_nfs.py,sha256=lOMDY4RS7tx8gsCazVR5tNNwFbaRyO2PJlnwBCDQgCM,3573
|
|
232
232
|
machineconfig/scripts/python/nw/mount_nw_drive,sha256=BqjGBCbwe5ZAsZDO3L0zHhh_gJfZy1CYOcqXA4Y-WkQ,2262
|
|
233
233
|
machineconfig/scripts/python/nw/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkuliVpPV5_uBTVVhXtjQ,1550
|
|
@@ -240,7 +240,7 @@ machineconfig/scripts/python/nw/wsl_windows_transfer.py,sha256=1ab9l-8MtAxofW5nG
|
|
|
240
240
|
machineconfig/scripts/python/repos_helpers/action.py,sha256=t6x9K43Uy7r5aRpdODfsN-5UoMrYXEG2cVw-Y8l9prw,14847
|
|
241
241
|
machineconfig/scripts/python/repos_helpers/clone.py,sha256=9vGb9NCXT0lkerPzOJjmFfhU8LSzE-_1LDvjkhgnal0,5461
|
|
242
242
|
machineconfig/scripts/python/repos_helpers/count_lines.py,sha256=ZLEajCLmlFFY969BehabqGOB9_kkpATO3Lt09L7KULk,15968
|
|
243
|
-
machineconfig/scripts/python/repos_helpers/count_lines_frontend.py,sha256=
|
|
243
|
+
machineconfig/scripts/python/repos_helpers/count_lines_frontend.py,sha256=LuA4Tigy9eaBfdv2Y4Dnv0a8N0XikIUa-of9yR9LKqQ,568
|
|
244
244
|
machineconfig/scripts/python/repos_helpers/entrypoint.py,sha256=C-_D03abE0TkVCJ4jZoliUMAhRRkZ77mcwMoPOuieJQ,2827
|
|
245
245
|
machineconfig/scripts/python/repos_helpers/record.py,sha256=3T5VmMbvywScZhTW2j4cGLK0T2LSWxKfnXkRTxkuLP4,10994
|
|
246
246
|
machineconfig/scripts/python/repos_helpers/sync.py,sha256=CLLWy2n2gY9beXPF-mblOQ6R7cKoenkJjMiX7tHQsBk,3091
|
|
@@ -253,7 +253,7 @@ machineconfig/scripts/windows/fzfrga.bat,sha256=rU_KBMO6ii2EZ0akMnmDk9vpuhKSUZqk
|
|
|
253
253
|
machineconfig/scripts/windows/mounts/mount_nfs.ps1,sha256=XrAdzpxE6a4OccSmWJ7YWHJTnsZK8uXnFE5j9GOPA20,2026
|
|
254
254
|
machineconfig/scripts/windows/mounts/mount_nw.ps1,sha256=puxcfZc3ZCJerm8pj8OZGVoTYkhzp-h7oV-MrksSqIE,454
|
|
255
255
|
machineconfig/scripts/windows/mounts/mount_smb.ps1,sha256=PzYWpIO9BpwXjdWlUQL9pnMRnOGNSkxfh4bHukJFme8,69
|
|
256
|
-
machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=
|
|
256
|
+
machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=1BQAuvslqQDGRPAiQSoeJxE7NGw5hQwKDHv_XzW95Uk,322
|
|
257
257
|
machineconfig/scripts/windows/mounts/share_cloud.cmd,sha256=exD7JCdxw2LqVjw2MKCYHbVZlEqmelXtwnATng-dhJ4,1028
|
|
258
258
|
machineconfig/scripts/windows/mounts/share_smb.ps1,sha256=U7x8ULYSjbgzTtiHNSKQuTaZ_apilDvkGV5Xm5hXk5M,384
|
|
259
259
|
machineconfig/scripts/windows/mounts/unlock_bitlocker.ps1,sha256=Wv-SLscdckV-1mG3p82VXKPY9zW3hgkRmcLUXIZ1daE,253
|
|
@@ -368,7 +368,7 @@ machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh,sha256=F5dbg0n9RHsKG
|
|
|
368
368
|
machineconfig/setup_linux/ssh/openssh_all.sh,sha256=3dg6HEUFbHQOzLfSAtzK_D_GB8rGCCp_aBnxNdnidVc,824
|
|
369
369
|
machineconfig/setup_linux/ssh/openssh_wsl.sh,sha256=1eeRGrloVB34K5z8yWVUMG5b9pV-WBfHgV9jqXiYgCQ,1398
|
|
370
370
|
machineconfig/setup_linux/web_shortcuts/android.sh,sha256=gzep6bBhK7FCBvGcXK0fdJCtkSfBOftt0aFyDZq_eMs,68
|
|
371
|
-
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=
|
|
371
|
+
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=8ElVbJO7SFOZ9dMouN5Ai_wvBPZJ8kv_r4z1_hSsJ7w,880
|
|
372
372
|
machineconfig/setup_windows/__init__.py,sha256=NnSVZkIBoxoMgkj-_KAqGonH3YziBIWXOKDEcmNAGTY,386
|
|
373
373
|
machineconfig/setup_windows/apps.ps1,sha256=G5GqZ9G0aiQr_A-HaahtRdzpaTTdW6n3DRKMZWDTSPc,11214
|
|
374
374
|
machineconfig/setup_windows/uv.ps1,sha256=ukk1Abh-q-RfpoEqI2XTE2dcQJmHk0VFF6WqkK3TW8Q,350
|
|
@@ -378,7 +378,7 @@ machineconfig/setup_windows/others/power_options.ps1,sha256=c7Hn94jBD5GWF29CxMhm
|
|
|
378
378
|
machineconfig/setup_windows/ssh/add-sshkey.ps1,sha256=qfPdqCpd9KP3VhH4ifsUm1Xvec7c0QVl4Wt8JIAm9HQ,1653
|
|
379
379
|
machineconfig/setup_windows/ssh/add_identity.ps1,sha256=b8ZXpmNUSw3IMYvqSY7ClpdWPG39FS7MefoWnRhWN2U,506
|
|
380
380
|
machineconfig/setup_windows/ssh/openssh-server.ps1,sha256=OMlYQdvuJQNxF5EILLPizB6BZAT3jAmDsv1WcVVxpFQ,2529
|
|
381
|
-
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=
|
|
381
|
+
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=y-QzocdFk3797EgqO2QierRzLbDM2379LLQ8q4It9Cc,919
|
|
382
382
|
machineconfig/setup_windows/wt_and_pwsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
383
383
|
machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6dFJu95UCNoGYirZKQho_3X0F_hmXs,6791
|
|
384
384
|
machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -396,8 +396,9 @@ machineconfig/utils/procs.py,sha256=w75oGKfR7FpT1pGTGd2XscnEOO0IHBWxohLbi69hLqg,
|
|
|
396
396
|
machineconfig/utils/scheduler.py,sha256=jZ_1yghqA3-aINPRmE_76gboqJc0UElroR7urNOfXKs,14940
|
|
397
397
|
machineconfig/utils/scheduling.py,sha256=RF1iXJpqf4Dg18jdZWtBixz97KAHC6VKYqTFSpdLWuc,11188
|
|
398
398
|
machineconfig/utils/source_of_truth.py,sha256=ZAnCRltiM07ig--P6g9_6nEAvNFC4X4ERFTVcvpIYsE,764
|
|
399
|
-
machineconfig/utils/ssh.py,sha256=
|
|
399
|
+
machineconfig/utils/ssh.py,sha256=9TQgxsZCxF1rf2sIFcnj1-VWgjNZOU-5DIuW6s4UeNo,39079
|
|
400
400
|
machineconfig/utils/terminal.py,sha256=IlmOByfQG-vjhaFFxxzU5rWzP5_qUzmalRfuey3PAmc,11801
|
|
401
|
+
machineconfig/utils/tst.py,sha256=6u1GI49NdcpxH2BYGAusNfY5q9G_ytCGVzFM5b6HYpM,674
|
|
401
402
|
machineconfig/utils/upgrade_packages.py,sha256=H96zVJEWXJW07nh5vhjuSCrPtXGqoUb7xeJsFYYdmCI,3330
|
|
402
403
|
machineconfig/utils/ve.py,sha256=L-6PBXnQGXThiwWgheJMQoisAZOZA6SVCbGw2J-GFnI,2414
|
|
403
404
|
machineconfig/utils/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -420,8 +421,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
|
|
|
420
421
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
421
422
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
422
423
|
machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
423
|
-
machineconfig-5.
|
|
424
|
-
machineconfig-5.
|
|
425
|
-
machineconfig-5.
|
|
426
|
-
machineconfig-5.
|
|
427
|
-
machineconfig-5.
|
|
424
|
+
machineconfig-5.84.dist-info/METADATA,sha256=4K8XT7il2Jha9zmrIQsGCjLFToSy2TYBVXVYygYFbOo,3013
|
|
425
|
+
machineconfig-5.84.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
426
|
+
machineconfig-5.84.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
|
|
427
|
+
machineconfig-5.84.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
428
|
+
machineconfig-5.84.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|