machineconfig 5.75__py3-none-any.whl → 5.76__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.
- machineconfig/profile/mapper.toml +0 -8
- machineconfig/scripts/python/ai/command_runner/command_runner.sh +9 -0
- machineconfig/scripts/python/ai/command_runner/prompt.txt +9 -0
- machineconfig/scripts/python/devops_helpers/cli_self.py +8 -3
- machineconfig/scripts/python/devops_helpers/devops_update_repos.py +3 -1
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +7 -7
- machineconfig/scripts/python/helpers_repos/secure_repo.py +1 -1
- {machineconfig-5.75.dist-info → machineconfig-5.76.dist-info}/METADATA +1 -1
- {machineconfig-5.75.dist-info → machineconfig-5.76.dist-info}/RECORD +12 -10
- {machineconfig-5.75.dist-info → machineconfig-5.76.dist-info}/WHEEL +0 -0
- {machineconfig-5.75.dist-info → machineconfig-5.76.dist-info}/entry_points.txt +0 -0
- {machineconfig-5.75.dist-info → machineconfig-5.76.dist-info}/top_level.txt +0 -0
|
@@ -50,14 +50,6 @@ brave = {this = '~/.local/share/applications', to_this = '~/dotfiles/config/weba
|
|
|
50
50
|
[wt_windows]
|
|
51
51
|
settings = { this = '~/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json', to_this = 'CONFIG_ROOT/settings/shells/wt/settings.json' }
|
|
52
52
|
|
|
53
|
-
# [wsl_windows]
|
|
54
|
-
# home = {this = '~/wsl', to_this = '\\wsl.localhost\Ubuntu-22.04\home\username'}
|
|
55
|
-
# see \\wsl$ and ~\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
|
|
56
|
-
# config = {this = '~/.wslconfig', to_this = 'CONFIG_ROOT/settings/wsl/.wslconfig'}
|
|
57
|
-
|
|
58
|
-
# [wsl_linux]
|
|
59
|
-
# home = {this = '~/win', to_this = '/mnt/c/Users/username'}
|
|
60
|
-
|
|
61
53
|
|
|
62
54
|
# =================== LLMs ============================
|
|
63
55
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
TERMINAL_OUTPUT_PATH_RAW="/.ai/terminal/debug/terminal_output_raw.txt"
|
|
3
|
+
TERMINAL_OUTPUT_PATH="/.ai/terminal/debug/terminal_output.txt"
|
|
4
|
+
> $TERMINAL_OUTPUT_PATH
|
|
5
|
+
echo "New run is underway. If you are reading this message, it means the execution has not finished yet, and you will need to wait. Once done you won't see this message and you will see terminal output instead." >> $TERMINAL_OUTPUT_PATH
|
|
6
|
+
echo "Starting new uv run..."
|
|
7
|
+
COLUMNS=200 unbuffer uv run /home/alex/code/bytesense/exchanges/src/exchanges/cli/cli_binance.py b > $TERMINAL_OUTPUT_PATH_RAW 2>&1
|
|
8
|
+
cat $TERMINAL_OUTPUT_PATH_RAW | sed -r "s/\x1B\[[0-9;]*[mK]//g" > $TERMINAL_OUTPUT_PATH
|
|
9
|
+
# watchexec --watch ./.ai/terminal/make_output.sh --watch . -e py -- bash ./.ai/terminal/make_output.sh
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
I have started a watch-exec server in my terminal and its working now.
|
|
3
|
+
I have set it up to re-run thi script `.ai/terminal/debug/command_runner.sh` automatically.
|
|
4
|
+
A re-run is triggered upon any change of any python file in the repo, or, any change in the make_output.sh script itself.
|
|
5
|
+
The script redirects the output from terminal to the file ./.ai/debug/terminal_output.txt
|
|
6
|
+
Run takes 50 ms only. So by the time you finish editing any python file or the command runner script, the new output is ready for you to read in that text file,
|
|
7
|
+
this makes it much faster for you to iterate because pulling the terminal and closing it every time is a bit slow.
|
|
8
|
+
Please use the terminal_output.txt as your main iteration driver.
|
|
9
|
+
please fix the mistakes that you can see in terminal output.
|
|
@@ -4,9 +4,14 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def update():
|
|
7
|
-
"""🔄 UPDATE
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"""🔄 UPDATE uv and machineconfig"""
|
|
8
|
+
code = """
|
|
9
|
+
uv self update
|
|
10
|
+
uv tool install --upgrade machineconfig
|
|
11
|
+
"""
|
|
12
|
+
from machineconfig.utils.code import run_shell_script
|
|
13
|
+
run_shell_script(code)
|
|
14
|
+
|
|
10
15
|
def interactive():
|
|
11
16
|
"""🤖 INTERACTIVE configuration of machine."""
|
|
12
17
|
from machineconfig.scripts.python.interactive import main
|
|
@@ -238,11 +238,13 @@ def main(verbose: bool = True, allow_password_prompt: bool = False) -> None:
|
|
|
238
238
|
padding=(1, 2),
|
|
239
239
|
)
|
|
240
240
|
)
|
|
241
|
+
update_repos(repos, allow_password_prompt)
|
|
241
242
|
|
|
243
|
+
|
|
244
|
+
def update_repos(repos: list[Path], allow_password_prompt: bool) -> None:
|
|
242
245
|
# Process repositories in parallel
|
|
243
246
|
results: list[RepositoryUpdateResult] = []
|
|
244
247
|
repos_with_changes = []
|
|
245
|
-
|
|
246
248
|
with ThreadPoolExecutor(max_workers=min(len(repos), 8)) as executor:
|
|
247
249
|
# Submit all tasks
|
|
248
250
|
future_to_repo = {
|
|
@@ -20,7 +20,7 @@ def main(
|
|
|
20
20
|
cloud: Optional[str] = typer.Option(None, "--cloud", "-c", help="Cloud storage profile name. If not provided, uses default from config."),
|
|
21
21
|
repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Path to the local repository. Defaults to current working directory."),
|
|
22
22
|
message: Optional[str] = typer.Option(None, "--message", "-m", help="Commit message for local changes."),
|
|
23
|
-
on_conflict: Literal["ask", "
|
|
23
|
+
on_conflict: Literal["ask", "push-local-merge", "overwrite-local", "stop-on-conflict", "remove-rclone-conflict"] = typer.Option("ask", "--on-conflict", "-oc", help="Action to take on merge conflict. Default is 'ask'."),
|
|
24
24
|
pwd: Optional[str] = typer.Option(None, "--password", help="Password for encryption/decryption of the remote repository."),
|
|
25
25
|
):
|
|
26
26
|
if cloud is None:
|
|
@@ -101,7 +101,7 @@ git pull originEnc master
|
|
|
101
101
|
return "done"
|
|
102
102
|
from machineconfig.utils.meta import function_to_script
|
|
103
103
|
program_1_py = function_to_script(func=func2, call_with_args=None, call_with_kwargs={"remote_repo": str(repo_remote_root), "local_repo": str(repo_local_root), "cloud": cloud_resolved})
|
|
104
|
-
shell_file_1 = get_shell_file_executing_python_script(python_script=program_1_py, ve_path=None, executable="uv run --with machineconfig")
|
|
104
|
+
shell_file_1 = get_shell_file_executing_python_script(python_script=program_1_py, ve_path=None, executable="""uv run --with "machineconfig>=5.74" """)
|
|
105
105
|
# ================================================================================
|
|
106
106
|
option2 = "Delete local repo and replace it with remote copy:"
|
|
107
107
|
program_2 = f"""
|
|
@@ -122,7 +122,7 @@ sudo chmod +x $HOME/dotfiles/scripts/linux -R
|
|
|
122
122
|
inspect_repos(repo_local_root=repo_local_root, repo_remote_root=repo_remote_root)
|
|
123
123
|
return "done"
|
|
124
124
|
program_3_py = function_to_script(func=func, call_with_args=None, call_with_kwargs={"repo_local_root": str(repo_local_root), "repo_remote_root": str(repo_remote_root)})
|
|
125
|
-
shell_file_3 = get_shell_file_executing_python_script(python_script=program_3_py, ve_path=None, executable="uv run --with machineconfig")
|
|
125
|
+
shell_file_3 = get_shell_file_executing_python_script(python_script=program_3_py, ve_path=None, executable="""uv run --with "machineconfig>=5.74" """)
|
|
126
126
|
# ================================================================================
|
|
127
127
|
|
|
128
128
|
option4 = "Remove problematic rclone file from repo and replace with remote:"
|
|
@@ -159,13 +159,13 @@ git commit -am "finished merging"
|
|
|
159
159
|
program_content = program_4
|
|
160
160
|
else:
|
|
161
161
|
raise NotImplementedError(f"Choice {choice} not implemented.")
|
|
162
|
-
case "
|
|
162
|
+
case "push-local-merge":
|
|
163
163
|
program_content = shell_file_1.read_text(encoding="utf-8")
|
|
164
|
-
case "
|
|
164
|
+
case "overwrite-local":
|
|
165
165
|
program_content = program_2
|
|
166
|
-
case "
|
|
166
|
+
case "stop-on-conflict":
|
|
167
167
|
program_content = shell_file_3.read_text(encoding="utf-8")
|
|
168
|
-
case "
|
|
168
|
+
case "remove-rclone-conflict":
|
|
169
169
|
program_content = program_4
|
|
170
170
|
case _:
|
|
171
171
|
raise ValueError(f"Unknown action: {on_conflict}")
|
|
@@ -8,7 +8,7 @@ def main(
|
|
|
8
8
|
cloud: Optional[str] = typer.Option(None, "--cloud", "-c", help="Cloud storage profile name. If not provided, uses default from config."),
|
|
9
9
|
repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Path to the local repository. Defaults to current working directory."),
|
|
10
10
|
message: Optional[str] = typer.Option(None, "--message", "-m", help="Commit message for local changes."),
|
|
11
|
-
on_conflict: Literal["ask", "
|
|
11
|
+
on_conflict: Literal["ask", "push-local-merge", "overwrite-local", "stop-on-conflict", "remove-rclone-conflict"] = typer.Option("ask", "--on-conflict", "-oc", help="Action to take on merge conflict. Default is 'ask'."),
|
|
12
12
|
pwd: Optional[str] = typer.Option(None, "--password", help="Password for encryption/decryption of the remote repository."),
|
|
13
13
|
):
|
|
14
14
|
from machineconfig.scripts.python.helpers_repos.cloud_repo_sync import main as program_content
|
|
@@ -98,7 +98,7 @@ machineconfig/profile/create_helper.py,sha256=_iNeuwmcEGTx6sf_f40JKHfOCuJRZQRpyE
|
|
|
98
98
|
machineconfig/profile/create_links.py,sha256=K7T2bq08GZP9fo2NzCOE0pojAgQDe0Ofe7fNfbQlQpw,14219
|
|
99
99
|
machineconfig/profile/create_links_export.py,sha256=OEmuJE-F7FZX5xvOl1rqJzHg_BWtPKCiWdrq4RPOobs,3173
|
|
100
100
|
machineconfig/profile/create_shell_profile.py,sha256=ifsEAK90ovvY7ftyxuY5-Xh8f2JuQYX7IMYUXp6x2Sw,9538
|
|
101
|
-
machineconfig/profile/mapper.toml,sha256=
|
|
101
|
+
machineconfig/profile/mapper.toml,sha256=Rh-GZFn6HSIc9PxD6qqnjcY6QnMbuJaXBtI2SSNBXx4,12352
|
|
102
102
|
machineconfig/profile/records/generic/shares.toml,sha256=FduDztfyQtZcr5bfx-RSKhEEweweQSWfVXkKWnx8hCY,143
|
|
103
103
|
machineconfig/profile/records/linux/apps_summary_report.csv,sha256=pw9djvaRUPalKDLn2sl3odcbD2_Zx3aEupsQ8UPfaaY,2738
|
|
104
104
|
machineconfig/profile/records/linux/apps_summary_report.md,sha256=l77oofA6Rliql0ZgKGIZi8bstFoGyyGTxeS8p2PtOj0,5634
|
|
@@ -134,6 +134,8 @@ machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
134
134
|
machineconfig/scripts/python/ai/generate_files.py,sha256=VfjKdwgF8O6E4oiRtfWNliibLmmwGe7f9ld6wpOsXTw,14498
|
|
135
135
|
machineconfig/scripts/python/ai/initai.py,sha256=9SZtWOcRuwk8ZU3wHOfPzjInERD79ZTYFY8tVACgza4,2260
|
|
136
136
|
machineconfig/scripts/python/ai/vscode_tasks.py,sha256=61wMMIhtNTUO8Zvl8IziEdyadzgi5H0h8ACwq3cw6Ho,1255
|
|
137
|
+
machineconfig/scripts/python/ai/command_runner/command_runner.sh,sha256=PRaQyeI3lDi3s8pm_0xZc71gRvUFO0bEt8o1g1rwwD4,761
|
|
138
|
+
machineconfig/scripts/python/ai/command_runner/prompt.txt,sha256=-2NFBMf-8yk5pOe-3LBX3RTIhqIZHJS_m-v4k-j9sWI,779
|
|
137
139
|
machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1,sha256=m_z4vzLrvi6bgTZumN8twcbIWb9i8ZHfVJPE8jPdxyc,5074
|
|
138
140
|
machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=Mt9D0LSEwbvVaq_wxTAch4NLyFUuDGHjn6rtEt_9alU,4615
|
|
139
141
|
machineconfig/scripts/python/ai/solutions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -177,14 +179,14 @@ machineconfig/scripts/python/devops_helpers/cli_config_dotfile.py,sha256=rjTys4F
|
|
|
177
179
|
machineconfig/scripts/python/devops_helpers/cli_data.py,sha256=kvJ7g2CccjjXIhCwdu_Vlif8JHC0qUoLjuGcTSqT-IU,514
|
|
178
180
|
machineconfig/scripts/python/devops_helpers/cli_nw.py,sha256=U-W6ox-7ctGqQcjFWsDwZKmqQdl1etz9CMOes-B0Wgc,2959
|
|
179
181
|
machineconfig/scripts/python/devops_helpers/cli_repos.py,sha256=HJH5ZBob_Uzhc3fDgG9riOeW6YEJt88xTjQYcEUPmUY,12015
|
|
180
|
-
machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=
|
|
182
|
+
machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=Zw8x_YhbH6XjLt24RLBmmzPVmLcA_OZYrVBlN-i4Zmo,3863
|
|
181
183
|
machineconfig/scripts/python/devops_helpers/cli_share_server.py,sha256=285OzxttCx7YsrpOkaapMKP1eVGHmG5TkkaSQnY7i3c,3976
|
|
182
184
|
machineconfig/scripts/python/devops_helpers/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
|
|
183
185
|
machineconfig/scripts/python/devops_helpers/devops_add_identity.py,sha256=wvjNgqsLmqD2SxbNCW_usqfp0LI-TDvcJJKGOWt2oFw,3775
|
|
184
186
|
machineconfig/scripts/python/devops_helpers/devops_add_ssh_key.py,sha256=gjp2bv-nrGvSsQGHNIpE83yJqza2gj1FXJkimUtZwmU,9119
|
|
185
187
|
machineconfig/scripts/python/devops_helpers/devops_backup_retrieve.py,sha256=nK47Rc7gQuDCnkk6_sW1y82gBnDJ9TdHU8XwMPFBK9c,5591
|
|
186
188
|
machineconfig/scripts/python/devops_helpers/devops_status.py,sha256=PJVPhfhXq8der6Xd-_fjZfnizfM-RGfJApkRGhGBmNo,20525
|
|
187
|
-
machineconfig/scripts/python/devops_helpers/devops_update_repos.py,sha256=
|
|
189
|
+
machineconfig/scripts/python/devops_helpers/devops_update_repos.py,sha256=qYS3vT-VECxXI4MXgmRMHAqbVX19aj0U_zobhyM_nGI,10130
|
|
188
190
|
machineconfig/scripts/python/devops_helpers/themes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
189
191
|
machineconfig/scripts/python/devops_helpers/themes/choose_pwsh_theme.ps1,sha256=58gFOeynADHLTdk8zqEnndBtyNGrln0jvpo76O0UWTw,3136
|
|
190
192
|
machineconfig/scripts/python/devops_helpers/themes/choose_wezterm_theme.py,sha256=pRXAGe2IpysYshsaF8CKEwHI8EGPtLcM8PtiAqM7vmM,3425
|
|
@@ -219,9 +221,9 @@ machineconfig/scripts/python/helpers_fire_command/fire_jobs_args_helper.py,sha25
|
|
|
219
221
|
machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py,sha256=4MrlCVijbx7GQyAN9s5LDh-7heSjMXYrXdqiP6uC3ug,5378
|
|
220
222
|
machineconfig/scripts/python/helpers_fire_command/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
221
223
|
machineconfig/scripts/python/helpers_repos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
222
|
-
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=
|
|
224
|
+
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=fVKbiAov7qGMszzlpFo-B15JDQQSs0PU0uXhVz6v80M,9609
|
|
223
225
|
machineconfig/scripts/python/helpers_repos/grource.py,sha256=IywQ1NDPcLXM5Tr9xhmq4tHfYspLRs3pF20LP2TlgIQ,14595
|
|
224
|
-
machineconfig/scripts/python/helpers_repos/secure_repo.py,sha256=
|
|
226
|
+
machineconfig/scripts/python/helpers_repos/secure_repo.py,sha256=g0o3SHBwicro1K51IY1Wg0_rkBJQ3esHPcsfNHu4Q8A,1005
|
|
225
227
|
machineconfig/scripts/python/nw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
226
228
|
machineconfig/scripts/python/nw/mount_drive,sha256=zemKofv7hOmRN_V3qK0q580GkfWw3VdikyVVQyiu8j8,3514
|
|
227
229
|
machineconfig/scripts/python/nw/mount_nfs,sha256=DdJqswbKLu8zqlVR3X6Js30D4myJFPVzHHNkWTJqDUQ,1855
|
|
@@ -416,8 +418,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
|
|
|
416
418
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
417
419
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
418
420
|
machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
419
|
-
machineconfig-5.
|
|
420
|
-
machineconfig-5.
|
|
421
|
-
machineconfig-5.
|
|
422
|
-
machineconfig-5.
|
|
423
|
-
machineconfig-5.
|
|
421
|
+
machineconfig-5.76.dist-info/METADATA,sha256=721YpHsqSxaReb8xGu_j03HCJvY7RQgcek0YANHylX0,3103
|
|
422
|
+
machineconfig-5.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
423
|
+
machineconfig-5.76.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
|
|
424
|
+
machineconfig-5.76.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
425
|
+
machineconfig-5.76.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|