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

@@ -37,12 +37,14 @@ def get_shell_profile_path() -> PathExtended:
37
37
 
38
38
  def create_default_shell_profile() -> None:
39
39
  shell_profile_path = get_shell_profile_path()
40
+ if not shell_profile_path.exists():
41
+ console.print(Panel(f"""🆕 PROFILE | Profile does not exist at `{shell_profile_path}`. Creating a new one.""", title="[bold blue]Profile[/bold blue]", border_style="blue"))
42
+ shell_profile_path.parent.mkdir(parents=True, exist_ok=True)
43
+ shell_profile_path.write_text("", encoding="utf-8")
40
44
  shell_profile = shell_profile_path.read_text(encoding="utf-8")
41
-
42
45
  from machineconfig.profile.create_helper import copy_assets_to_machine
43
46
  copy_assets_to_machine("settings") # init.ps1 or init.sh live here
44
47
  copy_assets_to_machine("scripts") # init scripts are going to reference those scripts.
45
-
46
48
  if system == "Windows":
47
49
  init_script = PathExtended(CONFIG_ROOT).joinpath("settings/shells/pwsh/init.ps1")
48
50
  source_line = f""". {str(init_script.collapseuser(placeholder="$HOME"))}"""
@@ -3,7 +3,7 @@ import typer
3
3
  from typing import Optional, Annotated
4
4
 
5
5
 
6
- def update():
6
+ def update(copy_assets: Annotated[bool, typer.Option(..., "--copy-assets", "-c", help="Copy assets to the machine after the update. Default is True.")] = False):
7
7
  """🔄 UPDATE uv and machineconfig"""
8
8
  # from machineconfig.utils.source_of_truth import LIBRARY_ROOT
9
9
  # repo_root = LIBRARY_ROOT.parent.parent
@@ -23,10 +23,19 @@ def update():
23
23
  import platform
24
24
  if platform.system() == "Windows":
25
25
  from machineconfig.utils.code import run_shell_script_after_exit
26
+ if copy_assets:
27
+ code += """
28
+ devops self copy-assets both
29
+ """
26
30
  run_shell_script_after_exit(code)
27
31
  else:
28
32
  from machineconfig.utils.code import run_shell_script
29
33
  run_shell_script(code)
34
+ if copy_assets:
35
+ import machineconfig.profile.create_helper as create_helper
36
+ create_helper.copy_assets_to_machine(which="scripts")
37
+ create_helper.copy_assets_to_machine(which="settings")
38
+
30
39
 
31
40
  def interactive():
32
41
  """🤖 INTERACTIVE configuration of machine."""
@@ -8,11 +8,11 @@ winget install --no-upgrade --name "Microsoft Visual Studio Code" --Id "Microsof
8
8
  winget install --no-upgrade --name "WezTerm" --Id "wez.wezterm" --source winget --scope user --accept-package-agreements --accept-source-agreements
9
9
  winget install --no-upgrade --name "Oh My Posh" --Id "JanDeDobbeleer.OhMyPosh" --source winget --scope user --accept-package-agreements --accept-source-agreements
10
10
  winget install --no-upgrade --name "Powershell" --Id "Microsoft.PowerShell" --source winget --scope user --accept-package-agreements --accept-source-agreements # powershell require admin
11
- winget install --no-upgrade --name "Starship" --Id "Starship.Starship" --source winget --scope user --accept-package-agreements --accept-source-agreements
12
11
  winget install --no-upgrade --name "Git" --Id "Git.Git" --source winget --scope user --accept-package-agreements --accept-source-agreements
13
12
  winget install --no-upgrade --name "Neovim" --Id "Neovim.Neovim" --source winget --scope user --accept-package-agreements --accept-source-agreements
14
13
  winget install --no-upgrade --name "GNU Nano" --Id "GNU.Nano" --source winget --scope user --accept-package-agreements --accept-source-agreements
15
- winget install --no-upgrade --Id CoreyButler.NVMforWindows --source winget --scope user --accept-package-agreements --accept-source-agreements
14
+ # winget install --no-upgrade --Id "CoreyButler.NVMforWindows" --source winget --scope user --accept-package-agreements --accept-source-agreements
15
+ # winget install --no-upgrade --name "Starship" --Id "Starship.Starship" --source winget --scope user --accept-package-agreements --accept-source-agreements
16
16
  Install-Module -Name Terminal-Icons -Repository PSGallery -Force -AcceptLicense -PassThru -Confirm # -RequiredVersion 2.5.10
17
17
  Install-Module -Name PSFzf -SkipPublisherCheck # -AcceptLicense -PassThru -Confirm # -RequiredVersion 2.5.10
18
18
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 5.97
3
+ Version: 5.99
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -96,7 +96,7 @@ machineconfig/profile/bash_shell_profiles.md,sha256=mio0xkMTwO-F3fikWIfgcdQaPCmQ
96
96
  machineconfig/profile/create_helper.py,sha256=_iNeuwmcEGTx6sf_f40JKHfOCuJRZQRpyE8Fo_3Q6bI,1519
97
97
  machineconfig/profile/create_links.py,sha256=K7T2bq08GZP9fo2NzCOE0pojAgQDe0Ofe7fNfbQlQpw,14219
98
98
  machineconfig/profile/create_links_export.py,sha256=6LW4ZzHhQaox6W-rAuw3_gENTVKmOXA8_JfVDA-Mfws,3294
99
- machineconfig/profile/create_shell_profile.py,sha256=ifsEAK90ovvY7ftyxuY5-Xh8f2JuQYX7IMYUXp6x2Sw,9538
99
+ machineconfig/profile/create_shell_profile.py,sha256=Kxic1RPANP04uFbRuKMJmvkKdduuZ4Y6QNH0vpk0lYs,9888
100
100
  machineconfig/profile/mapper.toml,sha256=50q2VdR_PNLXGljH47R2cxuJvzlJQnq7lkJ05TMtJ5Q,12357
101
101
  machineconfig/profile/records/generic/shares.toml,sha256=FduDztfyQtZcr5bfx-RSKhEEweweQSWfVXkKWnx8hCY,143
102
102
  machineconfig/profile/records/linux/apps_summary_report.csv,sha256=pw9djvaRUPalKDLn2sl3odcbD2_Zx3aEupsQ8UPfaaY,2738
@@ -178,7 +178,7 @@ machineconfig/scripts/python/devops_helpers/cli_config_dotfile.py,sha256=rjTys4F
178
178
  machineconfig/scripts/python/devops_helpers/cli_data.py,sha256=kvJ7g2CccjjXIhCwdu_Vlif8JHC0qUoLjuGcTSqT-IU,514
179
179
  machineconfig/scripts/python/devops_helpers/cli_nw.py,sha256=nI_zmcmUvijVeXIWT2dN5onoy3ou-lub1cL-SJImmDA,4125
180
180
  machineconfig/scripts/python/devops_helpers/cli_repos.py,sha256=GEsW0ykgu8mtoiXurOSjOlbY_Xrngy_aeBq4eRZY8ts,12335
181
- machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=WHrx980iGBMO_A-QiA4NyJ_2bvHBIe1nmhzwbczEOi0,5179
181
+ machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=oBci1GDFyA43ZHu04VpjuBq6MnfCIOKpp5dK7-NxRdw,5638
182
182
  machineconfig/scripts/python/devops_helpers/cli_share_server.py,sha256=q9pFJ6AxPuygMr3onMNOKEuuQHbVE_6Qoyo7xRT5FX0,4196
183
183
  machineconfig/scripts/python/devops_helpers/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
184
184
  machineconfig/scripts/python/devops_helpers/devops_backup_retrieve.py,sha256=nK47Rc7gQuDCnkk6_sW1y82gBnDJ9TdHU8XwMPFBK9c,5591
@@ -370,7 +370,7 @@ machineconfig/setup_linux/ssh/openssh_wsl.sh,sha256=1eeRGrloVB34K5z8yWVUMG5b9pV-
370
370
  machineconfig/setup_linux/web_shortcuts/android.sh,sha256=gzep6bBhK7FCBvGcXK0fdJCtkSfBOftt0aFyDZq_eMs,68
371
371
  machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=bYkiPvnI-UE4n28YZ7nPS1XK-U-flvjtG0wvFKitSBI,442
372
372
  machineconfig/setup_windows/__init__.py,sha256=NnSVZkIBoxoMgkj-_KAqGonH3YziBIWXOKDEcmNAGTY,386
373
- machineconfig/setup_windows/apps.ps1,sha256=G5GqZ9G0aiQr_A-HaahtRdzpaTTdW6n3DRKMZWDTSPc,11214
373
+ machineconfig/setup_windows/apps.ps1,sha256=dmZQZD4ZlNZo9jYkjIS3ag4qDAYZvaLysjmo9ELwBA4,11218
374
374
  machineconfig/setup_windows/uv.ps1,sha256=ukk1Abh-q-RfpoEqI2XTE2dcQJmHk0VFF6WqkK3TW8Q,350
375
375
  machineconfig/setup_windows/others/docker.ps1,sha256=M8NfsSxH8YlmY92J4rSe1xWOwTW8IFrdgb8cI8Riu2E,311
376
376
  machineconfig/setup_windows/others/obs.ps1,sha256=2andchcXpxS3rqZjGaMpY5VShxTAKWvw6eCrayjuaLo,30
@@ -421,8 +421,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
421
421
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
422
422
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
423
423
  machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
424
- machineconfig-5.97.dist-info/METADATA,sha256=XwmDekfD0CrTRF0wu6wfUSYrdFUSY5wBdUZxWzqS0BQ,3012
425
- machineconfig-5.97.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
- machineconfig-5.97.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
427
- machineconfig-5.97.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
428
- machineconfig-5.97.dist-info/RECORD,,
424
+ machineconfig-5.99.dist-info/METADATA,sha256=G9NFaDoL6zzMejwlm735-dnbcJ-L19n5F-KyLi0do0Q,3012
425
+ machineconfig-5.99.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
+ machineconfig-5.99.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
427
+ machineconfig-5.99.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
428
+ machineconfig-5.99.dist-info/RECORD,,