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

@@ -28,8 +28,7 @@ import typer
28
28
  def route(args: FireJobArgs, fire_args: str = "") -> None:
29
29
  if args.layout:
30
30
  from machineconfig.scripts.python.fire_jobs_layout_helper import handle_layout_args
31
-
32
- return handle_layout_args(args)
31
+ return handle_layout_args(args.path, args.function)
33
32
 
34
33
  path_obj = sanitize_path(args.path)
35
34
  if not path_obj.exists():
@@ -1,14 +1,11 @@
1
1
  from pathlib import Path
2
2
  from machineconfig.utils.schemas.layouts.layout_types import LayoutConfig, LayoutsFile
3
- from typing import Optional, TYPE_CHECKING
3
+ from typing import Optional
4
4
  from machineconfig.scripts.python.helpers.helpers4 import search_for_files_of_interest
5
5
  from machineconfig.utils.options import choose_from_options
6
6
  from machineconfig.utils.path_helper import match_file_name, sanitize_path
7
7
  from machineconfig.utils.path_extended import PathExtended as PathExtended
8
8
 
9
- if TYPE_CHECKING:
10
- from machineconfig.scripts.python.fire_jobs_args_helper import FireJobArgs
11
-
12
9
 
13
10
  def select_layout(layouts_json_file: Path, layouts_name: Optional[list[str]]) -> list[LayoutConfig]:
14
11
  import json
@@ -54,12 +51,10 @@ def launch_layout(layout_config: LayoutConfig) -> Optional[Exception]:
54
51
  return None
55
52
 
56
53
 
57
- def handle_layout_args(args: "FireJobArgs") -> None:
58
- # args.function = args.path
59
- # args.path = "layout.json"
60
- path_obj = sanitize_path(args.path)
54
+ def handle_layout_args(layout_path: str, layouts: Optional[str]) -> None:
55
+ path_obj = sanitize_path(layout_path)
61
56
  if not path_obj.exists():
62
- choice_file = match_file_name(sub_string=args.path, search_root=PathExtended.cwd(), suffixes={".json"})
57
+ choice_file = match_file_name(sub_string=layout_path, search_root=PathExtended.cwd(), suffixes={".json"})
63
58
  elif path_obj.is_dir():
64
59
  print(f"🔍 Searching recursively for Python, PowerShell and Shell scripts in directory `{path_obj}`")
65
60
  files = search_for_files_of_interest(path_obj)
@@ -68,7 +63,5 @@ def handle_layout_args(args: "FireJobArgs") -> None:
68
63
  choice_file = PathExtended(choice_file)
69
64
  else:
70
65
  choice_file = path_obj
71
- if args.function is None: layouts_name = None
72
- else: layouts_name = args.function.split(",")
73
- for a_layout_config in select_layout(layouts_json_file=choice_file, layouts_name=layouts_name):
66
+ for a_layout_config in select_layout(layouts_json_file=choice_file, layouts_name=layouts.split(",") if layouts else None):
74
67
  launch_layout(layout_config=a_layout_config)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 4.5
3
+ Version: 4.6
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -159,9 +159,9 @@ machineconfig/scripts/python/fire_agents.py,sha256=lBnA4uYZ2tFmkhEmixAlIagAvl-nJ
159
159
  machineconfig/scripts/python/fire_agents_help_launch.py,sha256=UO-rV0z0G6WoL3RtnbqjIo97fq-FQO8ynmQ2lLrIdSg,5124
160
160
  machineconfig/scripts/python/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
161
161
  machineconfig/scripts/python/fire_agents_load_balancer.py,sha256=mpqx3uaQdBXYieuvhdK-qsvLepf9oIMo3pwPj9mSEDI,1079
162
- machineconfig/scripts/python/fire_jobs.py,sha256=qD_9JtoNTjOjAyX0_QPysfHNQ-qq55t-Tv9ctEK17MI,20569
162
+ machineconfig/scripts/python/fire_jobs.py,sha256=nWj13dp4TqW6jUEnI9_4ZgqBZIF90pq-nvezBDu-w30,20588
163
163
  machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=VsyPgjWRByZgXz65vmmpyR-2mJo6KwNgwrWFYd3EYqc,2075
164
- machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=LHLyp5HxKwut19x2OYKQq8gy4EKon6wNb-jlxx5DoVM,4134
164
+ machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=SE87D1fKAvRSIp_AfN9QsWZzRumpi5KlQXgnMCuhJTA,3909
165
165
  machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
166
  machineconfig/scripts/python/ftpx.py,sha256=l_gdJS0QB2wVZErubtZvm4HJD9HZAJxSP68sbY73xwo,10278
167
167
  machineconfig/scripts/python/get_zellij_cmd.py,sha256=e35-18hoXM9N3PFbvbizfkNY_-63iMicieWE3TbGcCQ,576
@@ -406,8 +406,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=pTxvLzIpD5RF
406
406
  machineconfig/utils/schemas/installer/installer_types.py,sha256=DLagmIe0G5-xg7HZ9VrlFCDk1gIbwvX7O4gZjwq0wh0,1326
407
407
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
408
408
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
409
- machineconfig-4.5.dist-info/METADATA,sha256=hwREinHY-RApFYtMH7odfRdK32LRkZ9mKm05Cry8uBk,7060
410
- machineconfig-4.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
411
- machineconfig-4.5.dist-info/entry_points.txt,sha256=fhSTJGrT7JZ7PcN-F3nrb5xXIohicZo57rbM23Mdblk,1065
412
- machineconfig-4.5.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
413
- machineconfig-4.5.dist-info/RECORD,,
409
+ machineconfig-4.6.dist-info/METADATA,sha256=uP00hHjhn84jiV2U2ZZP5_y3QolArCGlZBdG3Zp6YDE,7060
410
+ machineconfig-4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
411
+ machineconfig-4.6.dist-info/entry_points.txt,sha256=fhSTJGrT7JZ7PcN-F3nrb5xXIohicZo57rbM23Mdblk,1065
412
+ machineconfig-4.6.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
413
+ machineconfig-4.6.dist-info/RECORD,,