machineconfig 5.37__py3-none-any.whl → 5.38__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 (87) hide show
  1. machineconfig/cluster/remote/script_execution.py +0 -1
  2. machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +0 -2
  3. machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +12 -12
  4. machineconfig/jobs/installer/installer_data.json +53 -2
  5. machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +1 -3
  6. machineconfig/scripts/linux/{share_cloud.sh → other/share_cloud.sh} +3 -0
  7. machineconfig/scripts/python/ai/solutions/generic.py +1 -0
  8. machineconfig/scripts/python/croshell.py +5 -2
  9. machineconfig/scripts/python/devops.py +4 -21
  10. machineconfig/scripts/python/devops_helpers/cli_nw.py +2 -1
  11. machineconfig/scripts/python/devops_helpers/cli_repos.py +1 -3
  12. machineconfig/scripts/python/devops_helpers/cli_self.py +6 -6
  13. machineconfig/scripts/python/devops_helpers/cli_share_server.py +109 -0
  14. machineconfig/scripts/python/devops_helpers/cli_terminal.py +35 -23
  15. machineconfig/scripts/python/devops_helpers/devops_update_repos.py +63 -44
  16. machineconfig/scripts/python/devops_helpers/themes/choose_pwsh_theme.ps1 +16 -15
  17. machineconfig/scripts/python/devops_navigator.py +183 -80
  18. machineconfig/scripts/python/helpers_fire/{fire_gemini.py → agentic_frameworks/fire_gemini.py} +12 -9
  19. machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_qwen.py +43 -0
  20. machineconfig/scripts/python/helpers_fire/fire_agents_help_launch.py +4 -4
  21. machineconfig/scripts/python/helpers_fire/template.ps1 +29 -0
  22. machineconfig/scripts/python/interactive.py +3 -2
  23. machineconfig/scripts/python/nw/mount_nw_drive +1 -2
  24. machineconfig/scripts/windows/mounts/share_nfs.ps1 +0 -0
  25. machineconfig/settings/lf/linux/lfrc +0 -2
  26. machineconfig/settings/lf/windows/lfrc +0 -4
  27. machineconfig/settings/shells/bash/commands.sh +24 -0
  28. machineconfig/settings/shells/bash/init.sh +5 -0
  29. machineconfig/settings/shells/pwsh/commands.ps1 +33 -0
  30. machineconfig/settings/shells/pwsh/init.ps1 +4 -0
  31. machineconfig/setup_windows/machineconfig.ps1 +2 -0
  32. machineconfig/utils/files/dbms.py +4 -1
  33. machineconfig/utils/installer_utils/installer.py +12 -0
  34. machineconfig/utils/installer_utils/installer_abc.py +26 -9
  35. machineconfig/utils/installer_utils/installer_class.py +1 -1
  36. machineconfig/utils/io.py +0 -18
  37. machineconfig/utils/scheduler.py +3 -4
  38. {machineconfig-5.37.dist-info → machineconfig-5.38.dist-info}/METADATA +7 -4
  39. {machineconfig-5.37.dist-info → machineconfig-5.38.dist-info}/RECORD +59 -82
  40. machineconfig/jobs/windows/start_terminal.ps1 +0 -6
  41. machineconfig/jobs/windows/startup_file.cmd +0 -2
  42. machineconfig/scripts/cloud/init.sh +0 -105
  43. machineconfig/scripts/linux/agents +0 -2
  44. machineconfig/scripts/linux/cloud +0 -2
  45. machineconfig/scripts/linux/croshell +0 -3
  46. machineconfig/scripts/linux/devops +0 -2
  47. machineconfig/scripts/linux/fire +0 -2
  48. machineconfig/scripts/linux/ftpx +0 -2
  49. machineconfig/scripts/linux/kill_process +0 -2
  50. machineconfig/scripts/linux/sessions +0 -2
  51. machineconfig/scripts/linux/start_terminals +0 -3
  52. machineconfig/scripts/windows/agents.ps1 +0 -1
  53. machineconfig/scripts/windows/cloud.ps1 +0 -1
  54. machineconfig/scripts/windows/croshell.ps1 +0 -1
  55. machineconfig/scripts/windows/devops.ps1 +0 -1
  56. machineconfig/scripts/windows/fire.ps1 +0 -1
  57. machineconfig/scripts/windows/ftpx.ps1 +0 -1
  58. machineconfig/scripts/windows/gpt.ps1 +0 -1
  59. machineconfig/scripts/windows/grep.ps1 +0 -2
  60. machineconfig/scripts/windows/kill_process.ps1 +0 -1
  61. machineconfig/scripts/windows/nano.ps1 +0 -3
  62. machineconfig/scripts/windows/scheduler.ps1 +0 -1
  63. machineconfig/scripts/windows/sessions.ps1 +0 -1
  64. machineconfig/scripts/windows/snapshot.ps1 +0 -1
  65. machineconfig/scripts/windows/start_terminals.ps1 +0 -1
  66. machineconfig/scripts/windows/wsl_rdp_windows_port_forwarding.ps1 +0 -46
  67. machineconfig/scripts/windows/wsl_ssh_windows_port_forwarding.ps1 +0 -76
  68. /machineconfig/scripts/linux/{share_nfs → other/share_nfs} +0 -0
  69. /machineconfig/scripts/linux/{share_smb → other/share_smb} +0 -0
  70. /machineconfig/scripts/linux/{start_docker → other/start_docker} +0 -0
  71. /machineconfig/scripts/linux/{switch_ip → other/switch_ip} +0 -0
  72. /machineconfig/scripts/{windows/share_nfs.ps1 → python/helpers_fire/agentic_frameworks/__init__.py} +0 -0
  73. /machineconfig/scripts/python/helpers_fire/{fire_crush.json → agentic_frameworks/fire_crush.json} +0 -0
  74. /machineconfig/scripts/python/helpers_fire/{fire_crush.py → agentic_frameworks/fire_crush.py} +0 -0
  75. /machineconfig/scripts/python/helpers_fire/{fire_cursor_agents.py → agentic_frameworks/fire_cursor_agents.py} +0 -0
  76. /machineconfig/scripts/windows/{mount_nfs.ps1 → mounts/mount_nfs.ps1} +0 -0
  77. /machineconfig/scripts/windows/{mount_nw.ps1 → mounts/mount_nw.ps1} +0 -0
  78. /machineconfig/scripts/windows/{mount_smb.ps1 → mounts/mount_smb.ps1} +0 -0
  79. /machineconfig/scripts/windows/{mount_ssh.ps1 → mounts/mount_ssh.ps1} +0 -0
  80. /machineconfig/scripts/windows/{pomodoro.ps1 → mounts/pomodoro.ps1} +0 -0
  81. /machineconfig/scripts/windows/{reload_path.ps1 → mounts/reload_path.ps1} +0 -0
  82. /machineconfig/scripts/windows/{share_cloud.cmd → mounts/share_cloud.cmd} +0 -0
  83. /machineconfig/scripts/windows/{share_smb.ps1 → mounts/share_smb.ps1} +0 -0
  84. /machineconfig/scripts/windows/{unlock_bitlocker.ps1 → mounts/unlock_bitlocker.ps1} +0 -0
  85. {machineconfig-5.37.dist-info → machineconfig-5.38.dist-info}/WHEEL +0 -0
  86. {machineconfig-5.37.dist-info → machineconfig-5.38.dist-info}/entry_points.txt +0 -0
  87. {machineconfig-5.37.dist-info → machineconfig-5.38.dist-info}/top_level.txt +0 -0
@@ -66,14 +66,14 @@ sleep 0.1
66
66
  assert provider == "google", "Gemini agent only works with google provider."
67
67
  api_keys = get_api_keys(provider="google")
68
68
  api_key = api_keys[idx % len(api_keys)] if len(api_keys) > 0 else None
69
- from machineconfig.scripts.python.helpers_fire.fire_gemini import fire_gemini
70
- cmd = fire_gemini(api_key=api_key, prompt_path=prompt_path, machine=machine)
69
+ from machineconfig.scripts.python.helpers_fire.agentic_frameworks.fire_gemini import fire_gemini
70
+ cmd = fire_gemini(api_key=api_key, prompt_path=prompt_path, machine=machine, model="gemini-2.5-pro", provider="google", repo_root=repo_root)
71
71
  case "cursor-agent":
72
- from machineconfig.scripts.python.helpers_fire.fire_cursor_agents import fire_cursor
72
+ from machineconfig.scripts.python.helpers_fire.agentic_frameworks.fire_cursor_agents import fire_cursor
73
73
  cmd = fire_cursor(prompt_path=prompt_path, machine=machine, api_key=None)
74
74
  raise NotImplementedError("Cursor agent is not implemented yet, api key missing")
75
75
  case "crush":
76
- from machineconfig.scripts.python.helpers_fire.fire_crush import fire_crush
76
+ from machineconfig.scripts.python.helpers_fire.agentic_frameworks.fire_crush import fire_crush
77
77
  api_keys = get_api_keys(provider=provider)
78
78
  api_key = api_keys[idx % len(api_keys)] if len(api_keys) > 0 else None
79
79
  cmd = fire_crush(api_key=api_key, prompt_path=prompt_path, machine=machine, repo_root=repo_root, model=model, provider=provider)
@@ -0,0 +1,29 @@
1
+ #Requires -Version 5.1
2
+
3
+ $JOB_NAME = "outpatient_mapping"
4
+ $REPO_ROOT = "$HOME/code/machineconfig"
5
+ $CONTEXT_PATH = "$REPO_ROOT/src/machineconfig/scripts/python/fire_jobs.py"
6
+ $PROMPT_PATH = "$REPO_ROOT/src/machineconfig/scripts/python/helpers_fire/prompt.txt"
7
+
8
+ $AGENTS_DIR = "$REPO_ROOT/.ai/agents/$JOB_NAME"
9
+ $LAYOUT_PATH_UNBALANCED = "$REPO_ROOT/.ai/agents/$JOB_NAME/layout_unbalanced.json"
10
+
11
+ agents create `
12
+ --context-path "$CONTEXT_PATH" `
13
+ --tasks-per-prompt 1 `
14
+ --machine docker `
15
+ --agent crush `
16
+ --model "zai/glm-4.6" `
17
+ --provider openrouter `
18
+ --separator 'def ' `
19
+ --prompt-path "$PROMPT_PATH" `
20
+ --output-path "$LAYOUT_PATH_UNBALANCED" `
21
+ --agents-dir "$AGENTS_DIR"
22
+
23
+ # $LAYOUT_BALANCED_PATH = "$REPO_ROOT/.ai/agents/$JOB_NAME/layout_balanced.json"
24
+ # sessions balance-load $LAYOUT_PATH --max-thresh 6 --breaking-method moreLayouts --thresh-type number --output-path $LAYOUT_BALANCED_PATH
25
+ # sessions run $LAYOUT_BALANCED_PATH --kill-upon-completion
26
+
27
+ sessions run $LAYOUT_PATH_UNBALANCED
28
+
29
+ # agents collect $AGENTS_DIR "$REPO_ROOT/.ai/agents/$JOB_NAME/collected.txt"
@@ -51,8 +51,9 @@ def display_header() -> None:
51
51
  ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
52
52
  """
53
53
 
54
+ import machineconfig
54
55
  version = get_machineconfig_version()
55
- title = f"✨ MACHINE CONFIGURATION v{version} ✨"
56
+ title = f"✨ MACHINE CONFIGURATION v{version}, @ {machineconfig.__file__} ✨"
56
57
  subtitle = "🎯 Your digital life manager. Dotfiles, data, code and more."
57
58
  bug_report = "🐛 Please report bugs to Alex Al-Saffar @ https://github.com/thisismygitrepo/machineconfig"
58
59
 
@@ -108,7 +109,7 @@ def get_installation_choices() -> list[str]:
108
109
  ]
109
110
  # Add Windows-specific options
110
111
  if platform.system() == "Windows":
111
- choices.append(Choice(value="install_windows_desktop", title="💻 Install Windows Desktop Apps - Brave, Windows Terminal, PowerShell, VSCode (Windows only)", checked=False))
112
+ choices.append(Choice(value="install_windows_desktop", title="💻 Install Windows Desktop Apps - Install nerd fonts and set WT config.", checked=False))
112
113
  selected = questionary.checkbox("Select the installation options you want to execute:", choices=choices, show_description=True).ask()
113
114
  return selected or []
114
115
 
@@ -17,8 +17,7 @@ drive_location=''
17
17
  mount_point=''
18
18
  username=''
19
19
  password=''
20
-
21
- uv run --PYTHON 3.13 --no-dev --project $HOME/code/machineconfig python -m machineconfig.scripts.python.mount_nw_drive
20
+ machineconfig.scripts.python.mount_nw_drive
22
21
 
23
22
  # Check if mount point directory exists, create if not
24
23
  if [ ! -d "$mount_point" ]; then
File without changes
@@ -116,10 +116,8 @@ map jc cd ~/code
116
116
  map jd cd ~/data
117
117
  map jD cd ~/Downloads
118
118
  map jx cd ~/dotfiles
119
- # map jm cd ~/code/machineconfig/src/machineconfig
120
119
  map jh cd ~
121
120
  map jj $~/scripts/croshell -j --read $f
122
- # map jj $lvim ~/code/machineconfig/src/machineconfig/settings/lf/linux/lfrc
123
121
 
124
122
  # from https://github.com/gokcehan/lf/wiki/Integrations#zoxide
125
123
  cmd zi ${{
@@ -127,7 +127,3 @@ map Z $~/code/machineconfig/src/machineconfig/settings/lf/windows/cd_zoxide2.ps1
127
127
 
128
128
  cmd doc $lf -doc | bat
129
129
 
130
- # cmd pre-cd $~/code/machineconfig/src/machineconfig/settings/lf/windows/precd.ps1
131
- # cmd on-cd $~/code/machineconfig/src/machineconfig/settings/lf/windows/oncd.ps1
132
- # cmd on-quit ~/code/machineconfig/src/machineconfig/settings/lf/windows/onquit.ps1
133
-
@@ -0,0 +1,24 @@
1
+ devops() {
2
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig devops "$@"
3
+ }
4
+ agents() {
5
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig agents "$@"
6
+ }
7
+ cloud() {
8
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig cloud "$@"
9
+ }
10
+ croshell() {
11
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig croshell "$@"
12
+ }
13
+ fire() {
14
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig fire "$@"
15
+ }
16
+ ftpx() {
17
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig ftpx "$@"
18
+ }
19
+ kill_process() {
20
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig kill_process "$@"
21
+ }
22
+ sessions() {
23
+ "$HOME/.local/bin/uv" run --python 3.13 --no-dev --project $HOME/code/machineconfig sessions "$@"
24
+ }
@@ -31,6 +31,11 @@ machineconfig_path=$HOME/code/machineconfig/src/machineconfig
31
31
  . $machineconfig_path/settings/lf/linux/exe/lfcd.sh
32
32
  . $machineconfig_path/settings/tere/terecd.sh
33
33
 
34
+ # Check if $HOME/code/machineconfig directory exists and source commands.sh
35
+ if [ -d "$HOME/code/machineconfig" ]; then
36
+ source $HOME/code/machineconfig/src/machineconfig/settings/shells/bash/commands.sh
37
+ fi
38
+
34
39
  # set alias l to lsd -la
35
40
  alias l='lsd -la'
36
41
  alias gcs='gh copilot suggest -t shell'
@@ -0,0 +1,33 @@
1
+
2
+ function devops {
3
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig devops $args
4
+ }
5
+
6
+ function devops {
7
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig cloud $args
8
+ }
9
+
10
+ function devops {
11
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig croshell $args
12
+ }
13
+
14
+ function devops {
15
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig agents $args
16
+ }
17
+
18
+ function devops {
19
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig fire $args
20
+ }
21
+
22
+ function devops {
23
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig ftpx $args
24
+ }
25
+
26
+ function devops {
27
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig sessions $args
28
+ }
29
+
30
+ function devops {
31
+ & "$HOME\.local\bin\uv.exe" run --python 3.13 --with machineconfig kill_process $args
32
+ }
33
+
@@ -31,6 +31,10 @@ Add-ToPathIfNotAlready -Directories @(
31
31
  . $HOME/code/machineconfig/src/machineconfig/settings/lf/windows/lfcd.ps1
32
32
  . $HOME/code/machineconfig/src/machineconfig/settings/tere/terecd.ps1
33
33
 
34
+ if (Test-Path "$HOME/code/machineconfig" -PathType Container) {
35
+ . "$HOME/code/machineconfig/src/machineconfig/settings/shells/pwsh/commands.ps1"
36
+ }
37
+
34
38
  function lsdla { lsd -la }
35
39
  Set-Alias -Name l -Value lsdla -Option AllScope
36
40
 
@@ -25,3 +25,5 @@ if (Test-Path "machineconfig") {
25
25
  cd $HOME\code\machineconfig
26
26
  & "$HOME\.local\bin\uv.exe" sync --no-dev
27
27
  echo "Finished setting up repos"
28
+
29
+ # uv tool install machineconfig
@@ -167,7 +167,10 @@ class DBMS:
167
167
  url = path
168
168
  else:
169
169
  path_str = str(P(path))
170
- url = f'sqlite:///{path_str}'
170
+ if path_str.endswith('.duckdb'):
171
+ url = f'duckdb:///{path_str}'
172
+ else:
173
+ url = f'sqlite:///{path_str}'
171
174
  connect_args = {}
172
175
  if share_across_threads and 'sqlite' in url:
173
176
  connect_args['check_same_thread'] = False
@@ -180,6 +180,18 @@ def install_clis(clis_names: list[str]):
180
180
  return None
181
181
 
182
182
 
183
+ def install_if_missing(which: str):
184
+ # uv run --python 3.13 --with machineconfig devops install ttyd
185
+ from machineconfig.utils.installer_utils.installer_abc import check_tool_exists
186
+ exists = check_tool_exists(which)
187
+ if exists:
188
+ print(f"✅ {which} is already installed.")
189
+ return
190
+ print(f"⏳ {which} not found. Installing...")
191
+ from machineconfig.utils.installer_utils.installer import main
192
+ main(which=which)
193
+
194
+
183
195
  if __name__ == "__main__":
184
196
  from machineconfig.utils.schemas.installer.installer_types import InstallerData
185
197
  from machineconfig.utils.installer_utils.installer_class import Installer
@@ -1,4 +1,3 @@
1
-
2
1
  from machineconfig.utils.path_extended import PathExtended
3
2
  from machineconfig.utils.source_of_truth import WINDOWS_INSTALL_PATH, LINUX_INSTALL_PATH, INSTALL_VERSION_ROOT
4
3
 
@@ -9,7 +8,7 @@ import platform
9
8
 
10
9
 
11
10
  def find_move_delete_windows(downloaded_file_path: PathExtended, exe_name: Optional[str] = None, delete: bool = True, rename_to: Optional[str] = None):
12
- print(f"🔍 PROCESSING WINDOWS EXECUTABLE 🔍")
11
+ print("🔍 PROCESSING WINDOWS EXECUTABLE 🔍")
13
12
  if exe_name is not None and ".exe" in exe_name:
14
13
  exe_name = exe_name.replace(".exe", "")
15
14
  if downloaded_file_path.is_file():
@@ -54,7 +53,7 @@ def find_move_delete_windows(downloaded_file_path: PathExtended, exe_name: Optio
54
53
 
55
54
 
56
55
  def find_move_delete_linux(downloaded: PathExtended, tool_name: str, delete: Optional[bool] = True, rename_to: Optional[str] = None):
57
- print(f"🔍 PROCESSING LINUX EXECUTABLE 🔍")
56
+ print("🔍 PROCESSING LINUX EXECUTABLE 🔍")
58
57
  if downloaded.is_file():
59
58
  exe = downloaded
60
59
  print(f"📄 Found direct executable file: {exe}")
@@ -114,14 +113,32 @@ def find_move_delete_linux(downloaded: PathExtended, tool_name: str, delete: Opt
114
113
 
115
114
  def check_tool_exists(tool_name: str) -> bool:
116
115
  if platform.system() == "Windows":
117
- tool_name = tool_name.replace(".exe", "") + ".exe"
118
- res1 = any([Path(WINDOWS_INSTALL_PATH).joinpath(tool_name).is_file(), Path.home().joinpath("AppData/Roaming/npm").joinpath(tool_name).is_file()])
119
- tool_name = tool_name.replace(".exe", "") + ".exe"
120
- res2 = any([Path(WINDOWS_INSTALL_PATH).joinpath(tool_name).is_file(), Path.home().joinpath("AppData/Roaming/npm").joinpath(tool_name).is_file()])
121
- return res1 or res2
116
+ tool_name_exe = tool_name.replace(".exe", "") + ".exe"
117
+ res1 = any([Path(WINDOWS_INSTALL_PATH).joinpath(tool_name_exe).is_file(), Path.home().joinpath("AppData/Roaming/npm").joinpath(tool_name_exe).is_file()])
118
+ if res1:
119
+ return True
120
+ tool_name_no_exe = tool_name.replace(".exe", "")
121
+ res2 = any([Path(WINDOWS_INSTALL_PATH).joinpath(tool_name_no_exe).is_file(), Path.home().joinpath("AppData/Roaming/npm").joinpath(tool_name_no_exe).is_file()])
122
+ return res2
122
123
  elif platform.system() in ["Linux", "Darwin"]:
123
124
  root_path = Path(LINUX_INSTALL_PATH)
124
- return any([Path("/usr/local/bin").joinpath(tool_name).is_file(), Path("/usr/bin").joinpath(tool_name).is_file(), root_path.joinpath(tool_name).is_file()])
125
+ standard_checks = [
126
+ Path("/usr/local/bin").joinpath(tool_name).is_file(),
127
+ Path("/usr/bin").joinpath(tool_name).is_file(),
128
+ root_path.joinpath(tool_name).is_file()
129
+ ]
130
+ if any(standard_checks):
131
+ return True
132
+ # Check for npm packages via nvm
133
+ npm_check = False
134
+ try:
135
+ result = subprocess.run(["node", "--version"], capture_output=True, text=True, check=True)
136
+ version = result.stdout.strip().lstrip('v')
137
+ nvm_bin_path = Path.home() / ".nvm" / "versions" / "node" / f"v{version}" / "bin" / tool_name
138
+ npm_check = nvm_bin_path.is_file()
139
+ except subprocess.CalledProcessError:
140
+ pass
141
+ return npm_check
125
142
  else:
126
143
  raise NotImplementedError(f"platform {platform.system()} not implemented")
127
144
  def is_executable_in_path(executable_name: str) -> bool:
@@ -30,7 +30,7 @@ class Installer:
30
30
 
31
31
  def _get_exe_name(self) -> str:
32
32
  """Derive executable name from app name by converting to lowercase and removing spaces."""
33
- return self.installer_data["appName"].lower().replace(" ", "").replace("-", "")
33
+ return self.installer_data["appName"].lower().replace(" ", "") # .replace("-", "")
34
34
 
35
35
  def install_robust(self, version: Optional[str]) -> str:
36
36
  try:
machineconfig/utils/io.py CHANGED
@@ -35,24 +35,6 @@ def save_json(obj: Any, path: PathLike, indent: Optional[int] = None, verbose: b
35
35
  return Path(path_obj)
36
36
 
37
37
 
38
- # def save_toml(obj: Mapping[str, Any], path: PathLike, verbose: bool = False) -> Path:
39
- # path_obj = _ensure_parent(path)
40
- # with open(path_obj, "w", encoding="utf-8") as fh:
41
- # toml.dump(obj, fh)
42
- # if verbose:
43
- # print(f"Saved toml -> {path_obj}")
44
- # return Path(path_obj)
45
-
46
-
47
- # def save_yaml(obj: Any, path: PathLike, verbose: bool = False) -> Path:
48
- # path_obj = _ensure_parent(path)
49
- # with open(path_obj, "w", encoding="utf-8") as fh:
50
- # yaml.safe_dump(obj, fh, sort_keys=False)
51
- # if verbose:
52
- # print(f"Saved yaml -> {path_obj}")
53
- # return Path(path_obj)
54
-
55
-
56
38
  def save_ini(path: PathLike, obj: Mapping[str, Mapping[str, Any]], verbose: bool = False) -> Path:
57
39
  cp = configparser.ConfigParser()
58
40
  for section, values in obj.items():
@@ -1,6 +1,6 @@
1
1
 
2
2
  from pathlib import Path
3
- from typing import Callable, Optional, Union, Any, TypeVar, Protocol, List, Generic
3
+ from typing import Callable, Optional, Union, Any, Protocol, List, TypeVar
4
4
  import logging
5
5
  import time
6
6
  from datetime import datetime, timezone, timedelta
@@ -144,18 +144,17 @@ class Scheduler:
144
144
  raise ex
145
145
 
146
146
 
147
- T = TypeVar("T")
147
+ # T = TypeVar("T")
148
148
  T2 = TypeVar("T2")
149
149
 
150
150
 
151
151
  def to_pickle(obj: Any, path: Path) -> None:
152
152
  import pickle
153
-
154
153
  path.parent.mkdir(parents=True, exist_ok=True)
155
154
  path.write_bytes(pickle.dumps(obj))
156
155
 
157
156
 
158
- class Cache(Generic[T]): # This class helps to accelrate access to latest data coming from expensive function. The class has two flavours, memory-based and disk-based variants."""
157
+ class Cache[T](): # This class helps to accelrate access to latest data coming from expensive function. The class has two flavours, memory-based and disk-based variants."""
159
158
  def __init__(
160
159
  self, source_func: Callable[[], T], expire: timedelta, logger: LoggerTemplate, path: Optional[Path] = None, saver: Callable[[T, Path], Any] = to_pickle, reader: Callable[[Path], T] = from_pickle, name: Optional[str] = None
161
160
  ) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 5.37
3
+ Version: 5.38
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -9,7 +9,7 @@ Project-URL: Bug Tracker, https://github.com/thisismygitrepo/machineconfig/issue
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.13
12
+ Requires-Python: <3.14,>=3.13
13
13
  Description-Content-Type: text/markdown
14
14
  Requires-Dist: cryptography>=44.0.2
15
15
  Requires-Dist: fire>=0.7.0
@@ -24,9 +24,8 @@ Requires-Dist: gitpython>=3.1.44
24
24
  Requires-Dist: pyfzf>=0.3.1
25
25
  Requires-Dist: rclone-python>=0.1.23
26
26
  Requires-Dist: pyjson5>=1.6.9
27
- Requires-Dist: typer-slim>=0.19.2
28
27
  Requires-Dist: questionary>=2.1.1
29
- Requires-Dist: typer>=0.19.2
28
+ Requires-Dist: typer-slim>=0.19.2
30
29
  Provides-Extra: windows
31
30
  Requires-Dist: pywin32; extra == "windows"
32
31
  Provides-Extra: plot
@@ -86,5 +85,9 @@ iex (iwr bit.ly/cfgwindows).Content
86
85
  # Author
87
86
  Alex Al-Saffar. [email](mailto:programmer@usa.com)
88
87
 
88
+ # Contributor
89
+ Ruby Chan. [email](mailto:ruby.chan@sa.gov.au)
90
+
91
+
89
92
  [![Alex's github activity graph](https://github-readme-activity-graph.vercel.app/graph?username=thisismygitrepo)](https://github.com/ashutosh00710/github-readme-activity-graph)
90
93