machineconfig 3.82__py3-none-any.whl → 3.85__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.

Files changed (32) hide show
  1. machineconfig/cluster/sessions_managers/zellij_local.py +2 -2
  2. machineconfig/cluster/sessions_managers/zellij_remote.py +2 -2
  3. machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +2 -2
  4. machineconfig/jobs/python/vscode/api.py +8 -7
  5. machineconfig/scripts/python/ai/initai.py +1 -11
  6. machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +115 -0
  7. machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +78 -11
  8. machineconfig/scripts/python/cloud_copy.py +33 -27
  9. machineconfig/scripts/python/cloud_manager.py +0 -2
  10. machineconfig/scripts/python/cloud_mount.py +13 -10
  11. machineconfig/scripts/python/cloud_sync.py +30 -28
  12. machineconfig/scripts/python/croshell.py +46 -53
  13. machineconfig/scripts/python/dotfile.py +16 -16
  14. machineconfig/scripts/python/fire_jobs.py +32 -16
  15. machineconfig/scripts/python/fire_jobs_args_helper.py +43 -16
  16. machineconfig/scripts/python/helpers/helpers4.py +0 -2
  17. machineconfig/scripts/python/scheduler.py +0 -1
  18. machineconfig/scripts/python/share_terminal.py +41 -0
  19. machineconfig/scripts/python/start_slidev.py +15 -13
  20. machineconfig/scripts/python/start_terminals.py +19 -19
  21. machineconfig/scripts/python/t4.py +16 -0
  22. machineconfig/scripts/python/wifi_conn.py +16 -14
  23. machineconfig/scripts/python/wsl_windows_transfer.py +23 -29
  24. machineconfig/utils/ai/generate_file_checklist.py +17 -17
  25. {machineconfig-3.82.dist-info → machineconfig-3.85.dist-info}/METADATA +1 -1
  26. {machineconfig-3.82.dist-info → machineconfig-3.85.dist-info}/RECORD +29 -29
  27. {machineconfig-3.82.dist-info → machineconfig-3.85.dist-info}/entry_points.txt +5 -5
  28. machineconfig/cluster/templates/cli_gooey.py +0 -115
  29. machineconfig/jobs/python/vscode/link_ve.py +0 -63
  30. machineconfig/jobs/python/vscode/select_interpreter.py +0 -87
  31. {machineconfig-3.82.dist-info → machineconfig-3.85.dist-info}/WHEEL +0 -0
  32. {machineconfig-3.82.dist-info → machineconfig-3.85.dist-info}/top_level.txt +0 -0
@@ -28,7 +28,8 @@ Usage examples:
28
28
 
29
29
  """
30
30
 
31
- import argparse
31
+ from typing import Annotated
32
+ import typer
32
33
  import configparser
33
34
  from pathlib import Path
34
35
  import os
@@ -262,24 +263,21 @@ def manual_network_selection() -> bool:
262
263
  return False
263
264
 
264
265
 
265
- def main():
266
+ def main(
267
+ ssid: Annotated[str, typer.Option("-n", "--ssid", help="🔗 SSID of WiFi (from config)")] = "MyPhoneHotSpot",
268
+ manual: Annotated[bool, typer.Option("-m", "--manual", help="🔍 Manual network selection mode")] = False,
269
+ list_: Annotated[bool, typer.Option("-l", "--list", help="📡 List available networks only")] = False,
270
+ ) -> None:
266
271
  """Main function with fallback network selection"""
267
272
  console.print(Panel("📶 Welcome to the WiFi Connector Tool", title="[bold blue]WiFi Connection[/bold blue]", border_style="blue"))
268
273
 
269
- parser = argparse.ArgumentParser(description="WiFi Connector")
270
- parser.add_argument("-n", "--ssid", help="🔗 SSID of WiFi (from config)", default="MyPhoneHotSpot")
271
- parser.add_argument("-m", "--manual", action="store_true", help="🔍 Manual network selection mode")
272
- parser.add_argument("-l", "--list", action="store_true", help="📡 List available networks only")
273
-
274
- args = parser.parse_args()
275
-
276
274
  # If user just wants to list networks
277
- if args.list:
275
+ if list_:
278
276
  display_available_networks()
279
277
  return
280
278
 
281
279
  # If user wants manual mode, skip config and go straight to selection
282
- if args.manual:
280
+ if manual:
283
281
  console.print("[blue]🔍 Manual network selection mode[/blue]")
284
282
  if manual_network_selection():
285
283
  console.print("[green]🎉 Successfully connected![/green]")
@@ -288,9 +286,9 @@ def main():
288
286
  return
289
287
 
290
288
  # Try to connect using configuration first
291
- console.print(f"[blue]🔍 Attempting to connect to configured network: {args.ssid}[/blue]")
289
+ console.print(f"[blue]🔍 Attempting to connect to configured network: {ssid}[/blue]")
292
290
 
293
- if try_config_connection(args.ssid):
291
+ if try_config_connection(ssid):
294
292
  console.print("[green]🎉 Successfully connected using configuration![/green]")
295
293
  return
296
294
 
@@ -306,6 +304,10 @@ def main():
306
304
  console.print("[blue]👋 Goodbye![/blue]")
307
305
 
308
306
 
307
+ def arg_parser() -> None:
308
+ typer.run(main)
309
+
310
+
309
311
  def get_current_wifi_name() -> str:
310
312
  """Get the name of the currently connected WiFi network"""
311
313
  console.print("\n[blue]🔍 Checking current WiFi connection...[/blue]")
@@ -413,4 +415,4 @@ def create_new_connection(name: str, ssid: str, password: str):
413
415
 
414
416
 
415
417
  if __name__ == "__main__":
416
- main()
418
+ arg_parser()
@@ -1,7 +1,8 @@
1
1
  """TWSL"""
2
2
 
3
3
  from machineconfig.utils.path_extended import PathExtended as PathExtended
4
- import argparse
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
- parser = argparse.ArgumentParser(
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
- # positional argument
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
- path.copy(folder=WSL_FROM_WIN.joinpath(UserName).joinpath(path.rel2home().parent), overwrite=True) # the following works for files and folders alike.
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
- path.copy(folder=WIN_FROM_WSL.joinpath(UserName).joinpath(path.rel2home().parent), overwrite=True)
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
- port = int(args.port) if args.port else (2222 if system == "Windows" else 22)
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=port, sshkey=args.sshkey)
55
+ ssh = SSH(hostname=hostname, username=username, port=port_int, sshkey=sshkey)
66
56
  print("🌐 Initiating SSH transfer...")
67
- ssh.copy_from_here(source=path, target=args.destination, z=args.zip_first)
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
- main()
66
+ arg_parser()
@@ -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
- def main() -> None:
47
- import argparse
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 args.exclude:
57
- exclude_dirs.extend(args.exclude)
58
- if args.repo == "":
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(args.repo, exclude_dirs)
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
- main()
68
+ main_from_parser()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 3.82
3
+ Version: 3.85
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -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=Le8QO60NGnE4Um54R26qosxq88ZeMtsBJ4xWd-obLKw,26131
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=f2bLNbhF0zZEuaM3JLttSvTLxjWidAjVTLtGVhrec9o,8749
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=YPRUfV32_fY96SgbUHN7g2JEPQ3na6ZUg6DZePPQXRE,3112
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=YTKWxdRwPI9_1iqUhrUVPeS96aqE9rw1YNhIjBwGWTE,1675
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,25 +159,25 @@ 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=d3gBSPBCtNCRDANpzUoCJBM3kHBarwizyZo8dkL_BXQ,8553
166
- machineconfig/scripts/python/cloud_manager.py,sha256=MAVOKqXGxnlMaQGEv6k-q_PrgN0at6J8qQDhPiH2lI8,3488
167
- machineconfig/scripts/python/cloud_mount.py,sha256=PLTPC9aH6v5g9lTJ8jFBBxz8ZGAuWo4sRU4FXfd1koA,6816
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=RfgrEPGg_LrIaY3hfLDHsK8blrZvyPsoN66X0Z3WeCw,3859
170
- machineconfig/scripts/python/croshell.py,sha256=tDQaG4yxs_53Mvr9Fzc-HLuG-XVIBgcR3RRfJ4mxJhY,9561
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=1a4THWmfGXiJHjWGFf1Qbp6vrMEGIkonIofOcUVic90,2260
174
+ machineconfig/scripts/python/dotfile.py,sha256=SRcX-9Ak1jRvF-killBTTm2IWcsNxfiLucH6ZsytAFA,2202
178
175
  machineconfig/scripts/python/fire_agents.py,sha256=_k1CcPaAp3B7h72tSczFDbLsqTg6FmPDgxxU-GjRHWA,9179
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=W7JDckAWrpHlB3WHpULpZP3M22ORxvLO-6lcnRloHX8,20119
183
- machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=CeXmx0FJZlUSsQHcUmvHM2dQBmKcTNtTkha5PHaQQhc,1505
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
184
181
  machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=Hj77uKgmNKSEBtnW0oCdRBwdKEuhzPxX1p81mRTBibo,3314
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
@@ -195,18 +192,21 @@ machineconfig/scripts/python/repos.py,sha256=gU1gmYmiGTGDlZyIj3b1bC78yV5XZSXEkDD
195
192
  machineconfig/scripts/python/repos_helper_clone.py,sha256=xW5YZEoNt3k7h9NIULhUhOnh53-B63eiXF2FjOl1IKQ,5535
196
193
  machineconfig/scripts/python/repos_helper_record.py,sha256=YEEQORfEiLddOIIgePo5eEkyQUFruFg3kc8npMvRL-o,10927
197
194
  machineconfig/scripts/python/repos_helper_update.py,sha256=AYyKIB7eQ48yoYmFjydIhRI1lV39TBv_S4_LCa-oKuQ,11042
198
- machineconfig/scripts/python/scheduler.py,sha256=7IBjMMOHMkklcWzYwz93EH9XzbJ5uPqU03bJ_lYbRNo,3083
195
+ machineconfig/scripts/python/scheduler.py,sha256=rKhssuxkD697EY6qaV6CSdNhxpAQLDWO4fE8GMCQ9FA,3061
196
+ machineconfig/scripts/python/share_terminal.py,sha256=divO0lleaX1l90ta4muv_ogUB7zfdDCFxbTSmVIZqJw,1116
199
197
  machineconfig/scripts/python/snapshot.py,sha256=aDvKeoniZaeTSNv9zWBUajaj2yagAxVdfuvO1_tgq5Y,1026
200
- machineconfig/scripts/python/start_slidev.py,sha256=rcvXI5WMYHOqHm90_V8JMnlosFAmakI8591izn-Mq-M,4527
201
- machineconfig/scripts/python/start_terminals.py,sha256=fNaAPqiOeWsdXvzsbX232Wpgq9a-0DCpi-YLXtTa7nM,6214
198
+ machineconfig/scripts/python/start_slidev.py,sha256=U5ujAL7R5Gd5CzFReTsnF2SThjY91aFBg0Qz_MMl6U4,4573
199
+ machineconfig/scripts/python/start_terminals.py,sha256=DRWbMZumhPmL0DvvsCsbRNFL5AVQn1SgaziafTio3YQ,6149
200
+ machineconfig/scripts/python/t4.py,sha256=7zxjqDjsv8T9tCPUj6_3qOMc80YO7GyXzUM5IP_7iqQ,222
202
201
  machineconfig/scripts/python/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
203
202
  machineconfig/scripts/python/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
204
- machineconfig/scripts/python/wifi_conn.py,sha256=2FJ4srVthGHsy3KSXpvndAyVkNO8n_XeSgVRnd_PjZA,15576
205
- machineconfig/scripts/python/wsl_windows_transfer.py,sha256=ziq-LrTisXgD_gfZ-Bdx_qunB1jnb4Tmzsp2tKrmK1Q,3651
203
+ machineconfig/scripts/python/wifi_conn.py,sha256=4GdLhgma9GRmZ6OFg3oxOX-qY3sr45njPckozlpM_A0,15566
204
+ machineconfig/scripts/python/wsl_windows_transfer.py,sha256=WDZccDZwi4L8cNXqvZYWYQG4_j2SyD-qA2Bwlr4bZUc,3405
206
205
  machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
207
206
  machineconfig/scripts/python/ai/generate_files.py,sha256=Vfjgd0skJu-WTgqUxmOVFzaNMfSFBaFmY5oGGVY7MZY,2860
208
- machineconfig/scripts/python/ai/initai.py,sha256=yATpWMu_yrbhzXS7zP2Dm0Saz27AFktbi-gCGs5kKFc,2618
209
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=hkzP1b92aWPL_qFv5iIoQEXrIbWGI3ZSwsZ83CL1Ios,1976
207
+ machineconfig/scripts/python/ai/initai.py,sha256=FJriMm1-x44xx6yEnqgI-F5lfRw44xleOluv4TcRs0I,2237
208
+ machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1,sha256=FqoUSv1_DqWXUE5O7RxSo7L86FcNtPK1lYoytgOrf90,5124
209
+ machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=6dCznJmao9T0BQtltBEyGWkDTMmGAmTSmar8Vl791gY,4665
210
210
  machineconfig/scripts/python/ai/solutions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
211
211
  machineconfig/scripts/python/ai/solutions/_shared.py,sha256=QRT4Doe8aW8ULYq9OrlAIX2nVOLhwXdVuubkgnnSpgU,244
212
212
  machineconfig/scripts/python/ai/solutions/generic.py,sha256=dUSbqkEIYe27JZsJF_qEGcvr-ak8CpJ7lTGvAQS2MGk,1311
@@ -232,7 +232,7 @@ machineconfig/scripts/python/ai/solutions/opencode/opencode.py,sha256=AbpHGcgLb-
232
232
  machineconfig/scripts/python/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  machineconfig/scripts/python/helpers/cloud_helpers.py,sha256=GA-bxXouUmknk9fyQAsPT-Xl3RG9-yBed71a2tu9Pig,4914
234
234
  machineconfig/scripts/python/helpers/helpers2.py,sha256=ZdqeF1MLlaBRwoqsQAqnHi4b8rW0byFCBnbyCrPKkoA,7336
235
- machineconfig/scripts/python/helpers/helpers4.py,sha256=goOD5Rt09Sz9xe5GGFDlHwzR2LEc7bXWYXHw4QMLGbs,7709
235
+ machineconfig/scripts/python/helpers/helpers4.py,sha256=Iot8Pb9LeaxpSw1uZzx0m3Aswa30QV-tGLrtJtwiGmQ,7635
236
236
  machineconfig/scripts/python/helpers/helpers5.py,sha256=dPBvA9Tcyx9TMgM6On49A1CueGMhBdRzikDnlJGf3J0,1123
237
237
  machineconfig/scripts/python/helpers/repo_sync_helpers.py,sha256=39Q3XV8Zx0Y6_iWUtbwDIQI8riqLPSZ008zjqx-Gd-g,5328
238
238
  machineconfig/scripts/windows/choose_wezterm_theme.ps1,sha256=LiXJ0a4LKjb6E-oH_bAg6DjegV4SqDUdiMp_svGCFlI,95
@@ -411,7 +411,7 @@ machineconfig/utils/terminal.py,sha256=IXYhZ5a0qA6X9CdMT9S7IEKQtJXrDzmiDUGd4C85-
411
411
  machineconfig/utils/upgrade_packages.py,sha256=H96zVJEWXJW07nh5vhjuSCrPtXGqoUb7xeJsFYYdmCI,3330
412
412
  machineconfig/utils/ve.py,sha256=qSUnRto6NI4-Hru0tuz4YzCZzaWAce5Xc__DV0sxsrc,2397
413
413
  machineconfig/utils/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
414
- machineconfig/utils/ai/generate_file_checklist.py,sha256=HVPSKM5ko17e_x1rHZ8XATaUKUVo4gtlSYGKbGd7Mh0,2834
414
+ machineconfig/utils/ai/generate_file_checklist.py,sha256=ajbmhcBToRugl75c_KZRq2XJumxKgIqQhyf7_YtF5q4,2729
415
415
  machineconfig/utils/cloud/onedrive/setup_oauth.py,sha256=ZTVkqgrwbV_EoPvyT8dyOTUE0ur3BW4sa9o6QYtt5Bo,2341
416
416
  machineconfig/utils/cloud/onedrive/transaction.py,sha256=m-aNcnWj_gfZVvJOSpkdIqjZxU_3nXx2CA-qKbQgP3I,26232
417
417
  machineconfig/utils/installer_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -421,8 +421,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=CCs5ebomW1ac
421
421
  machineconfig/utils/schemas/installer/installer_types.py,sha256=iAzcALc9z_FAQE9iuGHfX6Z0B1_n3Gt6eC0d6heYik0,599
422
422
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=OmiOX9xtakPz4l6IobWnpFHpbn95fitEE9q0YL1WxjQ,617
423
423
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
424
- machineconfig-3.82.dist-info/METADATA,sha256=lBIY_Ul0cOylp78PYNbNbIlXyzPRfyYGrWbBtFsrGiI,6998
425
- machineconfig-3.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
- machineconfig-3.82.dist-info/entry_points.txt,sha256=RwV4BmImYKp4GrXGqb_YDEI25O2_5mhsbvjUD6a0hps,1138
427
- machineconfig-3.82.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
428
- machineconfig-3.82.dist-info/RECORD,,
424
+ machineconfig-3.85.dist-info/METADATA,sha256=3OnrbCTgB0CwtK85fP2bkhm8aIF0iGIS46ZXUYu87xk,6998
425
+ machineconfig-3.85.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
+ machineconfig-3.85.dist-info/entry_points.txt,sha256=rSx_9gXd2stziS1OkNy__jF647hrRxRiF6zolLUELc4,1153
427
+ machineconfig-3.85.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
428
+ machineconfig-3.85.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:main
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:args_parser
7
- croshell = machineconfig.scripts.python.croshell:build_parser
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:main
19
- wifi_conn = machineconfig.scripts.python.wifi_conn:main
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()
@@ -1,87 +0,0 @@
1
- """VScode task to set interpreter"""
2
-
3
- # import os
4
- # import json
5
- from pathlib import Path
6
- from machineconfig.utils.io import save_json
7
- from machineconfig.utils.io import read_json
8
- import argparse
9
- import platform
10
-
11
-
12
- def select_interpreter(workspace_root: str):
13
- print(f"""
14
- {"=" * 150}
15
- 🐍 PYTHON INTERPRETER | Setting up VS Code Python interpreter
16
- 📂 Workspace: {workspace_root}
17
- {"=" * 150}
18
- """)
19
-
20
- path = Path(workspace_root).joinpath(".ve_path")
21
- if not path.exists():
22
- print(f"""
23
- {"⚠️" * 20}
24
- ❌ ERROR | Could not find .ve_path file in workspace
25
- 📂 Expected at: {path}
26
- {"⚠️" * 20}
27
- """)
28
- return
29
-
30
- with open(path, "r", encoding="utf-8") as f:
31
- python_path = Path(f.read().strip()).expanduser()
32
-
33
- print(f"📁 Virtual environment path: {python_path}")
34
-
35
- if platform.system() == "Windows":
36
- python_path = python_path.joinpath("Scripts", "python.exe")
37
- elif platform.system() == "Linux":
38
- python_path = python_path.joinpath("bin", "python")
39
- elif platform.system() == "Darwin":
40
- python_path = python_path.joinpath("bin", "python")
41
- else:
42
- error_msg = f"Unsupported platform: {platform.system()}"
43
- print(f"""
44
- {"⚠️" * 20}
45
- ❌ ERROR | {error_msg}
46
- {"⚠️" * 20}
47
- """)
48
- raise NotImplementedError(error_msg)
49
-
50
- print(f"🔍 Python interpreter path: {python_path}")
51
-
52
- # tmp = os.getenv('APPDATA')
53
- # assert tmp is not None
54
- # settings_path = Path(tmp).joinpath('Code', 'User', 'settings.json')
55
- work_space_settings = Path(workspace_root).joinpath(".vscode", "settings.json")
56
- work_space_settings.parent.mkdir(parents=True, exist_ok=True)
57
- if not work_space_settings.exists():
58
- print(f"📄 Creating new settings file: {work_space_settings}")
59
- work_space_settings.parent.mkdir(parents=True, exist_ok=True)
60
- work_space_settings.touch()
61
- work_space_settings.write_text("{}", encoding="utf-8")
62
- else:
63
- print(f"📄 Updating existing settings file: {work_space_settings}")
64
-
65
- settings = read_json(work_space_settings)
66
- settings["python.defaultInterpreterPath"] = str(python_path)
67
- save_json(obj=settings, path=str(work_space_settings), indent=4)
68
-
69
- print(f"""
70
- {"=" * 150}
71
- ✅ SUCCESS | Python interpreter configured successfully
72
- 🐍 Interpreter: {python_path}
73
- 📄 Settings: {work_space_settings}
74
- {"=" * 150}
75
- """)
76
-
77
-
78
- def main():
79
- parser = argparse.ArgumentParser(description="Set Python Interpretor in VSCode settings.")
80
- parser.add_argument("workspace_path", type=str, help="The workspace path")
81
-
82
- args = parser.parse_args()
83
- select_interpreter(args.workspace_path)
84
-
85
-
86
- if __name__ == "__main__":
87
- main()