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

@@ -20,15 +20,15 @@ def get_fire_tab_using_fire(func: FunctionType):
20
20
  from machineconfig.utils.source_of_truth import CONFIG_ROOT
21
21
  import platform
22
22
  if platform.system().lower() == "windows":
23
- mcfgs = CONFIG_ROOT / "scripts/windows/mcfgs.ps1"
24
- mcfgs = f'& "{mcfgs}"'
23
+ wrap_mcfg = CONFIG_ROOT / "scripts/windows/wrap_mcfg.ps1"
24
+ wrap_mcfg = f'& "{wrap_mcfg}"'
25
25
  elif platform.system().lower() == "linux" or platform.system().lower() == "darwin":
26
- mcfgs = CONFIG_ROOT / "scripts/linux/mcfgs"
26
+ wrap_mcfg = CONFIG_ROOT / "scripts/linux/wrap_mcfg"
27
27
  else:
28
28
  raise ValueError(f"Unsupported platform: {platform.system()}")
29
29
  path = Path(inspect.getfile(func))
30
30
  path_relative = path.relative_to(Path.home())
31
- command_to_run = f"""{mcfgs} fire {path_relative} {func.__name__} """
31
+ command_to_run = f"""{wrap_mcfg} fire {path_relative} {func.__name__} """
32
32
  tab_config: TabConfig = {
33
33
  "command": command_to_run,
34
34
  "startDir": "$HOME",
@@ -5,23 +5,12 @@ croshell
5
5
  """
6
6
 
7
7
  from typing import Annotated, Optional
8
- from machineconfig.scripts.python.helpers_croshell.crosh import code, get_read_data_pycode
9
- from machineconfig.utils.meta import lambda_to_python_script
10
8
  import typer
11
- from machineconfig.utils.path_extended import PathExtended
12
- from pathlib import Path
13
- from machineconfig.utils.accessories import randstr
14
- import json
15
- from machineconfig.utils.options import choose_from_options
16
- from rich.console import Console
17
- from rich.panel import Panel
18
9
 
19
10
 
20
- console = Console()
21
-
22
11
 
23
12
  def croshell(
24
- path: Annotated[Optional[str], typer.Argument(help="path of file to read.")] = "",
13
+ path: Annotated[Optional[str], typer.Argument(help="path of file to read.")] = None,
25
14
  python: Annotated[bool, typer.Option("--python", "-p", help="flag to use python over IPython.")] = False,
26
15
  profile: Annotated[Optional[str], typer.Option("--profile", "-P", help="ipython profile to use, defaults to default profile.")] = None,
27
16
  jupyter: Annotated[bool, typer.Option("--jupyter", "-j", help="run in jupyter interactive console")] = False,
@@ -30,6 +19,17 @@ def croshell(
30
19
  visidata: Annotated[bool, typer.Option("--visidata", "-v", help="open data file in visidata")] = False,
31
20
  marimo: Annotated[bool, typer.Option("--marimo", "-m", help="open the notebook using marimo if available")] = False,
32
21
  ) -> None:
22
+ from machineconfig.scripts.python.helpers_croshell.crosh import code, get_read_data_pycode
23
+ from machineconfig.utils.meta import lambda_to_python_script
24
+ from machineconfig.utils.path_extended import PathExtended
25
+ from pathlib import Path
26
+ from machineconfig.utils.accessories import randstr
27
+ import json
28
+ from machineconfig.utils.options import choose_from_options
29
+ from rich.console import Console
30
+ from rich.panel import Panel
31
+ console = Console()
32
+
33
33
  # ==================================================================================
34
34
  # flags processing
35
35
  interactivity = "-i"
@@ -77,7 +77,7 @@ def croshell(
77
77
  def preprogram_func():
78
78
  from machineconfig.utils.files.headers import print_header, print_logo
79
79
  print_header()
80
- print_logo("CROCODILE")
80
+ print_logo("Machineconfig")
81
81
  from pathlib import Path
82
82
  from machineconfig.utils.path_extended import PathExtended
83
83
  _ = Path, PathExtended # avoid unused import warnings
@@ -130,7 +130,7 @@ def croshell(
130
130
  fire_line = f"uv run --python 3.14 --with visidata,pyarrow vd {str(file_obj)}"
131
131
  elif marimo:
132
132
  if Path.home().joinpath("code/machineconfig").exists(): requirements = f"""--with marimo --project "{str(Path.home().joinpath("code/machineconfig"))}" """
133
- else: requirements = """--python 3.14 --with "marimo,machineconfig[plot]>=6.57" """
133
+ else: requirements = """--python 3.14 --with "marimo,machineconfig[plot]>=7.35" """
134
134
  fire_line = f"""
135
135
  cd {str(pyfile.parent)}
136
136
  uv run --python 3.14 --with "marimo" marimo convert {pyfile.name} -o marimo_nb.py
@@ -138,14 +138,14 @@ uv run {requirements} marimo edit --host 0.0.0.0 marimo_nb.py
138
138
  """
139
139
  elif jupyter:
140
140
  if Path.home().joinpath("code/machineconfig").exists(): requirements = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with jupyterlab """
141
- else: requirements = """--with "machineconfig[plot]>=6.57" """
141
+ else: requirements = """--with "machineconfig[plot]>=7.35" """
142
142
  fire_line = f"uv run {requirements} jupyter-lab {str(nb_target)}"
143
143
  elif vscode:
144
144
  fire_line = f"""
145
145
  cd {str(pyfile.parent)}
146
146
  uv init --python 3.14
147
147
  uv venv
148
- uv add "machineconfig[plot]>=6.57"
148
+ uv add "machineconfig[plot]>=7.35"
149
149
  # code serve-web
150
150
  code --new-window {str(pyfile)}
151
151
  """
@@ -153,7 +153,7 @@ code --new-window {str(pyfile)}
153
153
  if interpreter == "ipython": profile = f" --profile {ipython_profile} --no-banner"
154
154
  else: profile = ""
155
155
  if Path.home().joinpath("code/machineconfig").exists(): ve_line = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" """
156
- else: ve_line = """--python 3.14 --with "machineconfig[plot]>=6.57" """
156
+ else: ve_line = """--python 3.14 --with "machineconfig[plot]>=7.35" """
157
157
  # ve_path_maybe, ipython_profile_maybe = get_ve_path_and_ipython_profile(Path.cwd())
158
158
  # --python 3.14
159
159
  fire_line = f"uv run {ve_line} {interpreter} {interactivity} {profile} {str(pyfile)}"
@@ -2,7 +2,7 @@
2
2
  # /// script
3
3
  # requires-python = ">=3.13"
4
4
  # dependencies = [
5
- # "machineconfig>=7.33",
5
+ # "machineconfig>=7.35",
6
6
  # "textual",
7
7
  # "pyperclip",
8
8
  # ]
@@ -39,7 +39,7 @@ def path():
39
39
  uv_with = ["textual"]
40
40
  uv_project_dir = None
41
41
  if not Path.home().joinpath("code/machineconfig").exists():
42
- uv_with.append("machineconfig>=7.33")
42
+ uv_with.append("machineconfig>=7.35")
43
43
  else:
44
44
  uv_project_dir = str(Path.home().joinpath("code/machineconfig"))
45
45
  run_shell_script(get_uv_command_executing_python_script(python_script=path.read_text(encoding="utf-8"), uv_with=uv_with, uv_project_dir=uv_project_dir)[0])
@@ -48,9 +48,9 @@ def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-n
48
48
  else:
49
49
  import platform
50
50
  if platform.system() == "Windows":
51
- run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.33" """)
51
+ run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.35" """)
52
52
  else:
53
- run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.33" """)
53
+ run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.35" """)
54
54
  from machineconfig.profile.create_shell_profile import create_default_shell_profile
55
55
  if not no_copy_assets:
56
56
  create_default_shell_profile() # involves copying assets too
@@ -75,7 +75,7 @@ def navigate():
75
75
  path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
76
76
  from machineconfig.utils.code import run_shell_script
77
77
  if Path.home().joinpath("code/machineconfig").exists(): executable = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with textual"""
78
- else: executable = """--with "machineconfig>=7.33,textual" """
78
+ else: executable = """--with "machineconfig>=7.35,textual" """
79
79
  run_shell_script(f"""uv run {executable} {path}""")
80
80
 
81
81
 
@@ -80,7 +80,7 @@ git pull originEnc master
80
80
  uv_project_dir = f"""{str(Path.home().joinpath("code/machineconfig"))}"""
81
81
  uv_with = None
82
82
  else:
83
- uv_with = ["machineconfig>=7.33"]
83
+ uv_with = ["machineconfig>=7.35"]
84
84
  uv_project_dir = None
85
85
 
86
86
  import tempfile
@@ -8,7 +8,7 @@ def analyze_repo_development(repo_path: Annotated[str, typer.Argument(..., help=
8
8
  from pathlib import Path
9
9
  count_lines_path = Path(count_lines.__file__)
10
10
  # --project $HOME/code/ machineconfig --group plot
11
- cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=6.57" {count_lines_path} analyze-over-time {repo_path}"""
11
+ cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=7.35" {count_lines_path} analyze-over-time {repo_path}"""
12
12
  from machineconfig.utils.code import run_shell_script
13
13
  run_shell_script(cmd)
14
14
 
@@ -7,7 +7,7 @@ $user = ''
7
7
  $sharePath = ''
8
8
  $driveLetter = ''
9
9
 
10
- uv run --python 3.14 --with "machineconfig>=7.33" python -m machineconfig.scripts.python.mount_ssh
10
+ uv run --python 3.14 --with "machineconfig>=7.35" 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
@@ -2,15 +2,15 @@
2
2
  . <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
3
3
  . <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/scripts/linux/wrap_mcfg")
4
4
 
5
- alias devops='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" devops'
6
- alias cloud='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" cloud'
7
- alias agents='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" agents'
8
- alias sessions='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" sessions'
9
- alias ftpx='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" ftpx'
10
- alias fire='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" fire'
11
- alias croshell='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" croshell'
12
- alias utils='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" utils'
13
- alias terminal='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.33" terminal'
5
+ alias devops='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" devops'
6
+ alias cloud='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" cloud'
7
+ alias agents='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" agents'
8
+ alias sessions='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" sessions'
9
+ alias ftpx='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" ftpx'
10
+ alias fire='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" fire'
11
+ alias croshell='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" croshell'
12
+ alias utils='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" utils'
13
+ alias terminal='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.35" terminal'
14
14
 
15
15
  alias d='wrap_in_shell_script devops'
16
16
  alias c='wrap_in_shell_script cloud'
@@ -3,15 +3,15 @@
3
3
  iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
4
4
  iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/scripts/windows/wrap_mcfg.ps1").Content
5
5
 
6
- function devops { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" devops $args }
7
- function cloud { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" cloud $args }
8
- function agents { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" agents $args }
9
- function sessions { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" sessions $args }
10
- function ftpx { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" ftpx $args }
11
- function fire { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" fire $args }
12
- function croshell { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" croshell $args }
13
- function utils { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" utils $args }
14
- function terminal { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.33" terminal $args }
6
+ function devops { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" devops $args }
7
+ function cloud { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" cloud $args }
8
+ function agents { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" agents $args }
9
+ function sessions { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" sessions $args }
10
+ function ftpx { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" ftpx $args }
11
+ function fire { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" fire $args }
12
+ function croshell { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" croshell $args }
13
+ function utils { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" utils $args }
14
+ function terminal { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.35" terminal $args }
15
15
 
16
16
  function d { wrap_in_shell_script devops @args }
17
17
  function c { wrap_in_shell_script cloud @args }
@@ -62,7 +62,7 @@ def get_art(comment: Optional[str] = None, artlib: Optional[BOX_OR_CHAR] = None,
62
62
  try:
63
63
  comment = subprocess.run("fortune", shell=True, capture_output=True, text=True, check=True).stdout
64
64
  except Exception:
65
- comment = "crocodile"
65
+ comment = "machineconfig"
66
66
  if artlib is None: artlib = random.choice(['boxes', 'cowsay'])
67
67
  to_file = '' if not file else f'> {file}'
68
68
  if artlib == 'boxes':
@@ -25,8 +25,9 @@ def print_header():
25
25
  table.add_row("Virtual Environment", os.getenv('VIRTUAL_ENV', 'None'))
26
26
  table.add_row("Running @", str(Path.cwd()))
27
27
 
28
+ from machineconfig.utils.installer import get_machineconfig_version
28
29
 
29
- console.print(Panel(table, title="[bold blue]✨ 🐊 Crocodile Shell 14.5 ✨ Made with 🐍 | Built with ❤️[/bold blue]", border_style="blue"))
30
+ console.print(Panel(table, title=f"[bold blue]✨ 🐊 Machineconfig Shell {get_machineconfig_version()} ✨ Made with 🐍 | Built with ❤️[/bold blue]", border_style="blue"))
30
31
  def print_logo(logo: str):
31
32
  from machineconfig.utils.files.ascii_art import font_box_color, character_color, character_or_box_color
32
33
  if platform.system() == "Windows":
@@ -8,7 +8,7 @@ from machineconfig.utils.terminal import Response
8
8
  from machineconfig.utils.accessories import pprint, randstr
9
9
  from machineconfig.utils.meta import lambda_to_python_script
10
10
  UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
11
- MACHINECONFIG_VERSION = "machineconfig>=7.33"
11
+ MACHINECONFIG_VERSION = "machineconfig>=7.35"
12
12
  DEFAULT_PICKLE_SUBDIR = "tmp_results/tmp_scripts/ssh"
13
13
 
14
14
  class SSH:
@@ -245,12 +245,15 @@ class SSH:
245
245
  from pathlib import Path
246
246
  import shutil
247
247
  directory_path = Path(target_rel2home).expanduser()
248
+ if not directory_path.is_absolute():
249
+ directory_path = Path.home().joinpath(directory_path)
248
250
  if overwrite and directory_path.exists():
249
251
  if directory_path.is_dir():
250
252
  shutil.rmtree(directory_path)
251
253
  else:
252
254
  directory_path.unlink()
253
255
  directory_path.parent.mkdir(parents=True, exist_ok=True)
256
+ directory_path.mkdir(parents=True, exist_ok=True)
254
257
  command = lambda_to_python_script(lmb=lambda: create_target_dir(target_rel2home=path_rel2home, overwrite=overwrite_existing), in_global=True, import_module=False)
255
258
  tmp_py_file = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/create_target_dir_{randstr()}.py")
256
259
  tmp_py_file.parent.mkdir(parents=True, exist_ok=True)
@@ -318,9 +321,11 @@ class SSH:
318
321
  tmp_py_file = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/create_target_dir_{randstr()}.py")
319
322
  tmp_py_file.parent.mkdir(parents=True, exist_ok=True)
320
323
  tmp_py_file.write_text(command, encoding="utf-8")
321
- transferred_py_file = self.copy_from_here(source_path=str(tmp_py_file), target_rel2home=None, compress_with_zip=True, recursive=False, overwrite_existing=True)
322
- self.run_shell(command=f"""{UV_RUN_CMD} python {transferred_py_file}""", verbose_output=False, description=f"UNZIPPING {target_rel2home}", strict_stderr=True, strict_return_code=True)
324
+ remote_tmp_py = tmp_py_file.relative_to(Path.home()).as_posix()
325
+ self.copy_from_here(source_path=str(tmp_py_file), target_rel2home=None, compress_with_zip=False, recursive=False, overwrite_existing=True)
326
+ self.run_shell(command=f"""{UV_RUN_CMD} python {remote_tmp_py}""", verbose_output=False, description=f"UNZIPPING {target_rel2home}", strict_stderr=True, strict_return_code=True)
323
327
  source_obj.unlink()
328
+ tmp_py_file.unlink(missing_ok=True)
324
329
  return None
325
330
 
326
331
  def _check_remote_is_dir(self, source_path: Union[str, Path]) -> bool:
@@ -388,7 +393,7 @@ class SSH:
388
393
  assert isinstance(result, str), f"Could not resolve source path {source_path}"
389
394
  return result
390
395
 
391
- def copy_to_here(self, source: Union[str, Path], target: Optional[Union[str, Path]], compress_with_zip: bool = False, recursive: bool = False, internal_call: bool = False) -> Path:
396
+ def copy_to_here(self, source: Union[str, Path], target: Optional[Union[str, Path]], compress_with_zip: bool = False, recursive: bool = False, internal_call: bool = False) -> None:
392
397
  if self.sftp is None:
393
398
  raise RuntimeError(f"SFTP connection not available for {self.hostname}. Cannot transfer files.")
394
399
 
@@ -484,7 +489,7 @@ class SSH:
484
489
  local_file_target = target_dir.joinpath(Path(file_path).relative_to(expanded_source))
485
490
  self.copy_to_here(source=file_path, target=local_file_target, compress_with_zip=False, recursive=False, internal_call=True)
486
491
 
487
- return target_dir
492
+ return None
488
493
 
489
494
  if compress_with_zip:
490
495
  print("🗜️ ZIPPING ...")
@@ -607,7 +612,7 @@ class SSH:
607
612
  self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Cleaning temp zip files @ remote.", verbose_output=False, strict_stderr=True, strict_return_code=True)
608
613
 
609
614
  print("\n")
610
- return target_obj
615
+ return None
611
616
 
612
617
  if __name__ == "__main__":
613
618
  ssh = SSH(host="p51s", username=None, hostname=None, ssh_key_path=None, password=None, port=22, enable_compression=False)
@@ -98,8 +98,8 @@ def upgrade_machine_config_version() -> None:
98
98
  Upgrade machineconfig version in pyproject.toml and all source files.
99
99
 
100
100
  Reads current version from pyproject.toml, bumps it by 0.01, and replaces
101
- all occurrences of machineconfig>={old_version} with the new version in
102
- Python (.py), shell (.sh), and PowerShell (.ps1) files.
101
+ all occurrences of machineconfig>={old_version} and machineconfig[group]>={old_version}
102
+ with the new version in Python (.py), shell (.sh), and PowerShell (.ps1) files.
103
103
  """
104
104
  current_dir: Path = Path.cwd()
105
105
  pyproject_file: Path = current_dir / "pyproject.toml"
@@ -119,10 +119,15 @@ def upgrade_machine_config_version() -> None:
119
119
  minor_width: int = len(version_parts[1])
120
120
  new_version: str = f"{major}.{new_minor:0{minor_width}d}"
121
121
 
122
- old_version_constraint: str = f"machineconfig>={current_version_str}"
123
- new_version_constraint: str = f"machineconfig>={new_version}"
122
+ # Collect all optional dependency groups
123
+ optional_groups: set[str] = set()
124
+ if "project" in pyproject_data and "optional-dependencies" in pyproject_data["project"]:
125
+ optional_groups.update(pyproject_data["project"]["optional-dependencies"].keys())
126
+ if "dependency-groups" in pyproject_data:
127
+ optional_groups.update(pyproject_data["dependency-groups"].keys())
124
128
 
125
129
  print(f"Upgrading from {current_version_str} to {new_version}")
130
+ print(f"Found optional groups: {', '.join(sorted(optional_groups))}")
126
131
 
127
132
  # Update pyproject.toml
128
133
  content: str = pyproject_file.read_text(encoding="utf-8")
@@ -137,8 +142,22 @@ def upgrade_machine_config_version() -> None:
137
142
  for file_path in py_files:
138
143
  try:
139
144
  file_content: str = file_path.read_text(encoding="utf-8")
140
- if old_version_constraint in file_content:
141
- updated_file_content: str = file_content.replace(old_version_constraint, new_version_constraint)
145
+ updated_file_content: str = file_content
146
+
147
+ # Replace base constraint (without group)
148
+ old_constraint: str = f"machineconfig>={current_version_str}"
149
+ new_constraint: str = f"machineconfig>={new_version}"
150
+ if old_constraint in updated_file_content:
151
+ updated_file_content = updated_file_content.replace(old_constraint, new_constraint)
152
+
153
+ # Replace constraints with optional groups
154
+ for group in optional_groups:
155
+ old_group_constraint: str = f"machineconfig[{group}]>={current_version_str}"
156
+ new_group_constraint: str = f"machineconfig[{group}]>={new_version}"
157
+ if old_group_constraint in updated_file_content:
158
+ updated_file_content = updated_file_content.replace(old_group_constraint, new_group_constraint)
159
+
160
+ if updated_file_content != file_content:
142
161
  file_path.write_text(updated_file_content, encoding="utf-8")
143
162
  files_updated += 1
144
163
  print(f"Updated {file_path.relative_to(current_dir)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 7.33
3
+ Version: 7.35
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -25,7 +25,7 @@ machineconfig/cluster/sessions_managers/zellij_remote_manager.py,sha256=xzih0y8_
25
25
  machineconfig/cluster/sessions_managers/helpers/enhanced_command_runner.py,sha256=YULt8r3zotkotjdmWRrUq3yGySZW-5e_rQSIZ-IMvjk,5410
26
26
  machineconfig/cluster/sessions_managers/helpers/load_balancer_helper.py,sha256=i5TRittC1IWTgMZNyG8AR5qq-3WrGp3xgIx2m5ktT7g,7526
27
27
  machineconfig/cluster/sessions_managers/utils/load_balancer.py,sha256=Y4RQmhROY6o7JXSJXRrBTkoAuEmu1gvmvN_7JKPw5sc,3178
28
- machineconfig/cluster/sessions_managers/utils/maker.py,sha256=V8_ywAEaD9VZQ5GIAm0S0XO_5pf7nAcnVBEyD_R8TSY,2643
28
+ machineconfig/cluster/sessions_managers/utils/maker.py,sha256=DifhHbmp0n35KnSO54SeXaHTgCMB5ocV3Jmv17Prz0w,2671
29
29
  machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py,sha256=OA50j16uUS9ZTjL38TLuR3jufIOln_EszMZpbWyejTo,6972
30
30
  machineconfig/cluster/sessions_managers/wt_utils/manager_persistence.py,sha256=LWgK-886QMERLRJwQ4rH2Nr2RGlyKu6P7JYoBMVWMGc,1604
31
31
  machineconfig/cluster/sessions_managers/wt_utils/monitoring_helpers.py,sha256=e75rdp0G8cDfF9SfkJ7LX3TAJ8R3JWR5v-C_SDkDa14,1627
@@ -119,7 +119,7 @@ machineconfig/scripts/linux/other/switch_ip,sha256=NQfeKMBSbFY3eP6M-BadD-TQo5qMP
119
119
  machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  machineconfig/scripts/python/agents.py,sha256=aVbLQDgpngXZm4taHcED4sAxyHvV2_Dz5VW3apPcQcY,10651
121
121
  machineconfig/scripts/python/cloud.py,sha256=yAD6ciKiEtv2CH3g2NScDK5cpCZQi7Vu8yyeehw_cU8,1263
122
- machineconfig/scripts/python/croshell.py,sha256=QyQbVboNqDQHJkUeSsJvdT212t4TW46yat3GBzneqsQ,8649
122
+ machineconfig/scripts/python/croshell.py,sha256=mOaTKAwoo2VTxiyKW05qVoH9NPD5tC5K36FiwMzWUko,8695
123
123
  machineconfig/scripts/python/define.py,sha256=cT1N-QpnRvUTosYEsEtds-8rik90pbMNS4iliqb5sqM,653
124
124
  machineconfig/scripts/python/devops.py,sha256=Lv4d-UlyOREj4VTcu_pxswYo54Mawe3XGeKjreGQDYg,2222
125
125
  machineconfig/scripts/python/devops_navigator.py,sha256=5Cm384D4S8_GsvMzTwr0C16D0ktf8_5Mk5bEJncwDO8,237
@@ -162,7 +162,7 @@ machineconfig/scripts/python/ai/solutions/opencode/opencode.json,sha256=nahHKRw1
162
162
  machineconfig/scripts/python/ai/solutions/opencode/opencode.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
163
163
  machineconfig/scripts/python/env_manager/__init__.py,sha256=E4LAHbU1wo2dLjE36ntv8U7QNTe8TasujUAYK9SLvWk,6
164
164
  machineconfig/scripts/python/env_manager/path_manager_backend.py,sha256=ZVGlGJALhg7zNABDdwXxL7MFbL2BXPebObipXSLGbic,1552
165
- machineconfig/scripts/python/env_manager/path_manager_tui.py,sha256=kuCv04XggHyAarWlzF8ryMaQoS0aRki0J9OFtsDtGtQ,6932
165
+ machineconfig/scripts/python/env_manager/path_manager_tui.py,sha256=jPqZHa__6VMczpvLaV5kExzOYwTFa6hXInlbCHJP97E,6932
166
166
  machineconfig/scripts/python/helpers_agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
167
167
  machineconfig/scripts/python/helpers_agents/fire_agents_help_launch.py,sha256=YD6-rtudHNip8tx85amSmOZZIHBP9khq4az3dF41j6U,5934
168
168
  machineconfig/scripts/python/helpers_agents/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
@@ -192,12 +192,12 @@ machineconfig/scripts/python/helpers_croshell/start_slidev.py,sha256=HfJReOusTPh
192
192
  machineconfig/scripts/python/helpers_croshell/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
193
193
  machineconfig/scripts/python/helpers_croshell/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
194
194
  machineconfig/scripts/python/helpers_devops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
195
- machineconfig/scripts/python/helpers_devops/cli_config.py,sha256=n7940-XlvIoJZNW_Juil3B5bueeu17dHqiI_ZNMmKH8,6891
195
+ machineconfig/scripts/python/helpers_devops/cli_config.py,sha256=oFIipZFOuZR0UgdV4xqHYK18t4EOp8ePCqkBcUWVi5Y,6891
196
196
  machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py,sha256=pVUFE1SUtyTiulLzUssf8FrtU190EIV-l9rpwucsBa0,3427
197
197
  machineconfig/scripts/python/helpers_devops/cli_data.py,sha256=79Xvx7YnbueruEnl69hrDg2AhVxf_zCUdlVcKfeMGyQ,1774
198
198
  machineconfig/scripts/python/helpers_devops/cli_nw.py,sha256=9NcVJvPYaUDtmI_DSKthZxR4emMBeNWVM_M5f0YR8EQ,7302
199
199
  machineconfig/scripts/python/helpers_devops/cli_repos.py,sha256=Xwkv1adqHZvTfRSPWiqSK3PZ1XADyx3llw_YkbxaKyE,12505
200
- machineconfig/scripts/python/helpers_devops/cli_self.py,sha256=k5m7v3Sr7e291RxIISWPGiQ1vxT4_48AnCUbxPW2FVM,6621
200
+ machineconfig/scripts/python/helpers_devops/cli_self.py,sha256=IpQlDIXso4WDhAFn2pBwAHYlW6X8u-qTIVDhBu-yWgs,6621
201
201
  machineconfig/scripts/python/helpers_devops/cli_share_server.py,sha256=BJnm9mEI0PGA2xK_ciNX1docIiRQ_fNhygGrDCcTekw,11076
202
202
  machineconfig/scripts/python/helpers_devops/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
203
203
  machineconfig/scripts/python/helpers_devops/cli_utils.py,sha256=B9pnosujOxZLpwzJO4YAqeO-2rvvOFIZgrUwGREZXfM,11118
@@ -225,9 +225,9 @@ machineconfig/scripts/python/helpers_navigator/search_bar.py,sha256=kDi8Jhxap8wd
225
225
  machineconfig/scripts/python/helpers_repos/action.py,sha256=8je051kpGZ7A_GRsQyWKhPZ8xVW7tSm4bnPu6VjxaXk,9755
226
226
  machineconfig/scripts/python/helpers_repos/action_helper.py,sha256=XRCtkGkNrxauqUd9qkxtfJt02Mx2gejSYDLL0jyWn24,6176
227
227
  machineconfig/scripts/python/helpers_repos/clone.py,sha256=UULEG5xJuXlPGU0nqXH6U45jA9DOFqLw8B4iPytCwOQ,5471
228
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=Bj1IGFaawc79RMyCgZO5GMLyg6G_jz9wWpYt0aC2C0g,10450
228
+ machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=MOYErsoZQqt0RvP8XTA_kRVd6_Bgv3kwypsAG_bi1Mg,10450
229
229
  machineconfig/scripts/python/helpers_repos/count_lines.py,sha256=Q5c7b-DxvTlQmljoic7niTuiAVyFlwYvkVQ7uRJHiTo,16009
230
- machineconfig/scripts/python/helpers_repos/count_lines_frontend.py,sha256=vSDtrF4829jziwp6WZmGt9G8MJ9jY4hfXqtf0vhkYSE,607
230
+ machineconfig/scripts/python/helpers_repos/count_lines_frontend.py,sha256=_m0AyLca2beK6qvWFYABty-kQ7UqGOkCgF2RYvzaQ5Y,607
231
231
  machineconfig/scripts/python/helpers_repos/entrypoint.py,sha256=WYEFGUJp9HWImlFjbs_hiFZrUqM_KEYm5VvSUjWd04I,2810
232
232
  machineconfig/scripts/python/helpers_repos/grource.py,sha256=oJj1-gqlkV3Z_BrIOXRmtzoXcuBl0xTYfulJ5D0srOc,14656
233
233
  machineconfig/scripts/python/helpers_repos/record.py,sha256=FQo0swuJZOp0I2XGK-t1OQU4zJHmQ2z9zTpDD30Tmg4,11001
@@ -259,7 +259,7 @@ machineconfig/scripts/windows/wrap_mcfg.ps1,sha256=1mLCFDPBG-1uNVaZe3fIAgvS_uo3u
259
259
  machineconfig/scripts/windows/mounts/mount_nfs.ps1,sha256=XrAdzpxE6a4OccSmWJ7YWHJTnsZK8uXnFE5j9GOPA20,2026
260
260
  machineconfig/scripts/windows/mounts/mount_nw.ps1,sha256=puxcfZc3ZCJerm8pj8OZGVoTYkhzp-h7oV-MrksSqIE,454
261
261
  machineconfig/scripts/windows/mounts/mount_smb.ps1,sha256=PzYWpIO9BpwXjdWlUQL9pnMRnOGNSkxfh4bHukJFme8,69
262
- machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=r5YtEVr0E7PoZE73lLAtkLnn61rsuAg4sM_asfcXms4,322
262
+ machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=chsLBPkkt3C4_49bduKOpusEAeREa_T85fzjd6xYEl4,322
263
263
  machineconfig/scripts/windows/mounts/share_cloud.cmd,sha256=exD7JCdxw2LqVjw2MKCYHbVZlEqmelXtwnATng-dhJ4,1028
264
264
  machineconfig/scripts/windows/mounts/share_smb.ps1,sha256=U7x8ULYSjbgzTtiHNSKQuTaZ_apilDvkGV5Xm5hXk5M,384
265
265
  machineconfig/scripts/windows/mounts/unlock_bitlocker.ps1,sha256=Wv-SLscdckV-1mG3p82VXKPY9zW3hgkRmcLUXIZ1daE,253
@@ -377,7 +377,7 @@ machineconfig/setup_linux/others/cli_installation.sh,sha256=gVvszYZJgKPRJx2SEaE3
377
377
  machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh,sha256=F5dbg0n9RHsKGPn8fIdZMn3p0RrHEkb8rWBGsdVGbus,1207
378
378
  machineconfig/setup_linux/ssh/openssh_all.sh,sha256=3dg6HEUFbHQOzLfSAtzK_D_GB8rGCCp_aBnxNdnidVc,824
379
379
  machineconfig/setup_linux/ssh/openssh_wsl.sh,sha256=1eeRGrloVB34K5z8yWVUMG5b9pV-WBfHgV9jqXiYgCQ,1398
380
- machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=qiRBA3ys4qc51tO_m-10GUs-kqi_rEzPLi6vE8sNUak,1453
380
+ machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=TjT6WD8u7U3AOMi7UndD8Ly80UywEc0a3DwA3aXfc5o,1453
381
381
  machineconfig/setup_mac/__init__.py,sha256=Q1waupi5vCBroLqc8Rtnw69_7jLnm2Cs7_zH_GSZgMs,616
382
382
  machineconfig/setup_mac/apps.sh,sha256=R0N6fBwLCzwy4qAormyMerXXXrHazibSkY6NrNOpTQU,2772
383
383
  machineconfig/setup_mac/apps_gui.sh,sha256=3alvddg918oMlJB2aUWJWpGGoaq5atlxcaOwhnyXlRI,9517
@@ -392,7 +392,7 @@ machineconfig/setup_windows/others/power_options.ps1,sha256=c7Hn94jBD5GWF29CxMhm
392
392
  machineconfig/setup_windows/ssh/add-sshkey.ps1,sha256=qfPdqCpd9KP3VhH4ifsUm1Xvec7c0QVl4Wt8JIAm9HQ,1653
393
393
  machineconfig/setup_windows/ssh/add_identity.ps1,sha256=b8ZXpmNUSw3IMYvqSY7ClpdWPG39FS7MefoWnRhWN2U,506
394
394
  machineconfig/setup_windows/ssh/openssh-server.ps1,sha256=OMlYQdvuJQNxF5EILLPizB6BZAT3jAmDsv1WcVVxpFQ,2529
395
- machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=5Ja7_7iwadyNcMKhMSSo3_MEZMl3F_Xuo2S4eom1kF8,1755
395
+ machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=nUuegPYruIpt7moePa7zNdi1uGpppJNyj1I3zm1y7Ho,1755
396
396
  machineconfig/setup_windows/wt_and_pwsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
397
397
  machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6dFJu95UCNoGYirZKQho_3X0F_hmXs,6791
398
398
  machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -410,18 +410,18 @@ machineconfig/utils/procs.py,sha256=YPA_vEYQGwPd_o_Lc6nOTBo5BrB1tSs8PJ42XiGpenM,
410
410
  machineconfig/utils/scheduler.py,sha256=fguwvINyaupOxdU5Uadyxalh_jXTXDzt0ioEgjEOKcM,14705
411
411
  machineconfig/utils/scheduling.py,sha256=vcJgajeJPSWkJNlarYJSmLvasdOuCtBM4druOAB1Nwc,11089
412
412
  machineconfig/utils/source_of_truth.py,sha256=ZAnCRltiM07ig--P6g9_6nEAvNFC4X4ERFTVcvpIYsE,764
413
- machineconfig/utils/ssh.py,sha256=Tt4IS2dK7toQpuOrYN97H46YfDoz-_opCC0vdQyIjyw,39008
413
+ machineconfig/utils/ssh.py,sha256=erTbWwKyZ40bd7ABenI9JYswxD9Jcy_f3vfupDaWknM,39274
414
414
  machineconfig/utils/terminal.py,sha256=VDgsjTjBmMGgZN0YIc0pJ8YksLDrBtiXON1EThy7_is,4264
415
415
  machineconfig/utils/tst.py,sha256=6u1GI49NdcpxH2BYGAusNfY5q9G_ytCGVzFM5b6HYpM,674
416
- machineconfig/utils/upgrade_packages.py,sha256=75kabcI-chMiaBnafJ_hdhDUz_GyH7AsDt7rW3hyu9M,5851
416
+ machineconfig/utils/upgrade_packages.py,sha256=e4iJn_9vL2zCJxAR2dhKJjM0__ALKgI5yB1uBRxSjhQ,6994
417
417
  machineconfig/utils/ve.py,sha256=L-6PBXnQGXThiwWgheJMQoisAZOZA6SVCbGw2J-GFnI,2414
418
418
  machineconfig/utils/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
419
419
  machineconfig/utils/cloud/onedrive/README.md,sha256=i20oRG110AN0yLF3DARHfWXDJjPBiSgWI8CP2HQAqrk,3774
420
420
  machineconfig/utils/cloud/onedrive/setup_oauth.py,sha256=ZTVkqgrwbV_EoPvyT8dyOTUE0ur3BW4sa9o6QYtt5Bo,2341
421
421
  machineconfig/utils/cloud/onedrive/transaction.py,sha256=m-aNcnWj_gfZVvJOSpkdIqjZxU_3nXx2CA-qKbQgP3I,26232
422
- machineconfig/utils/files/ascii_art.py,sha256=cNJaJC07vx94fS44-tzgfbfBeCwXVrgpnWGBLUnfC38,5212
422
+ machineconfig/utils/files/ascii_art.py,sha256=SQkayd2r_PkvLCNRjNnq5JzYz8t_dOMHquiJ3E6-9Ck,5216
423
423
  machineconfig/utils/files/dbms.py,sha256=B7Mns8g774kfeXZwcuGWUpRnSgiOtS6khn8faRH5rQs,11390
424
- machineconfig/utils/files/headers.py,sha256=E5wBiGcGxKcDkvg0tjz8gIQ3Gyw4m6d0miG2WQ1Vscw,3388
424
+ machineconfig/utils/files/headers.py,sha256=B8Gs1IhLBc5q2kDZYxwf8u7m6XHpqvCXX1UO8_l0wt4,3490
425
425
  machineconfig/utils/files/read.py,sha256=QDxLEIYi0NcgAys97IVB6IUl4S9CiFP6TKGxUxRBJOM,4330
426
426
  machineconfig/utils/files/art/fat_croco.txt,sha256=Gz-qK0YZT4pnPA16hlsCVZN3HrBAPW_1hEv3IZTy01Q,637
427
427
  machineconfig/utils/files/art/halfwit_croco.txt,sha256=To3-lWfcnonx2Ap71lVYyJ6PTK04G78L3uCM10-hCRk,437
@@ -439,8 +439,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
439
439
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
440
440
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
441
441
  machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
442
- machineconfig-7.33.dist-info/METADATA,sha256=jIsXECnBbSryO78-tfoeKhByuuFypTknuXi-eHNXb3Q,3396
443
- machineconfig-7.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
444
- machineconfig-7.33.dist-info/entry_points.txt,sha256=T5NQvd_TI1WrquhIeQU3TbtMauWDXz3hCB1a_3K3KLY,642
445
- machineconfig-7.33.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
446
- machineconfig-7.33.dist-info/RECORD,,
442
+ machineconfig-7.35.dist-info/METADATA,sha256=h2_UKoPjXTg_yZsNVpehXSjHkBjoz9YF9th-BMftBxE,3396
443
+ machineconfig-7.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
444
+ machineconfig-7.35.dist-info/entry_points.txt,sha256=T5NQvd_TI1WrquhIeQU3TbtMauWDXz3hCB1a_3K3KLY,642
445
+ machineconfig-7.35.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
446
+ machineconfig-7.35.dist-info/RECORD,,