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

@@ -125,16 +125,12 @@ if __name__ == "__main__":
125
125
 
126
126
  def force_fresh_process_check(self, tab_name: str, layout_config: LayoutConfig) -> CommandStatus:
127
127
  """Force a fresh process check with additional validation."""
128
- # Find the tab with the given name
129
- tab_config = None
130
128
  for tab in layout_config["layoutTabs"]:
131
129
  if tab["tabName"] == tab_name:
132
130
  tab_config = tab
133
131
  break
134
-
135
- if tab_config is None:
132
+ else:
136
133
  return {"status": "unknown", "error": f"Tab '{tab_name}' not found in layout config", "running": False, "command": "", "tab_name": tab_name, "processes": [], "remote": self.remote_executor.remote_name}
137
-
138
134
  command = tab_config["command"]
139
135
 
140
136
  try:
@@ -37,17 +37,11 @@ class Read:
37
37
  raise ImportError(err) from err2
38
38
  @staticmethod
39
39
  def json(path: 'Path', r: bool = False, **kwargs: Any) -> Any: # return could be list or dict etc
40
- import json
41
- try:
42
- mydict = json.loads(Path(path).read_text(encoding='utf-8'), **kwargs)
43
- except Exception:
44
- import pyjson5
45
- mydict = pyjson5.loads(Path(path).read_text(encoding='utf-8'), **kwargs) # file has C-style comments.
46
- _ = r
47
- return mydict
40
+ from machineconfig.utils.io import read_json
41
+ return read_json(path, r=r, **kwargs)
48
42
  @staticmethod
49
43
  def yaml(path: 'Path', r: bool = False) -> Any: # return could be list or dict etc
50
- import yaml # type: ignore
44
+ import yaml
51
45
  with open(str(path), "r", encoding="utf-8") as file:
52
46
  mydict = yaml.load(file, Loader=yaml.FullLoader)
53
47
  _ = r
machineconfig/utils/io.py CHANGED
@@ -61,9 +61,14 @@ def read_json(path: "Path", r: bool = False, **kwargs: Any) -> Any: # return co
61
61
  try:
62
62
  mydict = json.loads(Path(path).read_text(encoding="utf-8"), **kwargs)
63
63
  except Exception:
64
- import pyjson5
65
-
66
- mydict = pyjson5.loads(Path(path).read_text(encoding="utf-8"), **kwargs) # file has C-style comments.
64
+ import re
65
+ def remove_comments(text: str) -> str:
66
+ # remove all // single-line comments
67
+ text = re.sub(r'//.*', '', text)
68
+ # remove all /* … */ block comments (non-greedy)
69
+ text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL)
70
+ return text
71
+ mydict = json.loads(remove_comments(Path(path).read_text(encoding="utf-8")), **kwargs)
67
72
  _ = r
68
73
  return mydict
69
74
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 6.32
3
+ Version: 6.34
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -23,14 +23,12 @@ Requires-Dist: psutil>=7.0.0
23
23
  Requires-Dist: gitpython>=3.1.44
24
24
  Requires-Dist: pyfzf>=0.3.1
25
25
  Requires-Dist: rclone-python>=0.1.23
26
- Requires-Dist: pyjson5>=1.6.9
27
26
  Requires-Dist: questionary>=2.1.1
28
27
  Requires-Dist: typer-slim>=0.19.2
29
28
  Requires-Dist: typer>=0.19.2
30
29
  Provides-Extra: windows
31
30
  Requires-Dist: pywin32; extra == "windows"
32
31
  Provides-Extra: plot
33
- Requires-Dist: duckdb-engine>=0.17.0; extra == "plot"
34
32
  Requires-Dist: sqlalchemy>=2.0.43; extra == "plot"
35
33
  Requires-Dist: ipykernel>=6.30.1; extra == "plot"
36
34
  Requires-Dist: ipython>=9.5.0; extra == "plot"
@@ -34,7 +34,7 @@ machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py,sha256=t5EWN
34
34
  machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py,sha256=zA_PGkaMFVkRjxjXHl0FcyCQ9BASFSTP7ZnEgQ_rtyE,2996
35
35
  machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py,sha256=FMpwaSeDCc71pEiVk99s8f5NkZEQ8zKQNUuaSXojgq4,4615
36
36
  machineconfig/cluster/sessions_managers/zellij_utils/monitoring_types.py,sha256=8l8OAfWYy5xv-EaVqtXLqvPo9YaR9i8kFqGMhPzk0nw,2616
37
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py,sha256=RI3x_J-smtXFwDVGbU-KDViN61Xhz57yPL_pqUUqHj4,13690
37
+ machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py,sha256=0UL4b-uq15IWKx4ryLR3lgF2V9VDIHUAWPMhcFyAwng,13602
38
38
  machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py,sha256=IMaoZ4nczs5XwPTObXno6mu0x7es4yNa9cAi4u6GkEU,2601
39
39
  machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py,sha256=7JLq8HY-NWbJfzHfxaok_o1KrIwzMCK_PUnsdZYfzuA,4929
40
40
  machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py,sha256=Tlq8liGIs1wCOu6JOk2VUAVCaTzQmbyITSVZMMWvlwA,3830
@@ -386,7 +386,7 @@ machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
386
386
  machineconfig/utils/accessories.py,sha256=W_9dLzjwNTW5JQk_pe3B2ijQ1nA2-8Kdg2r7VBtzgQs,4340
387
387
  machineconfig/utils/code.py,sha256=f0K5abTIBBurK5pSM_VRtW_npFjK18UvIG_BEyzOv40,8912
388
388
  machineconfig/utils/installer.py,sha256=puFcMe-oNAeqTW0jz1NAEil8HRtxY4B6Z0VAeq_jH-o,10493
389
- machineconfig/utils/io.py,sha256=rzEwAnq-gyT29Y4CDHHGxAA6ddIIFOCxrqZ6dn0ALa4,2255
389
+ machineconfig/utils/io.py,sha256=4dSieoqZO8Vvi4vW8lLoITDHBvmFp4dtl3kyeZHQ6Co,2528
390
390
  machineconfig/utils/links.py,sha256=KM6vIn3hag9FYEzLSHP5MAM9tU_RStw2mCq2_OvmmZA,23672
391
391
  machineconfig/utils/meta.py,sha256=fDn7cpq6iqAPzX2eKLSK9DZb0870rluR7eLDx5NgNaw,5994
392
392
  machineconfig/utils/notifications.py,sha256=tuXIudcip0tEioG-bm8BbLr3FMDve4f6BktlznBhKxM,9013
@@ -409,7 +409,7 @@ machineconfig/utils/cloud/onedrive/transaction.py,sha256=m-aNcnWj_gfZVvJOSpkdIqj
409
409
  machineconfig/utils/files/ascii_art.py,sha256=cNJaJC07vx94fS44-tzgfbfBeCwXVrgpnWGBLUnfC38,5212
410
410
  machineconfig/utils/files/dbms.py,sha256=B7Mns8g774kfeXZwcuGWUpRnSgiOtS6khn8faRH5rQs,11390
411
411
  machineconfig/utils/files/headers.py,sha256=F-sudsZ1JyAcmZNO4FdcyhoClbCdb2vMlqceT36zfhE,3717
412
- machineconfig/utils/files/read.py,sha256=R1bvIIdiFX9N0JyzUISqVfewYFq30cY3z0kqSlKGtuA,4566
412
+ machineconfig/utils/files/read.py,sha256=QDxLEIYi0NcgAys97IVB6IUl4S9CiFP6TKGxUxRBJOM,4330
413
413
  machineconfig/utils/files/ouch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
414
414
  machineconfig/utils/files/ouch/decompress.py,sha256=7qPaEkMerBBXzeZyFn8hLODHZJv1aty-yGgwBxLgVys,1413
415
415
  machineconfig/utils/installer_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -422,8 +422,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
422
422
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
423
423
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
424
424
  machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
425
- machineconfig-6.32.dist-info/METADATA,sha256=vVj42KcByWj_yUt6oAbD7f23iUI4tnUbWvnyX2RsIQM,3012
426
- machineconfig-6.32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
427
- machineconfig-6.32.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
428
- machineconfig-6.32.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
429
- machineconfig-6.32.dist-info/RECORD,,
425
+ machineconfig-6.34.dist-info/METADATA,sha256=5cFlsHoKRZNBJa8SqW5i9hmdyPCwo_jU7P9q7NyIP58,2928
426
+ machineconfig-6.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
427
+ machineconfig-6.34.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
428
+ machineconfig-6.34.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
429
+ machineconfig-6.34.dist-info/RECORD,,