machineconfig 3.83__py3-none-any.whl → 3.86__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/cluster/sessions_managers/zellij_local.py +2 -2
- machineconfig/cluster/sessions_managers/zellij_remote.py +2 -2
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +2 -2
- machineconfig/jobs/python/vscode/api.py +8 -7
- machineconfig/scripts/python/ai/initai.py +1 -11
- machineconfig/scripts/python/cloud_copy.py +33 -27
- machineconfig/scripts/python/cloud_manager.py +0 -2
- machineconfig/scripts/python/cloud_mount.py +13 -10
- machineconfig/scripts/python/cloud_sync.py +30 -28
- machineconfig/scripts/python/croshell.py +46 -53
- machineconfig/scripts/python/dotfile.py +16 -16
- machineconfig/scripts/python/fire_agents.py +4 -5
- machineconfig/scripts/python/fire_jobs.py +30 -14
- machineconfig/scripts/python/fire_jobs_args_helper.py +43 -15
- machineconfig/scripts/python/fire_jobs_layout_helper.py +24 -16
- machineconfig/scripts/python/helpers/helpers4.py +0 -2
- machineconfig/scripts/python/repos.py +10 -88
- machineconfig/scripts/python/repos_helper_action.py +335 -0
- machineconfig/scripts/python/scheduler.py +0 -1
- machineconfig/scripts/python/share_terminal.py +41 -0
- machineconfig/scripts/python/start_slidev.py +15 -13
- machineconfig/scripts/python/start_terminals.py +19 -19
- machineconfig/scripts/python/t4.py +17 -0
- machineconfig/scripts/python/wifi_conn.py +16 -14
- machineconfig/scripts/python/wsl_windows_transfer.py +23 -29
- machineconfig/utils/accessories.py +45 -7
- machineconfig/utils/ai/generate_file_checklist.py +17 -17
- {machineconfig-3.83.dist-info → machineconfig-3.86.dist-info}/METADATA +1 -1
- {machineconfig-3.83.dist-info → machineconfig-3.86.dist-info}/RECORD +32 -32
- {machineconfig-3.83.dist-info → machineconfig-3.86.dist-info}/entry_points.txt +5 -5
- machineconfig/cluster/templates/cli_gooey.py +0 -115
- machineconfig/jobs/python/vscode/link_ve.py +0 -63
- machineconfig/jobs/python/vscode/select_interpreter.py +0 -87
- {machineconfig-3.83.dist-info → machineconfig-3.86.dist-info}/WHEEL +0 -0
- {machineconfig-3.83.dist-info → machineconfig-3.86.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""TWSL"""
|
|
2
2
|
|
|
3
3
|
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
4
|
-
import
|
|
4
|
+
from typing import Annotated, Optional
|
|
5
|
+
import typer
|
|
5
6
|
import platform
|
|
6
7
|
import getpass
|
|
7
8
|
from pathlib import Path
|
|
@@ -20,53 +21,46 @@ WSL_FROM_WIN = Path(r"\\wsl.localhost\Ubuntu-22.04\home") # PathExtended(rf"\\w
|
|
|
20
21
|
WIN_FROM_WSL = Path(r"/mnt/c/Users")
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
def main(
|
|
24
|
+
def main(
|
|
25
|
+
path: Annotated[str, typer.Argument(help="📁 Path of file/folder to transfer over.")],
|
|
26
|
+
same_file_system: Annotated[bool, typer.Option("--same_file_system", "-s", help="⚠️ Move file across the same file system (not recommended).")] = False,
|
|
27
|
+
destination: Annotated[str, typer.Option("--destination", "-d", help="📍 New path.")] = "",
|
|
28
|
+
pwd: Annotated[Optional[str], typer.Option("--pwd", "-P", help="🔑 Password for encryption.")] = None,
|
|
29
|
+
sshkey: Annotated[Optional[str], typer.Option("--sshkey", "-i", help="🔐 Path to SSH private key.")] = None,
|
|
30
|
+
port: Annotated[Optional[str], typer.Option("--port", "-p", help="🔌 Port number.")] = None,
|
|
31
|
+
zip_first: Annotated[bool, typer.Option("--zip_first", "-z", help="📦 Zip before transferring.")] = False,
|
|
32
|
+
) -> None:
|
|
24
33
|
print("\n" + "=" * 50)
|
|
25
34
|
print("🔄 Welcome to the WSL-Windows File Transfer Tool")
|
|
26
35
|
print("=" * 50 + "\n")
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
description="""📂 Move and copy files across WSL & Windows.
|
|
30
|
-
The direction is automatically determined by sensing the execution environment.
|
|
31
|
-
Otherwise, a flag must be raised to indicate the direction."""
|
|
32
|
-
)
|
|
37
|
+
path_obj = PathExtended(path).expanduser().absolute()
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
parser.add_argument("path", help="📁 Path of file/folder to transfer over.")
|
|
36
|
-
# FLAGS
|
|
37
|
-
# this is dangerous and no gaurantee on no corruption.
|
|
38
|
-
parser.add_argument("--same_file_system", "-s", help="⚠️ Move file across the same file system (not recommended).", action="store_true") # default is False
|
|
39
|
-
# optional argument
|
|
40
|
-
parser.add_argument("--destination", "-d", help="📍 New path.", default="")
|
|
41
|
-
parser.add_argument("--pwd", "-P", help="🔑 Password for encryption.", default=None)
|
|
42
|
-
parser.add_argument("--sshkey", "-i", help="🔐 Path to SSH private key.", default=None)
|
|
43
|
-
parser.add_argument("--port", "-p", help="🔌 Port number.", default=None)
|
|
44
|
-
parser.add_argument("--zip_first", "-z", help="📦 Zip before transferring.", action="store_true") # default is False
|
|
45
|
-
|
|
46
|
-
args = parser.parse_args()
|
|
47
|
-
path = PathExtended(args.path).expanduser().absolute()
|
|
48
|
-
|
|
49
|
-
if args.same_file_system:
|
|
39
|
+
if same_file_system:
|
|
50
40
|
print("⚠️ Using a not recommended transfer method! Copying files across the same file system.")
|
|
51
41
|
if system == "Windows": # move files over to WSL
|
|
52
42
|
print("📤 Transferring files from Windows to WSL...")
|
|
53
|
-
|
|
43
|
+
path_obj.copy(folder=WSL_FROM_WIN.joinpath(UserName).joinpath(path_obj.rel2home().parent), overwrite=True) # the following works for files and folders alike.
|
|
54
44
|
else: # move files from WSL to win
|
|
55
45
|
print("📤 Transferring files from WSL to Windows...")
|
|
56
|
-
|
|
46
|
+
path_obj.copy(folder=WIN_FROM_WSL.joinpath(UserName).joinpath(path_obj.rel2home().parent), overwrite=True)
|
|
57
47
|
print("✅ Transfer completed successfully!\n")
|
|
58
48
|
else:
|
|
59
49
|
from machineconfig.utils.ssh import SSH
|
|
60
50
|
import platform
|
|
61
51
|
|
|
62
|
-
|
|
52
|
+
port_int = int(port) if port else (2222 if system == "Windows" else 22)
|
|
63
53
|
username = UserName
|
|
64
54
|
hostname = platform.node()
|
|
65
|
-
ssh = SSH(hostname=hostname, username=username, port=
|
|
55
|
+
ssh = SSH(hostname=hostname, username=username, port=port_int, sshkey=sshkey)
|
|
66
56
|
print("🌐 Initiating SSH transfer...")
|
|
67
|
-
ssh.copy_from_here(source=
|
|
57
|
+
ssh.copy_from_here(source=path_obj, target=destination, z=zip_first)
|
|
68
58
|
print("✅ SSH transfer completed successfully!\n")
|
|
69
59
|
|
|
70
60
|
|
|
61
|
+
def arg_parser() -> None:
|
|
62
|
+
typer.run(main)
|
|
63
|
+
|
|
64
|
+
|
|
71
65
|
if __name__ == "__main__":
|
|
72
|
-
|
|
66
|
+
arg_parser()
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from typing import Optional, Any
|
|
3
3
|
|
|
4
|
+
from datetime import datetime, timezone, timedelta
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
def randstr(length: int = 10, lower: bool = True, upper: bool = True, digits: bool = True, punctuation: bool = False, safe: bool = False, noun: bool = False) -> str:
|
|
6
8
|
if safe:
|
|
@@ -18,16 +20,52 @@ def randstr(length: int = 10, lower: bool = True, upper: bool = True, digits: bo
|
|
|
18
20
|
return "".join(random.choices(population, k=length))
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
def
|
|
23
|
+
def split_timeframe(start_dt: str, end_dt: str, resolution_ms: int, to: Optional[int]=None, every_ms: Optional[int]=None) -> list[tuple[datetime, datetime]]:
|
|
24
|
+
if (to is None) == (every_ms is None):
|
|
25
|
+
raise ValueError("Exactly one of 'to' or 'every_ms' must be provided, not both or neither")
|
|
26
|
+
start_dt_obj = datetime.fromisoformat(start_dt).replace(tzinfo=timezone.utc)
|
|
27
|
+
end_dt_obj = datetime.fromisoformat(end_dt).replace(tzinfo=timezone.utc)
|
|
28
|
+
delta = end_dt_obj - start_dt_obj
|
|
29
|
+
resolution = timedelta(milliseconds=resolution_ms)
|
|
30
|
+
res: list[tuple[datetime, datetime]] = []
|
|
31
|
+
if to is not None:
|
|
32
|
+
split_size_seconds: float = delta.total_seconds() / to
|
|
33
|
+
split_size_rounded: float = round(split_size_seconds / 60) * 60
|
|
34
|
+
split_size = timedelta(seconds=split_size_rounded)
|
|
35
|
+
|
|
36
|
+
for idx in range(to):
|
|
37
|
+
start = start_dt_obj + split_size * idx
|
|
38
|
+
assert start < end_dt_obj
|
|
39
|
+
if idx == to - 1:
|
|
40
|
+
end = end_dt_obj
|
|
41
|
+
else:
|
|
42
|
+
end = start_dt_obj + split_size * (idx + 1) - resolution
|
|
43
|
+
res.append((start, end))
|
|
44
|
+
else:
|
|
45
|
+
if every_ms is None:
|
|
46
|
+
raise ValueError("every_ms cannot be None when to is None")
|
|
47
|
+
split_size = timedelta(milliseconds=every_ms)
|
|
48
|
+
current_start = start_dt_obj
|
|
49
|
+
while current_start < end_dt_obj:
|
|
50
|
+
current_end = min(current_start + split_size - resolution, end_dt_obj)
|
|
51
|
+
res.append((current_start, current_end))
|
|
52
|
+
current_start += split_size
|
|
53
|
+
return res
|
|
54
|
+
def split_list[T](sequence: list[T], every: Optional[int]=None, to: Optional[int]=None) -> list[list[T]]:
|
|
55
|
+
if (every is None) == (to is None):
|
|
56
|
+
raise ValueError("Exactly one of 'every' or 'to' must be provided, not both or neither")
|
|
57
|
+
if len(sequence) == 0:
|
|
58
|
+
return []
|
|
22
59
|
import math
|
|
23
|
-
|
|
24
|
-
|
|
60
|
+
if to is not None:
|
|
61
|
+
every = math.ceil(len(sequence) / to)
|
|
62
|
+
assert every is not None
|
|
25
63
|
res: list[list[T]] = []
|
|
26
|
-
for ix in range(0, len(
|
|
27
|
-
if ix + every < len(
|
|
28
|
-
tmp =
|
|
64
|
+
for ix in range(0, len(sequence), every):
|
|
65
|
+
if ix + every < len(sequence):
|
|
66
|
+
tmp = sequence[ix : ix + every]
|
|
29
67
|
else:
|
|
30
|
-
tmp =
|
|
68
|
+
tmp = sequence[ix : len(sequence)]
|
|
31
69
|
res.append(list(tmp))
|
|
32
70
|
return list(res)
|
|
33
71
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import List, Optional, Union
|
|
4
|
+
from typing import List, Optional, Union, Annotated
|
|
5
5
|
from rich.console import Console
|
|
6
6
|
from rich.panel import Panel
|
|
7
7
|
|
|
8
|
+
import typer
|
|
8
9
|
|
|
9
10
|
def generate_file_checklist(repo_root: Union[str, Path], exclude_dirs: Optional[List[str]] = None) -> Path:
|
|
10
11
|
actual_exclude_dirs: List[str] = [".venv", ".git", "__pycache__", "build", "dist", "*.egg-info"]
|
|
@@ -41,28 +42,27 @@ def generate_file_checklist(repo_root: Union[str, Path], exclude_dirs: Optional[
|
|
|
41
42
|
|
|
42
43
|
print(f"📋 Checklist generated at: {output_path}")
|
|
43
44
|
return output_path
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
parser = argparse.ArgumentParser(description="Generate a markdown file with checkboxes for all .py and .sh files.")
|
|
50
|
-
parser.add_argument("--repo", "-r", type=str, default=str(Path.cwd()), help="Repository root path. Defaults to current working directory.")
|
|
51
|
-
parser.add_argument("--exclude", "-e", nargs="+", type=str, help="Additional directories to exclude (by default excludes .venv, .git, __pycache__, build, dist, *.egg-info)")
|
|
52
|
-
|
|
53
|
-
args = parser.parse_args()
|
|
54
|
-
|
|
45
|
+
def main(
|
|
46
|
+
repo: Annotated[str, typer.Argument(help="Repository root path. Defaults to current working directory.")] = str(Path.cwd()),
|
|
47
|
+
exclude: Annotated[Optional[List[str]], typer.Option("--exclude", "-e", help="Additional directories to exclude (by default excludes .venv, .git, __pycache__, build, dist, *.egg-info)")] = None,
|
|
48
|
+
) -> None:
|
|
55
49
|
exclude_dirs: List[str] = [".venv", ".git", "__pycache__", "build", "dist", "*.egg-info"]
|
|
56
|
-
if
|
|
57
|
-
exclude_dirs.extend(
|
|
58
|
-
if
|
|
50
|
+
if exclude:
|
|
51
|
+
exclude_dirs.extend(exclude)
|
|
52
|
+
if repo == "":
|
|
59
53
|
print("Error: Repository path cannot be empty.")
|
|
60
54
|
return
|
|
61
55
|
|
|
62
|
-
output_path = generate_file_checklist(
|
|
56
|
+
output_path = generate_file_checklist(repo, exclude_dirs)
|
|
63
57
|
console = Console()
|
|
64
58
|
console.print(Panel(f"✅ SUCCESS | Markdown checklist generated successfully!\n📄 File Location: {output_path}", border_style="bold blue", expand=False))
|
|
65
59
|
|
|
66
60
|
|
|
61
|
+
def main_from_parser():
|
|
62
|
+
typer.run(main)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
67
|
if __name__ == "__main__":
|
|
68
|
-
|
|
68
|
+
main_from_parser()
|
|
@@ -16,16 +16,16 @@ machineconfig/cluster/sessions_managers/wt_local.py,sha256=-e4yNxvu6ytI-u1Kihhtn
|
|
|
16
16
|
machineconfig/cluster/sessions_managers/wt_local_manager.py,sha256=LqOuA9fqVDu5mWa04pxY9IUqMR4v-kDQbhZY0simvlQ,24193
|
|
17
17
|
machineconfig/cluster/sessions_managers/wt_remote.py,sha256=XmZV9rLubwxND5UYAS15mAcpzDdXvm4KyubVGYkVBmo,8743
|
|
18
18
|
machineconfig/cluster/sessions_managers/wt_remote_manager.py,sha256=CnnOtPiwLx0pIfs_KlcKnclLSqiDTNzfm8t8sW6nXf0,19764
|
|
19
|
-
machineconfig/cluster/sessions_managers/zellij_local.py,sha256=
|
|
19
|
+
machineconfig/cluster/sessions_managers/zellij_local.py,sha256=NmlW-f1Tl_0vsWOtGT9Lh7dTCCUj4DVRLiizufS-VgE,26131
|
|
20
20
|
machineconfig/cluster/sessions_managers/zellij_local_manager.py,sha256=4ap0Gtd8wOybFc461OItA2kU-1jpgPQUX03s8Zjyk_4,24028
|
|
21
|
-
machineconfig/cluster/sessions_managers/zellij_remote.py,sha256=
|
|
21
|
+
machineconfig/cluster/sessions_managers/zellij_remote.py,sha256=3gz-wgqVW7B-4CgvJq0fiDh8691h4yeK3Xh3CfSPc2s,8749
|
|
22
22
|
machineconfig/cluster/sessions_managers/zellij_remote_manager.py,sha256=T-j1KMV7mDTeGSHC5To0_JmqNtjSR_LVZT9VanP4lyI,8313
|
|
23
23
|
machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py,sha256=CFGcZPFTZQJtFf0OvMUHhadZ0qbImCP3wxvbWYVcVYo,7445
|
|
24
24
|
machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py,sha256=Mitm7mKiKl5lT0OiEUHAqVg2Q21RjsKO1-hpJTHJ5lM,15196
|
|
25
25
|
machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py,sha256=lApUy67_WhfaBXqt0meZSx_QvwiXjN0YLdyE3c7kP_s,6744
|
|
26
26
|
machineconfig/cluster/sessions_managers/wt_utils/session_manager.py,sha256=-PNcYwPqwdNRnLU9QGKxRR9i6ewY02Id-tgnODB_OzQ,12552
|
|
27
27
|
machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py,sha256=EEscow4hsvLJ1roXEXxXg0QUEwetJmTq0VRm_1Vg6L0,9499
|
|
28
|
-
machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py,sha256=
|
|
28
|
+
machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py,sha256=jhnhFDOQ-Z9rZfsKaf5prgkDtxAGaKisX2MmG4LFa04,3112
|
|
29
29
|
machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py,sha256=NciFO886EHSv3Ay30dAaq0cn78VdH8XTIlb8obnrk4A,5260
|
|
30
30
|
machineconfig/cluster/sessions_managers/zellij_utils/monitoring_types.py,sha256=8l8OAfWYy5xv-EaVqtXLqvPo9YaR9i8kFqGMhPzk0nw,2616
|
|
31
31
|
machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py,sha256=4SwH0i9V5Qwugzcewr3uv1Y5mjLhQAXyaGiWtOOjY7E,13696
|
|
@@ -33,7 +33,6 @@ machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py,sha256=I
|
|
|
33
33
|
machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py,sha256=7JLq8HY-NWbJfzHfxaok_o1KrIwzMCK_PUnsdZYfzuA,4929
|
|
34
34
|
machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py,sha256=AtpIoko_ghhOXENGAfgiS2jA4IYBFRMjEbyIy_P6HIM,3758
|
|
35
35
|
machineconfig/cluster/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
machineconfig/cluster/templates/cli_gooey.py,sha256=KUiZDuqmHDkGS7NqwBTzZUbxysgasq-M0DWmwd44vOE,5534
|
|
37
36
|
machineconfig/cluster/templates/cli_trogon.py,sha256=PFWGy8SFYIhT9r3ZV4oIEYfImsQwzAHH_04stPuV5bY,647
|
|
38
37
|
machineconfig/cluster/templates/run_cloud.py,sha256=0o4-v5yFEqvlHzoKDXljRCR5ikx_r5w4oYE5OCtVIK8,2378
|
|
39
38
|
machineconfig/cluster/templates/run_cluster.py,sha256=ZFNl4EDybicedWKX5qBwSSeKKfdV2lQFD_1kcAyjHYM,4691
|
|
@@ -49,9 +48,7 @@ machineconfig/jobs/python/create_bootable_media.py,sha256=KKtcPk0rFLQc4eNVP6nbeY
|
|
|
49
48
|
machineconfig/jobs/python/python_cargo_build_share.py,sha256=RDe1QiTH3vLQ1wjN0kE5NxMIqwB-_WHz6O3svyuH_VE,2133
|
|
50
49
|
machineconfig/jobs/python/python_ve_symlink.py,sha256=SgLPZGtnhZ8L5ms2zEohQkJAzPeBkI3mB4DBHjAmzN0,850
|
|
51
50
|
machineconfig/jobs/python/tasks.py,sha256=hrBDQOnBmcXtauTkicVgC8J2AOGcfdFfyx0K8eI6Coc,150
|
|
52
|
-
machineconfig/jobs/python/vscode/api.py,sha256=
|
|
53
|
-
machineconfig/jobs/python/vscode/link_ve.py,sha256=1tXXgfWcl18K6avdhm2V7zng18opR9pfI0PSLxMFbiQ,1439
|
|
54
|
-
machineconfig/jobs/python/vscode/select_interpreter.py,sha256=6YQtB1SAJIxf7EHqzT2xn2_z_xqbygSCXOtgv6omc8M,2677
|
|
51
|
+
machineconfig/jobs/python/vscode/api.py,sha256=QNZz6zqquAk4Bd-Zz5Id0qvOM6uFB5LyyKlGcHdcIJA,1631
|
|
55
52
|
machineconfig/jobs/python/vscode/sync_code.py,sha256=b7vhebl3TH0wDBJ_eRg3DhY7veMqdqBA-rCkGZxSf5o,1898
|
|
56
53
|
machineconfig/jobs/python_custom_installers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
54
|
machineconfig/jobs/python_custom_installers/docker.py,sha256=xVNmcEJDuMB7-jRf1dGjNs-51uB6FwOgHKTHNJt8Eiw,2407
|
|
@@ -162,26 +159,26 @@ machineconfig/scripts/linux/wifi_conn,sha256=X4TH3OvcVZfOveSbF9WW8uXb4U_G7ZSnCER
|
|
|
162
159
|
machineconfig/scripts/linux/z_ls,sha256=ATZtu0ccN3AKvAOxkwLq1xgQjJ3en5byEWJ3Q8afnNg,3340
|
|
163
160
|
machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
164
161
|
machineconfig/scripts/python/choose_wezterm_theme.py,sha256=Hlu_EOQhLM6wYdAdY25jcqEK11BkVwQYwkz04xnIBVU,3397
|
|
165
|
-
machineconfig/scripts/python/cloud_copy.py,sha256=
|
|
166
|
-
machineconfig/scripts/python/cloud_manager.py,sha256=
|
|
167
|
-
machineconfig/scripts/python/cloud_mount.py,sha256=
|
|
162
|
+
machineconfig/scripts/python/cloud_copy.py,sha256=_pxA8o3ar5vH9DkrAdwafHcZMiqNCbY_IfNzKCOMJ5k,8395
|
|
163
|
+
machineconfig/scripts/python/cloud_manager.py,sha256=YN0DYLzPKtMBaks-EAVwFmkCu3XeHWMr1D21uqX5dDk,3429
|
|
164
|
+
machineconfig/scripts/python/cloud_mount.py,sha256=RFMzRUep2D5HtVXANIi-pab3EkI-W8P1IJ32k1W7xQA,6756
|
|
168
165
|
machineconfig/scripts/python/cloud_repo_sync.py,sha256=GBhdUu9BJwhLYmhxxtvqJGLy7xKdQcnH9kkL4jcbzEE,9502
|
|
169
|
-
machineconfig/scripts/python/cloud_sync.py,sha256=
|
|
170
|
-
machineconfig/scripts/python/croshell.py,sha256=
|
|
166
|
+
machineconfig/scripts/python/cloud_sync.py,sha256=RWGpAfJ9fnN18yNBSgN44dzA38Hmd4879JL5r2pcyrM,3514
|
|
167
|
+
machineconfig/scripts/python/croshell.py,sha256=tYc8MUVcbvSH8JZxc273z9Kr8LitoKxI7ZdFN-_Ms-s,8945
|
|
171
168
|
machineconfig/scripts/python/devops.py,sha256=ws9AzqD-poLndODMFTe5bii3JNsPMsi0BuJJ11ZbPSw,5658
|
|
172
169
|
machineconfig/scripts/python/devops_add_identity.py,sha256=JfN3ZrYMCgmt4ks_VCfnV9BIIHAsOYO3E0W0wZ15FR8,3791
|
|
173
170
|
machineconfig/scripts/python/devops_add_ssh_key.py,sha256=KaoX83KltBsmutfKhSfZjd7nP_R1hJ2OLAWRhbswO7o,6889
|
|
174
171
|
machineconfig/scripts/python/devops_backup_retrieve.py,sha256=jZe5Vki7E2GCMG8hvqUZeOONFC4cNzISoGzq_dMG4GA,5601
|
|
175
172
|
machineconfig/scripts/python/devops_devapps_install.py,sha256=Q2suPkfwwdtIN3mjxH6tGZLYC7tZVxdxrGW7d9phiPA,9972
|
|
176
173
|
machineconfig/scripts/python/devops_update_repos.py,sha256=c5qBc9cuTGDEqDHufkjDT4d_vvJsswv3tlqk9MAulYk,8063
|
|
177
|
-
machineconfig/scripts/python/dotfile.py,sha256=
|
|
178
|
-
machineconfig/scripts/python/fire_agents.py,sha256=
|
|
174
|
+
machineconfig/scripts/python/dotfile.py,sha256=SRcX-9Ak1jRvF-killBTTm2IWcsNxfiLucH6ZsytAFA,2202
|
|
175
|
+
machineconfig/scripts/python/fire_agents.py,sha256=Hn27ZGWBRlu3mDyJPf_qg_m0i3AbWbWpA-Ce1VeZjUY,9207
|
|
179
176
|
machineconfig/scripts/python/fire_agents_help_launch.py,sha256=sTdjNz2pDinDMMjUAMN7OqH-KAUeHh6Aihr_zUvtM6k,6128
|
|
180
177
|
machineconfig/scripts/python/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
|
|
181
178
|
machineconfig/scripts/python/fire_agents_load_balancer.py,sha256=QPiCbQq9j5REHStPdYqQcGNkz_rp5CjotqOpMY3v5TM,2099
|
|
182
|
-
machineconfig/scripts/python/fire_jobs.py,sha256=
|
|
183
|
-
machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=
|
|
184
|
-
machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=
|
|
179
|
+
machineconfig/scripts/python/fire_jobs.py,sha256=qD_9JtoNTjOjAyX0_QPysfHNQ-qq55t-Tv9ctEK17MI,20569
|
|
180
|
+
machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=VsyPgjWRByZgXz65vmmpyR-2mJo6KwNgwrWFYd3EYqc,2075
|
|
181
|
+
machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=LHLyp5HxKwut19x2OYKQq8gy4EKon6wNb-jlxx5DoVM,4134
|
|
185
182
|
machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
186
183
|
machineconfig/scripts/python/ftpx.py,sha256=vqwhfkg3jVaAdjlWvrcPms2pUD7_c370jn2W6o5XArM,10269
|
|
187
184
|
machineconfig/scripts/python/get_zellij_cmd.py,sha256=e35-18hoXM9N3PFbvbizfkNY_-63iMicieWE3TbGcCQ,576
|
|
@@ -191,21 +188,24 @@ machineconfig/scripts/python/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkul
|
|
|
191
188
|
machineconfig/scripts/python/mount_ssh.py,sha256=rGY2pgtlnWMi0Rrge1aCdjtfbULrj2cyaStDoX-y2w4,2236
|
|
192
189
|
machineconfig/scripts/python/onetimeshare.py,sha256=bmGsNnskym5OWfIhpOfZG5jq3m89FS0a6dF5Sb8LaZM,2539
|
|
193
190
|
machineconfig/scripts/python/pomodoro.py,sha256=SPkfeoZGv8rylGiOyzQ7UK3aXZ3G2FIOuGkSuBUggOI,2019
|
|
194
|
-
machineconfig/scripts/python/repos.py,sha256=
|
|
191
|
+
machineconfig/scripts/python/repos.py,sha256=vFlRA9BHXJau5BcIvQXShML3G6Xgv6aVuMqECo9PtfE,4258
|
|
192
|
+
machineconfig/scripts/python/repos_helper_action.py,sha256=f0vFjPj9WEA361961ux3SIEg9riVGHtyuf6BnO6lnvU,13336
|
|
195
193
|
machineconfig/scripts/python/repos_helper_clone.py,sha256=xW5YZEoNt3k7h9NIULhUhOnh53-B63eiXF2FjOl1IKQ,5535
|
|
196
194
|
machineconfig/scripts/python/repos_helper_record.py,sha256=YEEQORfEiLddOIIgePo5eEkyQUFruFg3kc8npMvRL-o,10927
|
|
197
195
|
machineconfig/scripts/python/repos_helper_update.py,sha256=AYyKIB7eQ48yoYmFjydIhRI1lV39TBv_S4_LCa-oKuQ,11042
|
|
198
|
-
machineconfig/scripts/python/scheduler.py,sha256=
|
|
196
|
+
machineconfig/scripts/python/scheduler.py,sha256=rKhssuxkD697EY6qaV6CSdNhxpAQLDWO4fE8GMCQ9FA,3061
|
|
197
|
+
machineconfig/scripts/python/share_terminal.py,sha256=divO0lleaX1l90ta4muv_ogUB7zfdDCFxbTSmVIZqJw,1116
|
|
199
198
|
machineconfig/scripts/python/snapshot.py,sha256=aDvKeoniZaeTSNv9zWBUajaj2yagAxVdfuvO1_tgq5Y,1026
|
|
200
|
-
machineconfig/scripts/python/start_slidev.py,sha256=
|
|
201
|
-
machineconfig/scripts/python/start_terminals.py,sha256=
|
|
199
|
+
machineconfig/scripts/python/start_slidev.py,sha256=U5ujAL7R5Gd5CzFReTsnF2SThjY91aFBg0Qz_MMl6U4,4573
|
|
200
|
+
machineconfig/scripts/python/start_terminals.py,sha256=DRWbMZumhPmL0DvvsCsbRNFL5AVQn1SgaziafTio3YQ,6149
|
|
201
|
+
machineconfig/scripts/python/t4.py,sha256=cZ45iWzS254V5pmVvq8wCw7jAuDhzr8G2Arzay76saU,316
|
|
202
202
|
machineconfig/scripts/python/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
|
|
203
203
|
machineconfig/scripts/python/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
|
|
204
|
-
machineconfig/scripts/python/wifi_conn.py,sha256=
|
|
205
|
-
machineconfig/scripts/python/wsl_windows_transfer.py,sha256=
|
|
204
|
+
machineconfig/scripts/python/wifi_conn.py,sha256=4GdLhgma9GRmZ6OFg3oxOX-qY3sr45njPckozlpM_A0,15566
|
|
205
|
+
machineconfig/scripts/python/wsl_windows_transfer.py,sha256=WDZccDZwi4L8cNXqvZYWYQG4_j2SyD-qA2Bwlr4bZUc,3405
|
|
206
206
|
machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
207
207
|
machineconfig/scripts/python/ai/generate_files.py,sha256=Vfjgd0skJu-WTgqUxmOVFzaNMfSFBaFmY5oGGVY7MZY,2860
|
|
208
|
-
machineconfig/scripts/python/ai/initai.py,sha256=
|
|
208
|
+
machineconfig/scripts/python/ai/initai.py,sha256=FJriMm1-x44xx6yEnqgI-F5lfRw44xleOluv4TcRs0I,2237
|
|
209
209
|
machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1,sha256=FqoUSv1_DqWXUE5O7RxSo7L86FcNtPK1lYoytgOrf90,5124
|
|
210
210
|
machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=6dCznJmao9T0BQtltBEyGWkDTMmGAmTSmar8Vl791gY,4665
|
|
211
211
|
machineconfig/scripts/python/ai/solutions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -233,7 +233,7 @@ machineconfig/scripts/python/ai/solutions/opencode/opencode.py,sha256=AbpHGcgLb-
|
|
|
233
233
|
machineconfig/scripts/python/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
234
234
|
machineconfig/scripts/python/helpers/cloud_helpers.py,sha256=GA-bxXouUmknk9fyQAsPT-Xl3RG9-yBed71a2tu9Pig,4914
|
|
235
235
|
machineconfig/scripts/python/helpers/helpers2.py,sha256=ZdqeF1MLlaBRwoqsQAqnHi4b8rW0byFCBnbyCrPKkoA,7336
|
|
236
|
-
machineconfig/scripts/python/helpers/helpers4.py,sha256=
|
|
236
|
+
machineconfig/scripts/python/helpers/helpers4.py,sha256=Iot8Pb9LeaxpSw1uZzx0m3Aswa30QV-tGLrtJtwiGmQ,7635
|
|
237
237
|
machineconfig/scripts/python/helpers/helpers5.py,sha256=dPBvA9Tcyx9TMgM6On49A1CueGMhBdRzikDnlJGf3J0,1123
|
|
238
238
|
machineconfig/scripts/python/helpers/repo_sync_helpers.py,sha256=39Q3XV8Zx0Y6_iWUtbwDIQI8riqLPSZ008zjqx-Gd-g,5328
|
|
239
239
|
machineconfig/scripts/windows/choose_wezterm_theme.ps1,sha256=LiXJ0a4LKjb6E-oH_bAg6DjegV4SqDUdiMp_svGCFlI,95
|
|
@@ -394,7 +394,7 @@ machineconfig/setup_windows/wt_and_pwsh/install_fonts.ps1,sha256=JsQfGAMkvirhiUm
|
|
|
394
394
|
machineconfig/setup_windows/wt_and_pwsh/install_nerd_fonts.py,sha256=o9K7QMIw1cBdMxLQsOk64MAy1YgNNhPRYura8cdTLXI,4707
|
|
395
395
|
machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=rZZJamy3YxAeJhdMIFR6IWtjgn1u1HUdbk1J24NtryE,6116
|
|
396
396
|
machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
397
|
-
machineconfig/utils/accessories.py,sha256=
|
|
397
|
+
machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VBtzgQs,4340
|
|
398
398
|
machineconfig/utils/code.py,sha256=pKPHInKgXJWeACVbxuE7sMdYeZCbNttaYCsfonGhFfc,4464
|
|
399
399
|
machineconfig/utils/installer.py,sha256=_sjaIqqHN-7n3mYD-iOIli6Bn2792EjOwE-JC528Qfo,11936
|
|
400
400
|
machineconfig/utils/io.py,sha256=6LuQMT7CG26atx5_0P30Ru0zHgLwuvpKHfZLUWIjS-U,2873
|
|
@@ -412,7 +412,7 @@ machineconfig/utils/terminal.py,sha256=IXYhZ5a0qA6X9CdMT9S7IEKQtJXrDzmiDUGd4C85-
|
|
|
412
412
|
machineconfig/utils/upgrade_packages.py,sha256=H96zVJEWXJW07nh5vhjuSCrPtXGqoUb7xeJsFYYdmCI,3330
|
|
413
413
|
machineconfig/utils/ve.py,sha256=qSUnRto6NI4-Hru0tuz4YzCZzaWAce5Xc__DV0sxsrc,2397
|
|
414
414
|
machineconfig/utils/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
415
|
-
machineconfig/utils/ai/generate_file_checklist.py,sha256=
|
|
415
|
+
machineconfig/utils/ai/generate_file_checklist.py,sha256=ajbmhcBToRugl75c_KZRq2XJumxKgIqQhyf7_YtF5q4,2729
|
|
416
416
|
machineconfig/utils/cloud/onedrive/setup_oauth.py,sha256=ZTVkqgrwbV_EoPvyT8dyOTUE0ur3BW4sa9o6QYtt5Bo,2341
|
|
417
417
|
machineconfig/utils/cloud/onedrive/transaction.py,sha256=m-aNcnWj_gfZVvJOSpkdIqjZxU_3nXx2CA-qKbQgP3I,26232
|
|
418
418
|
machineconfig/utils/installer_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -422,8 +422,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=CCs5ebomW1ac
|
|
|
422
422
|
machineconfig/utils/schemas/installer/installer_types.py,sha256=iAzcALc9z_FAQE9iuGHfX6Z0B1_n3Gt6eC0d6heYik0,599
|
|
423
423
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=OmiOX9xtakPz4l6IobWnpFHpbn95fitEE9q0YL1WxjQ,617
|
|
424
424
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
425
|
-
machineconfig-3.
|
|
426
|
-
machineconfig-3.
|
|
427
|
-
machineconfig-3.
|
|
428
|
-
machineconfig-3.
|
|
429
|
-
machineconfig-3.
|
|
425
|
+
machineconfig-3.86.dist-info/METADATA,sha256=-bdJW9-zCFRkinXlSz0koiGWe1XOoRl-399jJhh-IIY,6998
|
|
426
|
+
machineconfig-3.86.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
427
|
+
machineconfig-3.86.dist-info/entry_points.txt,sha256=rSx_9gXd2stziS1OkNy__jF647hrRxRiF6zolLUELc4,1153
|
|
428
|
+
machineconfig-3.86.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
429
|
+
machineconfig-3.86.dist-info/RECORD,,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
2
|
choose_wezterm_theme = machineconfig.scripts.python.choose_wezterm_theme:main
|
|
3
3
|
cloud_copy = machineconfig.scripts.python.cloud_copy:arg_parser
|
|
4
|
-
cloud_mount = machineconfig.scripts.python.cloud_mount:
|
|
4
|
+
cloud_mount = machineconfig.scripts.python.cloud_mount:arg_parser
|
|
5
5
|
cloud_repo_sync = machineconfig.scripts.python.cloud_repo_sync:args_parser
|
|
6
|
-
cloud_sync = machineconfig.scripts.python.cloud_sync:
|
|
7
|
-
croshell = machineconfig.scripts.python.croshell:
|
|
6
|
+
cloud_sync = machineconfig.scripts.python.cloud_sync:arg_parser
|
|
7
|
+
croshell = machineconfig.scripts.python.croshell:arg_parser
|
|
8
8
|
devops = machineconfig.scripts.python.devops:args_parser
|
|
9
9
|
fire = machineconfig.scripts.python.fire_jobs:main_from_parser
|
|
10
10
|
fire_agents = machineconfig.scripts.python.fire_agents:main
|
|
@@ -15,5 +15,5 @@ kill_process = machineconfig.utils.procs:main
|
|
|
15
15
|
mount_nfs = machineconfig.scripts.python.mount_nfs:main
|
|
16
16
|
mount_nw_drive = machineconfig.scripts.python.mount_nw_drive:main
|
|
17
17
|
repos = machineconfig.scripts.python.repos:main_from_parser
|
|
18
|
-
start_slidev = machineconfig.scripts.python.start_slidev:
|
|
19
|
-
wifi_conn = machineconfig.scripts.python.wifi_conn:
|
|
18
|
+
start_slidev = machineconfig.scripts.python.start_slidev:arg_parser
|
|
19
|
+
wifi_conn = machineconfig.scripts.python.wifi_conn:arg_parser
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# """Gooey
|
|
2
|
-
# """
|
|
3
|
-
|
|
4
|
-
# from argparse import ArgumentParser
|
|
5
|
-
# # from gooey import Gooey #, GooeyParser
|
|
6
|
-
# # from machineconfig.cluster.distribute import Cluster, WorkloadParams
|
|
7
|
-
# from machineconfig.cluster.remote_machine import RemoteMachineConfig
|
|
8
|
-
# # from machineconfig.cluster.utils import expensive_function
|
|
9
|
-
# from machineconfig.utils.utils import DEFAULTS_PATH
|
|
10
|
-
# from machineconfig.utils.utils2 import read_ini
|
|
11
|
-
# # from typing import Any, Optional
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# @Gooey(program_name="Cluster Launcher", program_description='Cofigure remote cluster and launch jobs.') # type: ignore
|
|
15
|
-
# def main() -> RemoteMachineConfig:
|
|
16
|
-
# # parser = GooeyParser(description='Example of Gooey\'s basic functionality')
|
|
17
|
-
# parser = ArgumentParser(description='Cluster Launcher')
|
|
18
|
-
# from machineconfig.scripts.python.cloud_mount import get_rclone_config
|
|
19
|
-
# cloud_names = get_rclone_config().sections()
|
|
20
|
-
# # job_id=, base_dir="",
|
|
21
|
-
# parser.add_argument('Description', help='The file you want to process', default="Description of running func on remotes")
|
|
22
|
-
|
|
23
|
-
# # # execution behaviour
|
|
24
|
-
# # wrap_in_try_except=True
|
|
25
|
-
# parser.add_argument('-w', '--wrap_in_try_except', help='Wrap in try except', action='store_true', default=False)
|
|
26
|
-
# # pudb=False
|
|
27
|
-
# parser.add_argument('-p', '--pudb', help='Use pudb', action='store_true', default=False)
|
|
28
|
-
# # pdb=False
|
|
29
|
-
# parser.add_argument('-d', '--pdb', help='Use pdb', action='store_true', default=False)
|
|
30
|
-
# # interactive=True
|
|
31
|
-
# parser.add_argument('-i', '--interactive', help='Interactive', action='store_true', default=False)
|
|
32
|
-
# # ipython=True
|
|
33
|
-
# parser.add_argument('-y', '--ipython', help='Use ipython', action='store_true', default=False)
|
|
34
|
-
|
|
35
|
-
# # # resources
|
|
36
|
-
# # lock_resources=True
|
|
37
|
-
# parser.add_argument('-l', '--lock_resources', help='Lock resources', action='store_true', default=False)
|
|
38
|
-
# # max_simulataneous_jobs=2
|
|
39
|
-
# parser.add_argument('-m', '--max_simulataneous_jobs', help='Max simultaneous jobs', type=int, default=2)
|
|
40
|
-
# # parallelize=False
|
|
41
|
-
# # parser.add_argument('-a', '--parallelize', help='Parallelize', action='store_true', default=False)
|
|
42
|
-
|
|
43
|
-
# # # data
|
|
44
|
-
# # copy_repo = True
|
|
45
|
-
# # parser.add_argument('-c', '--copy_repo', help='Copy repo', action='store_true', default=True)
|
|
46
|
-
# # update_repo=False
|
|
47
|
-
# parser.add_argument('-u', '--update_repo', help='Update repo', action='store_true', default=False)
|
|
48
|
-
# # install_repo=False
|
|
49
|
-
# # parser.add_argument('-n', '--install_repo', help='Install repo', action='store_true', default=False)
|
|
50
|
-
# # update_essential_repos=True
|
|
51
|
-
# parser.add_argument('-e', '--update_essential_repos', help='Update essential repos', action='store_true', default=True)
|
|
52
|
-
# # transfer_method="sftp"
|
|
53
|
-
# # parser.add_argument('-t', '--transfer_method', help='Transfer method', choices=['sftp', 'cloud'], default='sftp')
|
|
54
|
-
# # open_console=True
|
|
55
|
-
# # parser.add_argument('-o', '--open_console', help='Open console', action='store_true', default=True)
|
|
56
|
-
|
|
57
|
-
# # # remote machine behaviour
|
|
58
|
-
# parser.add_argument('cloud_name', help='Cloud Rclone Config Name', default="oduq1", choices=cloud_names)
|
|
59
|
-
# parser.add_argument('-v', '--notify_upon_completion', help='Notify upon completion', action='store_true', default=True)
|
|
60
|
-
|
|
61
|
-
# try:
|
|
62
|
-
# section = read_ini(DEFAULTS_PATH)['general']
|
|
63
|
-
# to_email = section['to_email']
|
|
64
|
-
# email_config_name = section['email_config_name']
|
|
65
|
-
# except (FileNotFoundError, KeyError, IndexError):
|
|
66
|
-
# to_email = 'random@email.com'
|
|
67
|
-
# email_config_name = 'enaut'
|
|
68
|
-
|
|
69
|
-
# parser.add_argument('-z', '--to_email', help='To email', default=to_email)
|
|
70
|
-
# parser.add_argument('-f', '--email_config_name', help='Email config name', default=email_config_name)
|
|
71
|
-
# parser.add_argument('-k', '--kill_on_completion', help='Kill terminal tab/pane for this job on completion', action='store_true', default=False)
|
|
72
|
-
# parser.add_argument('split', help='How many jobs to split into', type=int, default=3)
|
|
73
|
-
|
|
74
|
-
# # https://github.com/chriskiehl/GooeyExamples/blob/master/examples/FilterableDropdown.py
|
|
75
|
-
# args = parser.parse_args()
|
|
76
|
-
|
|
77
|
-
# from machineconfig.cluster.self_ssh import SelfSSH
|
|
78
|
-
# config = RemoteMachineConfig(
|
|
79
|
-
# # connection
|
|
80
|
-
# ssh_obj=SelfSSH(),
|
|
81
|
-
# # ssh_params=None,
|
|
82
|
-
# description=args.Description,
|
|
83
|
-
# # job_id=, base_dir="",
|
|
84
|
-
# # data
|
|
85
|
-
# copy_repo=False, # args.copy_repo,
|
|
86
|
-
# update_repo=args.update_repo,
|
|
87
|
-
# install_repo=True, # args.install_repo,
|
|
88
|
-
# update_essential_repos=args.update_essential_repos,
|
|
89
|
-
# data=[],
|
|
90
|
-
# transfer_method="cloud", # "args.transfer_method,
|
|
91
|
-
# cloud_name=args.cloud_name,
|
|
92
|
-
# # remote machine behaviour
|
|
93
|
-
# # open_console=args.open_console,
|
|
94
|
-
# notify_upon_completion=args.notify_upon_completion,
|
|
95
|
-
# to_email=args.to_email,
|
|
96
|
-
# email_config_name=args.email_config_name,
|
|
97
|
-
# kill_on_completion=args.kill_on_completion,
|
|
98
|
-
# workload_params=None,
|
|
99
|
-
# launch_method="cloud_manager",
|
|
100
|
-
# # execution behaviour
|
|
101
|
-
# ipython=args.ipython,
|
|
102
|
-
# interactive=args.interactive,
|
|
103
|
-
# pdb=args.pdb,
|
|
104
|
-
# pudb=args.pudb,
|
|
105
|
-
# wrap_in_try_except=args.wrap_in_try_except,
|
|
106
|
-
# # resources
|
|
107
|
-
# lock_resources=args.lock_resources,
|
|
108
|
-
# max_simulataneous_jobs=args.max_simulataneous_jobs,
|
|
109
|
-
# parallelize=False, # args.parallelize,
|
|
110
|
-
# )
|
|
111
|
-
# return config
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
# if __name__ == '__main__':
|
|
115
|
-
# main()
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"""VScode task to set interpreter"""
|
|
2
|
-
|
|
3
|
-
# import os
|
|
4
|
-
# import json
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
import argparse
|
|
7
|
-
# import platform
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def select_interpreter(workspace_root: str):
|
|
11
|
-
print(f"""
|
|
12
|
-
{"=" * 150}
|
|
13
|
-
🔗 VSCODE VE LINKER | Linking virtual environment for VS Code
|
|
14
|
-
📂 Workspace: {workspace_root}
|
|
15
|
-
{"=" * 150}
|
|
16
|
-
""")
|
|
17
|
-
|
|
18
|
-
path = Path(workspace_root).joinpath(".ve_path")
|
|
19
|
-
|
|
20
|
-
if not path.exists():
|
|
21
|
-
print(f"""
|
|
22
|
-
{"⚠️" * 20}
|
|
23
|
-
❌ ERROR | Could not find .ve_path file in workspace
|
|
24
|
-
📂 Expected at: {path}
|
|
25
|
-
{"⚠️" * 20}
|
|
26
|
-
""")
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
with open(path, "r", encoding="utf-8") as f:
|
|
30
|
-
ve_path = Path(f.read().strip()).expanduser()
|
|
31
|
-
|
|
32
|
-
venv_link = Path(workspace_root).joinpath(".venv")
|
|
33
|
-
|
|
34
|
-
if venv_link.exists() and not venv_link.is_symlink():
|
|
35
|
-
print(f"""
|
|
36
|
-
{"⚠️" * 20}
|
|
37
|
-
❌ ERROR | .venv already exists and is not a symlink
|
|
38
|
-
📂 Path: {venv_link}
|
|
39
|
-
{"⚠️" * 20}
|
|
40
|
-
""")
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
venv_link.symlink_to(target=ve_path.expanduser().absolute())
|
|
44
|
-
|
|
45
|
-
print(f"""
|
|
46
|
-
{"=" * 150}
|
|
47
|
-
✅ SUCCESS | Virtual environment linked successfully
|
|
48
|
-
🔗 Link: {venv_link}
|
|
49
|
-
🎯 Target: {ve_path.expanduser().absolute()}
|
|
50
|
-
{"=" * 150}
|
|
51
|
-
""")
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def main():
|
|
55
|
-
parser = argparse.ArgumentParser(description="Link ve from repo to ve location.")
|
|
56
|
-
parser.add_argument("workspace_path", type=str, help="The workspace path")
|
|
57
|
-
|
|
58
|
-
args = parser.parse_args()
|
|
59
|
-
select_interpreter(args.workspace_path)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if __name__ == "__main__":
|
|
63
|
-
main()
|