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

@@ -2145,7 +2145,7 @@
2145
2145
  }
2146
2146
  },
2147
2147
  {
2148
- "appName": "github-copilot-cli",
2148
+ "appName": "copilot",
2149
2149
  "repoURL": "CMD",
2150
2150
  "doc": "Terminal-based CLI agents and tools for productivity and coding.",
2151
2151
  "fileNamePattern": {
@@ -8,6 +8,8 @@ from typing import Annotated, Optional
8
8
  import typer
9
9
  from machineconfig.utils.path_extended import PathExtended
10
10
  from machineconfig.utils.accessories import randstr
11
+ import json
12
+ import shutil
11
13
 
12
14
  from machineconfig.utils.options import choose_from_options
13
15
  from rich.console import Console
@@ -62,7 +64,6 @@ except Exception as e:
62
64
  """
63
65
 
64
66
 
65
-
66
67
  def croshell(
67
68
  path: Annotated[Optional[str], typer.Argument(help="path of file to read.")] = "",
68
69
  python: Annotated[bool, typer.Option("--python", "-p", help="flag to use python over IPython.")] = False,
@@ -71,6 +72,7 @@ def croshell(
71
72
  vscode: Annotated[bool, typer.Option("--vscode", "-c", help="open the script in vscode")] = False,
72
73
  streamlit_viewer: Annotated[bool, typer.Option("--stViewer", "-s", help="view in streamlit app")] = False,
73
74
  visidata: Annotated[bool, typer.Option("--visidata", "-V", help="open data file in visidata")] = False,
75
+ marimo: Annotated[bool, typer.Option("--marimo", "-m", help="open the notebook using marimo if available")] = False,
74
76
  local: Annotated[bool, typer.Option("--local", "-l", help="run in local mode, not in virtual env.")]= False,
75
77
  ) -> None:
76
78
  # ==================================================================================
@@ -135,10 +137,40 @@ from pathlib import Path
135
137
  ipython_profile = ipython_profile if ipython_profile is not None else "default"
136
138
  # ve_activateion_line = get_ve_activate_line(ve_name=args.ve or ve_profile_suggested, a_path=str(PathExtended.cwd()))
137
139
 
140
+ # prepare notebook target path (avoid relying on locals())
141
+ nb_target = pyfile.with_suffix(".ipynb")
142
+ if jupyter:
143
+ try:
144
+ nb_path = pyfile.with_suffix(".ipynb")
145
+ nb_content = {
146
+ "cells": [
147
+ {
148
+ "cell_type": "code",
149
+ "metadata": {"language": "python"},
150
+ "source": [python_program],
151
+ "outputs": [],
152
+ "execution_count": None,
153
+ }
154
+ ],
155
+ "metadata": {},
156
+ "nbformat": 4,
157
+ "nbformat_minor": 5,
158
+ }
159
+ nb_path.write_text(json.dumps(nb_content), encoding="utf-8")
160
+ nb_target = nb_path
161
+ except Exception:
162
+ # if writing fails, fall back to the default nb_target already set
163
+ pass
138
164
  if visidata:
139
165
  fire_line = f"uv run --with visidata,pyarrow vd {str(file_obj)}"
166
+ elif marimo:
167
+ fire_line = f"""
168
+ cd {str(pyfile.parent)}
169
+ uv run --with marimo marimo convert {pyfile.name} -o marimo_nb.py
170
+ uv run --with "marimo,machineconfig[plot]>=6.36" marimo edit marimo_nb.py
171
+ """
140
172
  elif jupyter:
141
- fire_line = f"uv run --with 'machineconfig[plot]>=6.36' jupyter-lab {str(pyfile)}"
173
+ fire_line = f"uv run --with 'machineconfig[plot]>=6.36' jupyter-lab {str(nb_target)}"
142
174
  elif vscode:
143
175
  fire_line = f"""
144
176
  cd {str(pyfile.parent)}
@@ -40,7 +40,7 @@ alias a=agents
40
40
  alias s=sessions
41
41
  alias ff=ftpx
42
42
  alias f=fire
43
- alias cs=croshell
43
+ alias r=croshell
44
44
 
45
45
  # alias gcs='gh copilot suggest -t shell'
46
46
  # alias gcg='gh copilot suggest -t git'
@@ -92,7 +92,6 @@ def get_installed_cli_apps():
92
92
 
93
93
 
94
94
  def get_installers(os: OPERATING_SYSTEMS, arch: CPU_ARCHITECTURES, which_cats: Optional[list[PACKAGE_GROUPS]]) -> list[InstallerData]:
95
- print("🔍 LOADING INSTALLER CONFIGURATIONS 🔍")
96
95
  res_all = get_all_installer_data_files()
97
96
  acceptable_apps_names: list[str] | None = None
98
97
  if which_cats is not None:
@@ -109,19 +108,14 @@ def get_installers(os: OPERATING_SYSTEMS, arch: CPU_ARCHITECTURES, which_cats: O
109
108
  if installer_data["fileNamePattern"][arch][os] is None:
110
109
  continue
111
110
  all_installers.append(installer_data)
112
- print(f"✅ Loaded {len(all_installers)} installer configurations")
113
111
  return all_installers
114
112
 
115
113
 
116
114
  def get_all_installer_data_files() -> list[InstallerData]:
117
- print("📂 LOADING CONFIGURATION FILES 📂")
118
115
  import machineconfig.jobs.installer as module
119
116
  from pathlib import Path
120
-
121
- print("📂 Loading configuration files...")
122
117
  res_raw: InstallerDataFiles = read_json(Path(module.__file__).parent.joinpath("installer_data.json"))
123
118
  res_final: list[InstallerData] = res_raw["installers"]
124
- print(f"Loaded: {len(res_final)} installer categories")
125
119
  return res_final
126
120
 
127
121
 
@@ -65,7 +65,7 @@ class Installer:
65
65
  if repo_url == "CMD":
66
66
  if any(pm in installer_arch_os for pm in ["npm ", "pip ", "winget ", "brew ", "curl "]):
67
67
  package_manager = installer_arch_os.split(" ", maxsplit=1)[0]
68
- print(f"📦 Using package manager: {package_manager}")
68
+ print(f"📦 Using package manager: {installer_arch_os}")
69
69
  desc = package_manager + " installation"
70
70
  version_to_be_installed = package_manager + "Latest"
71
71
  result = subprocess.run(installer_arch_os, shell=True, capture_output=True, text=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 6.38
3
+ Version: 6.39
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -47,7 +47,7 @@ machineconfig/cluster/templates/cli_trogon.py,sha256=PFWGy8SFYIhT9r3ZV4oIEYfImsQ
47
47
  machineconfig/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  machineconfig/jobs/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  machineconfig/jobs/installer/check_installations.py,sha256=uFuxhgI8rIMtClcGmuc9gpG6iJ7X0__peGUQfGkreT8,10778
50
- machineconfig/jobs/installer/installer_data.json,sha256=C61tOaLDkoyWyoIwyGc7_QxPsasITwoFUhuMhqlLk6M,75416
50
+ machineconfig/jobs/installer/installer_data.json,sha256=NDm-igW86P2LmyaNn5lAOePE4ikjyx_Tj3mfNnQ4vgE,75405
51
51
  machineconfig/jobs/installer/package_groups.py,sha256=i4z83F_rk7BVsrwFhz5Vn4SLF0IHxyQBFSxpAaZBl8M,5270
52
52
  machineconfig/jobs/installer/custom/gh.py,sha256=gn7TUSrsLx7uqFqj1Z-iYglS0EYBSgtJ9jWHxaJIfXM,4119
53
53
  machineconfig/jobs/installer/custom/hx.py,sha256=YQClQXqWtGvon8BLFGf1Fp20JPkHgZeEZ6ebmCJQQfI,5838
@@ -122,7 +122,7 @@ machineconfig/scripts/linux/other/switch_ip,sha256=NQfeKMBSbFY3eP6M-BadD-TQo5qMP
122
122
  machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  machineconfig/scripts/python/agents.py,sha256=f5UxgXjGlEypoNFqK0uHKO0UkbV_wUmPiPzotL2yapM,10677
124
124
  machineconfig/scripts/python/cloud.py,sha256=jwftTQGhIP39wIKHB1lQbcbmo2dMnWoTcs-Wly3Ql5U,1263
125
- machineconfig/scripts/python/croshell.py,sha256=9tNsAtPxAiq3i9smFBPXenDjRXZRjudXN4DQabXvBvo,7562
125
+ machineconfig/scripts/python/croshell.py,sha256=QGn4m8Q-Ha9Ytmuf13lWrEAu1oRiREGOVGb9DXpTgUg,8813
126
126
  machineconfig/scripts/python/devops.py,sha256=NMiGkw5w3svn7mgxkfCd9jTiVlqQp6GglU8BmclYBQ8,2393
127
127
  machineconfig/scripts/python/devops_navigator.py,sha256=4O9_-ACeP748NcMjWQXZF7mBQpMPxqCGhLvPG3DMi4Q,236
128
128
  machineconfig/scripts/python/entry.py,sha256=Az7dK1eXHGW5l46Yg10Cd88VChCdhvLAzO3e1A3r56A,2176
@@ -325,7 +325,7 @@ machineconfig/settings/rofi/config.rasi,sha256=nDX5B8wdXQYF1fwiOTBRJUI4l_gQbYaLa
325
325
  machineconfig/settings/rofi/config_default.rasi,sha256=rTfKnC-bZuWX1l-lWQACCUOE1ShhkfykAxtXX9PlQHE,4694
326
326
  machineconfig/settings/shells/alacritty/alacritty.toml,sha256=EbL-2Y4QunW1pvRWB2yuLCw8MMPONheJr5LFoWRieUQ,871
327
327
  machineconfig/settings/shells/alacritty/alacritty.yml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
328
- machineconfig/settings/shells/bash/init.sh,sha256=wVG9lTNy0C8CVSnt-6TSSM3EHRwPc7uU7jz3WVSrI3c,2266
328
+ machineconfig/settings/shells/bash/init.sh,sha256=CNGdll7P4uaF1ascaMYOwLad2EdUNaHJTMFuMSilsmQ,2265
329
329
  machineconfig/settings/shells/hyper/.hyper.js,sha256=h-HqeYlvPvPD4Ee7828Cxo87uVkzbMGJFqXTZIWoegw,8884
330
330
  machineconfig/settings/shells/ipy/profiles/default/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
331
  machineconfig/settings/shells/ipy/profiles/default/startup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -386,7 +386,7 @@ machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6
386
386
  machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
387
387
  machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VBtzgQs,4340
388
388
  machineconfig/utils/code.py,sha256=f0K5abTIBBurK5pSM_VRtW_npFjK18UvIG_BEyzOv40,8912
389
- machineconfig/utils/installer.py,sha256=puFcMe-oNAeqTW0jz1NAEil8HRtxY4B6Z0VAeq_jH-o,10493
389
+ machineconfig/utils/installer.py,sha256=wNkX2r6dlZD9zmuIkBKj5AliNPfI9zVWgtu8XqgUVIg,10204
390
390
  machineconfig/utils/io.py,sha256=4dSieoqZO8Vvi4vW8lLoITDHBvmFp4dtl3kyeZHQ6Co,2528
391
391
  machineconfig/utils/links.py,sha256=KM6vIn3hag9FYEzLSHP5MAM9tU_RStw2mCq2_OvmmZA,23672
392
392
  machineconfig/utils/meta.py,sha256=fDn7cpq6iqAPzX2eKLSK9DZb0870rluR7eLDx5NgNaw,5994
@@ -421,14 +421,14 @@ machineconfig/utils/installer_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
421
421
  machineconfig/utils/installer_utils/github_release_bulk.py,sha256=WJf_qZlF02SmIc6C7o1h4Gy4gAaJAfeAS8O9s2Itj-k,6535
422
422
  machineconfig/utils/installer_utils/installer.py,sha256=aqoAUv2gQoiIrg9ErxLh_kZWyFk3dOL4HEVxXEyAmW4,11178
423
423
  machineconfig/utils/installer_utils/installer_abc.py,sha256=cXNDIhq1itdGUCxososxfJo029eMlVOj6hu8GY22gC4,11672
424
- machineconfig/utils/installer_utils/installer_class.py,sha256=apLMLmpZfHbj4I5ttgwg0ZIp66B5vx2nPtuhEobGdWM,17186
424
+ machineconfig/utils/installer_utils/installer_class.py,sha256=t9OlHF3br7zuYuLuO75voedRPrDmo9YOXSDxRNXe3Jk,17188
425
425
  machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=Xbi59rU35AzR7HZZ8ZQ8aUu_FjSgijNqc8Sme0rCk2Y,2050
426
426
  machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoSpdmTIdgS9LS-RvE-QZ-D260tD3o,1214
427
427
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
428
428
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
429
429
  machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
430
- machineconfig-6.38.dist-info/METADATA,sha256=6e6Ug8k0c-VCksk17REAfgAGp_aGkxYune9TgFCbC5U,2928
431
- machineconfig-6.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
432
- machineconfig-6.38.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
433
- machineconfig-6.38.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
434
- machineconfig-6.38.dist-info/RECORD,,
430
+ machineconfig-6.39.dist-info/METADATA,sha256=h45L-aED_75AZ7TbztQtJ9swgkS8dz7UkX6CqT8ZDYk,2928
431
+ machineconfig-6.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
432
+ machineconfig-6.39.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
433
+ machineconfig-6.39.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
434
+ machineconfig-6.39.dist-info/RECORD,,