machineconfig 2.3__py3-none-any.whl → 2.5__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/__init__.py +30 -0
- machineconfig/jobs/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/linux/checkout_versions +1 -7
- machineconfig/scripts/linux/choose_wezterm_theme +1 -7
- machineconfig/scripts/linux/cloud_copy +1 -8
- machineconfig/scripts/linux/cloud_manager +1 -7
- machineconfig/scripts/linux/cloud_mount +1 -23
- machineconfig/scripts/linux/cloud_repo_sync +1 -21
- machineconfig/scripts/linux/cloud_sync +1 -23
- machineconfig/scripts/linux/croshell +1 -23
- machineconfig/scripts/linux/devops +1 -23
- machineconfig/scripts/linux/fire +1 -27
- machineconfig/scripts/linux/fire_agents +1 -26
- machineconfig/scripts/linux/ftpx +1 -7
- machineconfig/scripts/linux/gh_models +1 -10
- machineconfig/scripts/linux/kill_process +1 -9
- machineconfig/scripts/linux/mcinit +1 -26
- machineconfig/scripts/linux/mount_nfs +1 -13
- machineconfig/scripts/linux/repos +1 -23
- machineconfig/scripts/linux/scheduler +1 -7
- machineconfig/scripts/linux/start_slidev +1 -22
- machineconfig/scripts/linux/start_terminals +1 -10
- machineconfig/scripts/linux/url2md +1 -9
- machineconfig/scripts/linux/wifi_conn +1 -23
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-313.pyc +0 -0
- machineconfig/scripts/python/cloud_mount.py +4 -2
- machineconfig/scripts/python/cloud_repo_sync.py +5 -2
- machineconfig/scripts/python/cloud_sync.py +4 -2
- machineconfig/scripts/python/croshell.py +5 -3
- machineconfig/scripts/python/devops.py +2 -2
- machineconfig/scripts/python/fire_jobs.py +10 -8
- machineconfig/scripts/python/mount_nfs.py +12 -8
- machineconfig/scripts/python/mount_nw_drive.py +6 -6
- machineconfig/scripts/python/mount_ssh.py +4 -2
- machineconfig/scripts/python/start_slidev.py +4 -2
- machineconfig/scripts/python/start_terminals.py +4 -2
- machineconfig/scripts/windows/checkout_version.ps1 +1 -4
- machineconfig/scripts/windows/choose_wezterm_theme.ps1 +1 -18
- machineconfig/scripts/windows/cloud_copy.ps1 +1 -13
- machineconfig/scripts/windows/cloud_manager.ps1 +1 -8
- machineconfig/scripts/windows/cloud_mount.ps1 +1 -25
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +1 -7
- machineconfig/scripts/windows/cloud_sync.ps1 +1 -21
- machineconfig/scripts/windows/croshell.ps1 +1 -40
- machineconfig/scripts/windows/dotfile.ps1 +1 -7
- machineconfig/scripts/windows/ftpx.ps1 +1 -5
- machineconfig/scripts/windows/kill_process.ps1 +1 -7
- machineconfig/scripts/windows/mcinit.ps1 +1 -4
- machineconfig/scripts/windows/mount_ssh.ps1 +1 -5
- machineconfig/scripts/windows/pomodoro.ps1 +1 -8
- machineconfig/scripts/windows/repos.ps1 +1 -27
- machineconfig/scripts/windows/scheduler.ps1 +1 -6
- machineconfig/scripts/windows/snapshot.ps1 +1 -5
- machineconfig/scripts/windows/start_slidev.ps1 +1 -21
- machineconfig/scripts/windows/start_terminals.ps1 +1 -22
- machineconfig/scripts/windows/wifi_conn.ps1 +1 -5
- machineconfig/scripts/windows/wsl_windows_transfer.ps1 +1 -5
- machineconfig/settings/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/utils/code.py +5 -5
- machineconfig/utils/source_of_truth.py +2 -2
- {machineconfig-2.3.dist-info → machineconfig-2.5.dist-info}/METADATA +1 -1
- {machineconfig-2.3.dist-info → machineconfig-2.5.dist-info}/RECORD +75 -72
- machineconfig-2.5.dist-info/entry_points.txt +20 -0
- machineconfig/scripts/linux/archive/tmate_conn +0 -12
- machineconfig/scripts/linux/archive/tmate_start +0 -12
- machineconfig/scripts/linux/archive/transfer_wsl_win +0 -5
- machineconfig/scripts/windows/archive/gource2vid.ps1 +0 -14
- machineconfig/scripts/windows/archive/im2text.ps1 +0 -27
- machineconfig/scripts/windows/archive/secure_pull.ps1 +0 -46
- machineconfig/scripts/windows/archive/secure_push.ps1 +0 -85
- machineconfig/scripts/windows/archive/tmate_conn.ps1 +0 -7
- machineconfig/scripts/windows/py2exe.ps1 +0 -10
- machineconfig/scripts/windows/utils/op_script_delete.ps1 +0 -7
- machineconfig-2.3.dist-info/entry_points.txt +0 -2
- {machineconfig-2.3.dist-info → machineconfig-2.5.dist-info}/WHEEL +0 -0
- {machineconfig-2.3.dist-info → machineconfig-2.5.dist-info}/top_level.txt +0 -0
machineconfig/__init__.py
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import tomllib
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _get_version() -> str:
|
|
9
|
+
name: str = "machineconfig"
|
|
10
|
+
try:
|
|
11
|
+
return _pkg_version(name)
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
root: Path = Path(__file__).resolve().parents[2]
|
|
16
|
+
pyproject: Path = root / "pyproject.toml"
|
|
17
|
+
if pyproject.is_file():
|
|
18
|
+
with pyproject.open("rb") as f:
|
|
19
|
+
data: dict[str, object] = tomllib.load(f)
|
|
20
|
+
project = data.get("project")
|
|
21
|
+
if isinstance(project, dict):
|
|
22
|
+
version = project.get("version")
|
|
23
|
+
if isinstance(version, str) and version:
|
|
24
|
+
return version
|
|
25
|
+
return "0.0.0"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
__version__: str = _get_version()
|
|
29
|
+
__all__: list[str] = ["__version__"]
|
|
30
|
+
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
python -m fire machineconfig.jobs.python.checkout_version main
|
|
5
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
6
|
-
deactivate || true
|
|
7
|
-
|
|
8
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m fire machineconfig.jobs.python.checkout_version main
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
python -m fire machineconfig.scripts.python.choose_wezterm_theme main
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m fire machineconfig.scripts.python.choose_wezterm_theme main
|
|
5
3
|
source ~/.bashrc # reload the profile
|
|
6
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
7
|
-
deactivate || true
|
|
8
|
-
|
|
9
|
-
fi
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
python -m machineconfig.scripts.python.cloud_copy "$@"
|
|
6
|
-
|
|
7
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
8
|
-
deactivate || true
|
|
9
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.cloud_copy "$@"
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
python -i -m machineconfig.scripts.python.cloud_manager "$@"
|
|
5
|
-
|
|
6
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
7
|
-
deactivate || true
|
|
8
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -i -m machineconfig.scripts.python.cloud_manager "$@"
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# check below if VIRTUAL_ENV is set
|
|
4
|
-
# if [ -z "$VIRTUAL_ENV" ]; then
|
|
5
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
6
|
-
# fi
|
|
7
|
-
|
|
8
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
9
|
-
if [ -f "$op_script" ]; then
|
|
10
|
-
rm $op_script
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
python -m machineconfig.scripts.python.cloud_mount "$@"
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
source $op_script
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, other wise skip
|
|
21
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
22
|
-
deactivate || true
|
|
23
|
-
|
|
24
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.cloud_mount "$@"
|
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
4
|
-
if [ -f "$op_script" ]; then
|
|
5
|
-
rm $op_script
|
|
6
|
-
fi
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
10
|
-
|
|
11
|
-
python $(dirname $(dirname $0))/python/cloud_repo_sync.py "$@"
|
|
12
|
-
|
|
13
|
-
if [ -f "$op_script" ]; then
|
|
14
|
-
chmod +x $op_script
|
|
15
|
-
source $op_script
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
20
|
-
deactivate || true
|
|
21
|
-
|
|
22
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python $(dirname $(dirname $0))/python/cloud_repo_sync.py "$@"
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# check below if VIRTUAL_ENV is set
|
|
4
|
-
# if [ -z "$VIRTUAL_ENV" ]; then
|
|
5
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
6
|
-
# fi
|
|
7
|
-
|
|
8
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
9
|
-
if [ -f "$op_script" ]; then
|
|
10
|
-
rm $op_script
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
python -m machineconfig.scripts.python.cloud_sync "$@"
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
source $op_script
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, other wise skip
|
|
21
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
22
|
-
deactivate
|
|
23
|
-
fi
|
|
24
|
-
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.cloud_sync "$@"
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
5
|
-
if [ -f "$op_script" ]; then
|
|
6
|
-
rm $op_script
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
10
|
-
|
|
11
|
-
python -m machineconfig.scripts.python.croshell "$@"
|
|
12
|
-
# python $(dirname $(dirname $0))/python/fire_jobs.py "$@"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
set -- # clear all positional parameters
|
|
18
|
-
source $op_script # sourcing the script means the args passed to the this script are passed to the sourced script which cofuses the sources script as it contains activate_ve and it doesn't understand first.sh arguments.
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, otherwise skip
|
|
22
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
23
|
-
deactivate || true
|
|
24
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.croshell "$@"
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
4
|
-
if [ -f "$op_script" ]; then
|
|
5
|
-
rm $op_script
|
|
6
|
-
fi
|
|
7
|
-
|
|
8
|
-
# source ~/code/machineconfig/.venv/bin/activate
|
|
9
|
-
# python -m machineconfig.scripts.python.devops "$@"
|
|
10
|
-
# echo "🔄 Running devops script..."
|
|
11
|
-
uv run --no-dev --project $HOME/code/machineconfig python -m machineconfig.scripts.python.devops "$@"
|
|
12
|
-
# uv run --with machineconfig python -m machineconfig.scripts.python.devops "$@"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
source $op_script
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, other wise skip
|
|
22
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
23
|
-
deactivate
|
|
24
|
-
fi
|
|
2
|
+
uv run --python 3.13 --no-dev --project $HOME/code/machineconfig devops
|
machineconfig/scripts/linux/fire
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
# Generate random string of length 5
|
|
6
|
-
random_str=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
|
|
7
|
-
export op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
8
|
-
# op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
9
|
-
|
|
10
|
-
if [ -f "$op_script" ]; then
|
|
11
|
-
rm $op_script
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
python -m machineconfig.scripts.python.fire_jobs "$@"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if [ -f "$op_script" ]; then
|
|
19
|
-
echo "Running $op_script"
|
|
20
|
-
chmod +x $op_script
|
|
21
|
-
set -- # clear all positional parameters
|
|
22
|
-
source $op_script # sourcing the script means the args passed to the this script are passed to the sourced script which cofuses the sources script as it contains activate_ve and it doesn't understand first.sh arguments.
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
27
|
-
deactivate || true
|
|
28
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.fire_jobs "$@"
|
|
@@ -1,27 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# Generate random string of length 5
|
|
7
|
-
random_str=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
|
|
8
|
-
export op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
9
|
-
# op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
10
|
-
|
|
11
|
-
if [ -f "$op_script" ]; then
|
|
12
|
-
rm $op_script
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
python -m machineconfig.scripts.python.fire_agents "$@"
|
|
16
|
-
|
|
17
|
-
if [ -f "$op_script" ]; then
|
|
18
|
-
echo "Running $op_script"
|
|
19
|
-
chmod +x $op_script
|
|
20
|
-
set -- # clear all positional parameters
|
|
21
|
-
source $op_script # sourcing the script means the args passed to the this script are passed to the sourced script which cofuses the sources script as it and it doesn't understand first.sh arguments.
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
26
|
-
deactivate || true
|
|
27
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.fire_agents "$@"
|
machineconfig/scripts/linux/ftpx
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
python $(dirname $(dirname $0))/python/ftpx.py "$@"
|
|
5
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
6
|
-
deactivate || true
|
|
7
|
-
|
|
8
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python $(dirname $(dirname $0))/python/ftpx.py "$@"
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
1
|
#!/usr/bin/env bash
|
|
3
|
-
|
|
4
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
5
|
-
|
|
6
|
-
python -m machineconfig.scripts.python.gh_models "$@"
|
|
7
|
-
|
|
8
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
9
|
-
deactivate || true
|
|
10
|
-
|
|
11
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.gh_models "$@"
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
python -c "from machineconfig.utils.procs import ProcessManager; ProcessManager().choose_and_kill()"
|
|
6
|
-
|
|
7
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
8
|
-
deactivate || true
|
|
9
|
-
|
|
10
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -c "from machineconfig.utils.procs import ProcessManager; ProcessManager().choose_and_kill()"
|
|
@@ -1,27 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
. $HOME/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
# Generate random string of length 5
|
|
6
|
-
random_str=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
|
|
7
|
-
export op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
8
|
-
# op_script=$HOME/tmp_results/shells/$random_str/python_return_command.sh
|
|
9
|
-
|
|
10
|
-
if [ -f "$op_script" ]; then
|
|
11
|
-
rm $op_script
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
python -m machineconfig.scripts.python.ai.mcinit "$@"
|
|
16
|
-
|
|
17
|
-
if [ -f "$op_script" ]; then
|
|
18
|
-
echo "Running $op_script"
|
|
19
|
-
chmod +x $op_script
|
|
20
|
-
set -- # clear all positional parameters
|
|
21
|
-
source $op_script # sourcing the script means the args passed to the this script are passed to the sourced script which cofuses the sources script as it contains activate_ve and it doesn't understand first.sh arguments.
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
26
|
-
deactivate || true
|
|
27
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.ai.mcinit "$@"
|
|
@@ -5,19 +5,7 @@
|
|
|
5
5
|
# mkdir ~/data/local
|
|
6
6
|
# sudo mount -o nolock,noatime,nodiratime,proto=tcp,timeo=600,retrans=2,noac alex-p51s-5:/home/alex/data/local ./data/local
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
10
|
-
if [ -f "$op_script" ]; then
|
|
11
|
-
rm $op_script
|
|
12
|
-
fi
|
|
13
|
-
. activate_ve
|
|
14
|
-
python -m machineconfig.scripts.python.mount_nfs
|
|
15
|
-
#source $HOME/tmp_results/shells/python_return_command.sh
|
|
16
|
-
if [ -f "$op_script" ]; then
|
|
17
|
-
chmod +x $op_script
|
|
18
|
-
source $op_script
|
|
19
|
-
fi
|
|
20
|
-
|
|
8
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.mount_nfs
|
|
21
9
|
# Check if remote server is reachable and share folder exists
|
|
22
10
|
if ! ping -c 1 "$remote_server" &> /dev/null; then
|
|
23
11
|
echo "💥 Error: Remote server $remote_server is not reachable."
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# check below if VIRTUAL_ENV is set
|
|
4
|
-
# if [ -z "$VIRTUAL_ENV" ]; then
|
|
5
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
6
|
-
# fi
|
|
7
|
-
|
|
8
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
9
|
-
if [ -f "$op_script" ]; then
|
|
10
|
-
rm $op_script
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
python -m machineconfig.scripts.python.repos "$@"
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
source $op_script
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, otherwise skip
|
|
22
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
23
|
-
deactivate
|
|
24
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.repos "$@"
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
python -m machineconfig.scripts.python.scheduler "$@"
|
|
5
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
6
|
-
deactivate || true
|
|
7
|
-
|
|
8
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.scheduler "$@"
|
|
@@ -1,23 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
6
|
-
if [ -f "$op_script" ]; then
|
|
7
|
-
rm $op_script
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
python -m machineconfig.scripts.python.start_slidev "$@"
|
|
12
|
-
|
|
13
|
-
if [ -f "$op_script" ]; then
|
|
14
|
-
chmod +x $op_script
|
|
15
|
-
set -- # clear all positional parameters
|
|
16
|
-
source $op_script # sourcing the script means the args passed to the this script are passed to the sourced script which cofuses the sources script as it contains activate_ve and it doesn't understand first.sh arguments.
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
21
|
-
deactivate || true
|
|
22
|
-
|
|
23
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.scripts.python.start_slidev "$@"
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
python -m machineconfig.jobs.python.create_zellij_template
|
|
6
|
-
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.jobs.python.create_zellij_template
|
|
7
3
|
zellij --layout $HOME/tmp_results/tmp_files/templates/zellij_template.kdl
|
|
8
|
-
|
|
9
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
10
|
-
deactivate || true
|
|
11
|
-
|
|
12
|
-
fi
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
4
|
-
|
|
5
|
-
python -m machineconfig.utils.ai.url2md "$@"
|
|
6
|
-
|
|
7
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
8
|
-
deactivate || true
|
|
9
|
-
|
|
10
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python -m machineconfig.utils.ai.url2md "$@"
|
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# check below if VIRTUAL_ENV is set
|
|
4
|
-
# if [ -z "$VIRTUAL_ENV" ]; then
|
|
5
|
-
source ~/code/machineconfig/.venv/bin/activate
|
|
6
|
-
# fi
|
|
7
|
-
|
|
8
|
-
op_script=$HOME/tmp_results/shells/python_return_command.sh
|
|
9
|
-
if [ -f "$op_script" ]; then
|
|
10
|
-
rm $op_script
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
python machineconfig.scripts.python.wifi_conn
|
|
14
|
-
|
|
15
|
-
if [ -f "$op_script" ]; then
|
|
16
|
-
chmod +x $op_script
|
|
17
|
-
source $op_script
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# check below if VIRTUAL_ENV enviroment variable exist, then deactivate it, otherwise skip
|
|
22
|
-
if [ -n "$VIRTUAL_ENV" ]; then
|
|
23
|
-
deactivate
|
|
24
|
-
fi
|
|
2
|
+
uv run --python 3.13 --with machineconfig python machineconfig.scripts.python.wifi_conn
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Cloud mount script"""
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
from machineconfig.utils.options import choose_one_option
|
|
5
5
|
from machineconfig.utils.utils2 import read_ini
|
|
6
6
|
from machineconfig.utils.path_reduced import PathExtended as PathExtended
|
|
@@ -144,7 +144,9 @@ zellij action move-focus up
|
|
|
144
144
|
else:
|
|
145
145
|
raise ValueError("unsupported platform")
|
|
146
146
|
# print(f"running command: \n{txt}")
|
|
147
|
-
PROGRAM_PATH.write_text(txt, encoding="utf-8")
|
|
147
|
+
# PROGRAM_PATH.write_text(txt, encoding="utf-8")
|
|
148
|
+
import subprocess
|
|
149
|
+
subprocess.run(txt, shell=True, check=True)
|
|
148
150
|
# draw success box dynamically
|
|
149
151
|
title1 = "✅ Cloud mount command prepared successfully"
|
|
150
152
|
title2 = "🔄 Running mount process..."
|
|
@@ -7,7 +7,7 @@ from machineconfig.utils.terminal import Terminal
|
|
|
7
7
|
from machineconfig.utils.utils2 import randstr, read_ini
|
|
8
8
|
|
|
9
9
|
from machineconfig.scripts.python.helpers.repo_sync_helpers import fetch_dotfiles
|
|
10
|
-
from machineconfig.utils.source_of_truth import CONFIG_PATH, DEFAULTS_PATH
|
|
10
|
+
from machineconfig.utils.source_of_truth import CONFIG_PATH, DEFAULTS_PATH
|
|
11
11
|
from machineconfig.utils.options import choose_one_option
|
|
12
12
|
from machineconfig.utils.code import get_shell_file_executing_python_script, write_shell_script_to_file
|
|
13
13
|
import platform
|
|
@@ -161,7 +161,10 @@ git commit -am "finished merging"
|
|
|
161
161
|
program_content = program_4
|
|
162
162
|
case _:
|
|
163
163
|
raise ValueError(f"Unknown action: {action}")
|
|
164
|
-
PROGRAM_PATH.write_text(program_content, encoding="utf-8")
|
|
164
|
+
# PROGRAM_PATH.write_text(program_content, encoding="utf-8")
|
|
165
|
+
import subprocess
|
|
166
|
+
subprocess.run(program_content, shell=True, check=True)
|
|
167
|
+
|
|
165
168
|
return program_content
|
|
166
169
|
|
|
167
170
|
|
|
@@ -5,7 +5,7 @@ TODO: use typer or typed-argument-parser to parse args
|
|
|
5
5
|
from machineconfig.scripts.python.helpers.helpers2 import parse_cloud_source_target
|
|
6
6
|
from machineconfig.scripts.python.helpers.cloud_helpers import Args
|
|
7
7
|
from machineconfig.scripts.python.cloud_mount import get_mprocs_mount_txt
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import argparse
|
|
10
10
|
from rich.console import Console
|
|
11
11
|
from rich.panel import Panel
|
|
@@ -75,7 +75,9 @@ def args_parser():
|
|
|
75
75
|
cmd_line = f"{rclone_cmd[:65]}..."
|
|
76
76
|
console.print(Panel(f"{title}\n{cmd_line}", title="[bold blue]Command[/bold blue]", expand=False))
|
|
77
77
|
|
|
78
|
-
PROGRAM_PATH.write_text(txt, encoding="utf-8")
|
|
78
|
+
# PROGRAM_PATH.write_text(txt, encoding="utf-8")
|
|
79
|
+
import subprocess
|
|
80
|
+
subprocess.run(txt, shell=True, check=True)
|
|
79
81
|
|
|
80
82
|
|
|
81
83
|
if __name__ == "__main__":
|
|
@@ -7,7 +7,7 @@ croshell
|
|
|
7
7
|
import argparse
|
|
8
8
|
from machineconfig.utils.path_reduced import PathExtended as PathExtended
|
|
9
9
|
from machineconfig.utils.utils2 import randstr
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
from machineconfig.utils.options import display_options
|
|
12
12
|
from machineconfig.utils.ve import get_ve_activate_line
|
|
13
13
|
from typing import Optional
|
|
@@ -204,11 +204,13 @@ print(f"🐊 Crocodile Shell | Running @ {Path.cwd()}")
|
|
|
204
204
|
title = "🚀 LAUNCHING SCRIPT"
|
|
205
205
|
text1 = f"📄 Script: {pyfile}"
|
|
206
206
|
text2 = f"🔥 Command: {fire_line}"
|
|
207
|
-
launch_message = f"{title}
|
|
207
|
+
launch_message = f"{title} \n{text1}\n{text2}"
|
|
208
208
|
console.print(Panel(Text(launch_message, justify="left"), expand=False, border_style="blue"))
|
|
209
209
|
|
|
210
|
-
PROGRAM_PATH.write_text(data=final_program, encoding="utf-8")
|
|
210
|
+
# PROGRAM_PATH.write_text(data=final_program, encoding="utf-8")
|
|
211
211
|
# (PROGRAM_PATH + ".py").write_text(str(pyfile), encoding='utf-8')
|
|
212
|
+
import subprocess
|
|
213
|
+
subprocess.run(final_program, shell=True, check=True)
|
|
212
214
|
|
|
213
215
|
# if platform.system() == "Windows":
|
|
214
216
|
# return subprocess.run([f"powershell", "-Command", res], shell=True, capture_output=False, text=True, check=True)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""devops with emojis"""
|
|
2
2
|
|
|
3
3
|
from machineconfig.utils.options import display_options
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
from machineconfig.utils.code import write_shell_script_to_default_program_path
|
|
6
6
|
from platform import system
|
|
7
7
|
from enum import Enum
|
|
@@ -75,7 +75,7 @@ def display_task_success(success: str) -> None:
|
|
|
75
75
|
def main(which: Optional[str] = None):
|
|
76
76
|
from machineconfig.utils.path_reduced import PathExtended
|
|
77
77
|
|
|
78
|
-
PathExtended(PROGRAM_PATH).delete(sure=True, verbose=False)
|
|
78
|
+
# PathExtended(PROGRAM_PATH).delete(sure=True, verbose=False)
|
|
79
79
|
console.print(Panel("🚀 Initializing DevOps operation...", width=BOX_WIDTH, border_style="blue"))
|
|
80
80
|
|
|
81
81
|
options = [op.value for op in Options]
|
|
@@ -14,14 +14,14 @@ from machineconfig.scripts.python.helpers.helpers4 import get_import_module_code
|
|
|
14
14
|
from machineconfig.utils.ve import get_repo_root, get_ve_activate_line, get_ve_path_and_ipython_profile
|
|
15
15
|
from machineconfig.utils.options import display_options, choose_one_option
|
|
16
16
|
from machineconfig.utils.path import match_file_name, sanitize_path
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
from machineconfig.utils.path_reduced import PathExtended as PathExtended
|
|
19
19
|
from machineconfig.utils.io_save import save_toml
|
|
20
20
|
from machineconfig.utils.utils2 import randstr, read_toml
|
|
21
21
|
from machineconfig.scripts.python.fire_jobs_args_helper import get_args, FireJobArgs, extract_kwargs
|
|
22
22
|
import platform
|
|
23
23
|
from typing import Optional
|
|
24
|
-
import os
|
|
24
|
+
# import os
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def main(args: FireJobArgs) -> None:
|
|
@@ -307,8 +307,8 @@ python -m machineconfig.cluster.templates.cli_click --file {choice_file} """
|
|
|
307
307
|
raise NotImplementedError(f"Platform {platform.system()} not supported.")
|
|
308
308
|
command = export_line + "\n" + command
|
|
309
309
|
|
|
310
|
-
program_path = os.environ.get("op_script", None)
|
|
311
|
-
program_path = PathExtended(program_path) if program_path is not None else PROGRAM_PATH
|
|
310
|
+
# program_path = os.environ.get("op_script", None)
|
|
311
|
+
# program_path = PathExtended(program_path) if program_path is not None else PROGRAM_PATH
|
|
312
312
|
if args.loop:
|
|
313
313
|
if platform.system() in ["Linux", "Darwin"]:
|
|
314
314
|
command = command + "\nsleep 0.5"
|
|
@@ -318,10 +318,12 @@ python -m machineconfig.cluster.templates.cli_click --file {choice_file} """
|
|
|
318
318
|
command = "$ErrorActionPreference = 'SilentlyContinue';\n" + command + "\nStart-Sleep -Seconds 0.5"
|
|
319
319
|
else:
|
|
320
320
|
raise NotImplementedError(f"Platform {platform.system()} not supported.")
|
|
321
|
-
command = command + f"\n. {program_path}"
|
|
322
|
-
console.print(Panel(Syntax(command, lexer="shell"), title=f"🔥 fire command @ {
|
|
323
|
-
program_path.parent.mkdir(parents=True, exist_ok=True)
|
|
324
|
-
program_path.write_text(command, encoding="utf-8")
|
|
321
|
+
# command = command + f"\n. {program_path}"
|
|
322
|
+
console.print(Panel(Syntax(command, lexer="shell"), title=f"🔥 fire command @ {command}: "), style="bold red")
|
|
323
|
+
# program_path.parent.mkdir(parents=True, exist_ok=True)
|
|
324
|
+
# program_path.write_text(command, encoding="utf-8")
|
|
325
|
+
import subprocess
|
|
326
|
+
subprocess.run(command, shell=True, check=True)
|
|
325
327
|
|
|
326
328
|
|
|
327
329
|
if __name__ == "__main__":
|