machineconfig 3.8__py3-none-any.whl → 3.81__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/scripts/python/cloud_repo_sync.py +11 -17
- machineconfig/scripts/python/croshell.py +2 -3
- machineconfig/scripts/python/devops.py +21 -38
- machineconfig/scripts/python/devops_devapps_install.py +11 -4
- {machineconfig-3.8.dist-info → machineconfig-3.81.dist-info}/METADATA +2 -1
- {machineconfig-3.8.dist-info → machineconfig-3.81.dist-info}/RECORD +9 -10
- {machineconfig-3.8.dist-info → machineconfig-3.81.dist-info}/entry_points.txt +1 -0
- machineconfig/cluster/templates/cli_click.py +0 -102
- {machineconfig-3.8.dist-info → machineconfig-3.81.dist-info}/WHEEL +0 -0
- {machineconfig-3.8.dist-info → machineconfig-3.81.dist-info}/top_level.txt +0 -0
|
@@ -5,14 +5,12 @@ import git
|
|
|
5
5
|
from machineconfig.utils.io import read_ini
|
|
6
6
|
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
7
7
|
from machineconfig.utils.terminal import Terminal
|
|
8
|
-
from machineconfig.utils.accessories import randstr
|
|
9
8
|
|
|
10
9
|
from machineconfig.scripts.python.helpers.repo_sync_helpers import fetch_dotfiles
|
|
11
10
|
from machineconfig.utils.source_of_truth import CONFIG_PATH, DEFAULTS_PATH
|
|
12
11
|
from machineconfig.utils.options import choose_from_options
|
|
13
12
|
from machineconfig.utils.code import get_shell_file_executing_python_script, write_shell_script_to_file
|
|
14
13
|
import platform
|
|
15
|
-
import argparse
|
|
16
14
|
from typing import Optional, Literal
|
|
17
15
|
from rich.console import Console
|
|
18
16
|
from rich.panel import Panel
|
|
@@ -171,21 +169,17 @@ git commit -am "finished merging"
|
|
|
171
169
|
|
|
172
170
|
|
|
173
171
|
def args_parser():
|
|
174
|
-
console.print(Panel("🔄 Repository Synchronization Utility", title_align="left", border_style="blue"))
|
|
175
|
-
|
|
176
|
-
parser =
|
|
177
|
-
# parser.add_argument("
|
|
178
|
-
parser.add_argument("
|
|
179
|
-
# parser.add_argument("--
|
|
180
|
-
parser.add_argument("--
|
|
181
|
-
|
|
182
|
-
#
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
# parser.add_argument("--no_push", "-u", help="push to reomte.", action="store_true") # default is False
|
|
186
|
-
parser.add_argument("--action", "-a", help="Action to take if merge fails.", choices=["ask", "pushLocalMerge", "overwriteLocal", "InspectRepos", "RemoveLocalRclone"], default="ask")
|
|
187
|
-
args = parser.parse_args()
|
|
188
|
-
main(cloud=args.cloud, path=args.path, message=args.message, action=args.action)
|
|
172
|
+
# console.print(Panel("🔄 Repository Synchronization Utility", title_align="left", border_style="blue"))
|
|
173
|
+
# parser = argparse.ArgumentParser(description="Secure Repo CLI.")
|
|
174
|
+
# parser.add_argument("path", nargs="?", type=str, help="Repository path, defaults to cwd.", default=None)
|
|
175
|
+
# parser.add_argument("--cloud", "-c", help="rclone cloud profile name.", default=None)
|
|
176
|
+
# parser.add_argument("--message", "-m", help="Commit Message", default=f"new message {randstr()}")
|
|
177
|
+
# parser.add_argument("--pwd", "-p", help="Password for encryption", default=None)
|
|
178
|
+
# parser.add_argument("--action", "-a", help="Action to take if merge fails.", choices=["ask", "pushLocalMerge", "overwriteLocal", "InspectRepos", "RemoveLocalRclone"], default="ask")
|
|
179
|
+
# args = parser.parse_args()
|
|
180
|
+
# main(cloud=args.cloud, path=args.path, message=args.message, action=args.action)
|
|
181
|
+
import typer
|
|
182
|
+
typer.run(main)
|
|
189
183
|
|
|
190
184
|
|
|
191
185
|
if __name__ == "__main__":
|
|
@@ -13,8 +13,7 @@ from machineconfig.utils.ve import get_ve_activate_line
|
|
|
13
13
|
from typing import Optional
|
|
14
14
|
from rich.console import Console
|
|
15
15
|
from rich.panel import Panel
|
|
16
|
-
from rich.text import Text
|
|
17
|
-
# from machineconfig.utils.utils2 import pprint
|
|
16
|
+
from rich.text import Text
|
|
18
17
|
|
|
19
18
|
console = Console()
|
|
20
19
|
|
|
@@ -24,7 +23,7 @@ def add_print_header_pycode(path: str, title: str):
|
|
|
24
23
|
try:
|
|
25
24
|
from crocodile.file_management import P as PathExtended
|
|
26
25
|
except ImportError:
|
|
27
|
-
from machineconfig.utils.
|
|
26
|
+
from machineconfig.utils.path_extended import PathExtended
|
|
28
27
|
pycode = PathExtended(r'{path}').read_text(encoding="utf-8")
|
|
29
28
|
pycode = pycode.split("except Exception: print(pycode)")[2]
|
|
30
29
|
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
from machineconfig.utils.options import choose_from_options
|
|
4
4
|
|
|
5
5
|
from platform import system
|
|
6
|
-
from
|
|
7
|
-
from typing import Optional
|
|
6
|
+
from typing import Optional, Literal, TypeAlias
|
|
8
7
|
from rich.console import Console
|
|
9
8
|
from rich.panel import Panel
|
|
10
9
|
|
|
@@ -13,36 +12,20 @@ console = Console()
|
|
|
13
12
|
BOX_WIDTH = 150 # width for box drawing
|
|
14
13
|
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
update = "🔄 UPDATE essential repos"
|
|
18
|
-
cli_install = "⚙️ DEVAPPS install"
|
|
19
|
-
sym_path_shell = "🔗 SYMLINKS, SHELL PROFILE, FONT, TERMINAL SETTINGS."
|
|
20
|
-
sym_new = "🆕 SYMLINKS new"
|
|
21
|
-
ssh_add_pubkey = "🔑 SSH add pub key to this machine"
|
|
22
|
-
ssh_add_id = "🗝️ SSH add identity (private key) to this machine"
|
|
23
|
-
ssh_use_pair = "🔐 SSH use key pair to connect two machines"
|
|
24
|
-
ssh_setup = "📡 SSH setup"
|
|
25
|
-
ssh_setup_wsl = "🐧 SSH setup wsl"
|
|
26
|
-
backup = "💾 BACKUP"
|
|
27
|
-
retreive = "📥 RETRIEVE"
|
|
28
|
-
scheduler = "⏰ SCHEDULER"
|
|
15
|
+
Options: TypeAlias = Literal["🔄 UPDATE essential repos", "⚙️ DEVAPPS install", "🔗 SYMLINKS, SHELL PROFILE, FONT, TERMINAL SETTINGS.", "🆕 SYMLINKS new", "🔑 SSH add pub key to this machine", "🗝️ SSH add identity (private key) to this machine", "🔐 SSH use key pair to connect two machines", "📡 SSH setup", "🐧 SSH setup wsl", "💾 BACKUP", "📥 RETRIEVE", "⏰ SCHEDULER"]
|
|
29
16
|
|
|
17
|
+
options_list = list(Options.__args__)
|
|
30
18
|
|
|
31
|
-
def args_parser():
|
|
32
|
-
console.print(Panel("🛠️ DevOps Tool Suite", title_align="left", border_style="blue", width=BOX_WIDTH))
|
|
33
|
-
import argparse
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
args = parser.parse_args()
|
|
39
|
-
main(which=args.which)
|
|
20
|
+
def args_parser():
|
|
21
|
+
import typer
|
|
22
|
+
typer.run(main)
|
|
40
23
|
|
|
41
24
|
|
|
42
|
-
def main(which: Optional[
|
|
25
|
+
def main(which: Optional[Options] = None):
|
|
43
26
|
# PathExtended(_program_PATH).delete(sure=True, verbose=False)
|
|
44
27
|
console.print(Panel("🚀 Initializing DevOps operation...", width=BOX_WIDTH, border_style="blue"))
|
|
45
|
-
options =
|
|
28
|
+
options = options_list
|
|
46
29
|
if which is None:
|
|
47
30
|
try:
|
|
48
31
|
choice_key = choose_from_options(msg="", options=options, header="🛠️ DEVOPS", default=options[0], multi=False)
|
|
@@ -50,51 +33,51 @@ def main(which: Optional[str] = None):
|
|
|
50
33
|
console.print(Panel("❌ Operation cancelled by user", title_align="left", border_style="red", width=BOX_WIDTH))
|
|
51
34
|
return
|
|
52
35
|
else:
|
|
53
|
-
choice_key =
|
|
36
|
+
choice_key = which
|
|
54
37
|
|
|
55
38
|
console.print(Panel(f"🔧 SELECTED OPERATION\n{choice_key}", title_align="left", border_style="green", width=BOX_WIDTH))
|
|
56
39
|
|
|
57
|
-
if choice_key ==
|
|
40
|
+
if choice_key == "🔄 UPDATE essential repos":
|
|
58
41
|
console.print(Panel("🔄 Updating essential repositories...", width=BOX_WIDTH, border_style="blue"))
|
|
59
42
|
import machineconfig.scripts.python.devops_update_repos as helper
|
|
60
43
|
|
|
61
44
|
helper.main()
|
|
62
|
-
elif choice_key ==
|
|
45
|
+
elif choice_key == "⚙️ DEVAPPS install":
|
|
63
46
|
console.print(Panel("⚙️ Installing development applications...", width=BOX_WIDTH, border_style="blue"))
|
|
64
47
|
import machineconfig.scripts.python.devops_devapps_install as helper
|
|
65
48
|
|
|
66
49
|
helper.main(which=None)
|
|
67
50
|
|
|
68
|
-
elif choice_key ==
|
|
51
|
+
elif choice_key == "🆕 SYMLINKS new":
|
|
69
52
|
console.print(Panel("🔄 Creating new symlinks...", width=BOX_WIDTH, border_style="blue"))
|
|
70
53
|
import machineconfig.jobs.python.python_ve_symlink as helper
|
|
71
54
|
|
|
72
55
|
helper.main()
|
|
73
56
|
|
|
74
|
-
elif choice_key ==
|
|
57
|
+
elif choice_key == "🔗 SYMLINKS, SHELL PROFILE, FONT, TERMINAL SETTINGS.":
|
|
75
58
|
console.print(Panel("🔗 Setting up symlinks, PATH, and shell profile...", width=BOX_WIDTH, border_style="blue"))
|
|
76
59
|
import machineconfig.profile.create as helper
|
|
77
60
|
|
|
78
61
|
helper.main()
|
|
79
62
|
"echo '✅ done with symlinks'"
|
|
80
63
|
|
|
81
|
-
elif choice_key ==
|
|
64
|
+
elif choice_key == "🔑 SSH add pub key to this machine":
|
|
82
65
|
console.print(Panel("🔑 Adding public SSH key to this machine...", width=BOX_WIDTH, border_style="blue"))
|
|
83
66
|
import machineconfig.scripts.python.devops_add_ssh_key as helper
|
|
84
67
|
|
|
85
68
|
helper.main()
|
|
86
69
|
|
|
87
|
-
elif choice_key ==
|
|
70
|
+
elif choice_key == "🔐 SSH use key pair to connect two machines":
|
|
88
71
|
console.print(Panel("❌ ERROR: Not Implemented\nSSH key pair connection feature is not yet implemented", title_align="left", border_style="red", width=BOX_WIDTH))
|
|
89
72
|
raise NotImplementedError
|
|
90
73
|
|
|
91
|
-
elif choice_key ==
|
|
74
|
+
elif choice_key == "🗝️ SSH add identity (private key) to this machine": # so that you can SSH directly withuot pointing to identity key.
|
|
92
75
|
console.print(Panel("🗝️ Adding SSH identity (private key) to this machine...", width=BOX_WIDTH, border_style="blue"))
|
|
93
76
|
import machineconfig.scripts.python.devops_add_identity as helper
|
|
94
77
|
|
|
95
78
|
helper.main()
|
|
96
79
|
|
|
97
|
-
elif choice_key ==
|
|
80
|
+
elif choice_key == "📡 SSH setup":
|
|
98
81
|
console.print(Panel("📡 Setting up SSH...", width=BOX_WIDTH, border_style="blue"))
|
|
99
82
|
_program_windows = """Invoke-WebRequest https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/openssh_all.ps1 | Invoke-Expression # https://github.com/thisismygitrepo.keys"""
|
|
100
83
|
_program_linux = """curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/openssh_all.sh | sudo bash # https://github.com/thisismygitrepo.keys"""
|
|
@@ -103,23 +86,23 @@ def main(which: Optional[str] = None):
|
|
|
103
86
|
|
|
104
87
|
subprocess.run(_program_linux if system() == "Linux" else _program_windows, shell=True, check=True)
|
|
105
88
|
|
|
106
|
-
elif choice_key ==
|
|
89
|
+
elif choice_key == "🐧 SSH setup wsl":
|
|
107
90
|
console.print(Panel("🐧 Setting up SSH for WSL...", width=BOX_WIDTH, border_style="blue"))
|
|
108
91
|
"""curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/openssh_wsl.sh | sudo bash"""
|
|
109
92
|
|
|
110
|
-
elif choice_key ==
|
|
93
|
+
elif choice_key == "💾 BACKUP":
|
|
111
94
|
console.print(Panel("💾 Creating backup...", width=BOX_WIDTH, border_style="blue"))
|
|
112
95
|
from machineconfig.scripts.python.devops_backup_retrieve import main_backup_retrieve
|
|
113
96
|
|
|
114
97
|
main_backup_retrieve(direction="BACKUP")
|
|
115
98
|
|
|
116
|
-
elif choice_key ==
|
|
99
|
+
elif choice_key == "📥 RETRIEVE":
|
|
117
100
|
console.print(Panel("📥 Retrieving backup...", width=BOX_WIDTH, border_style="blue"))
|
|
118
101
|
from machineconfig.scripts.python.devops_backup_retrieve import main_backup_retrieve
|
|
119
102
|
|
|
120
103
|
main_backup_retrieve(direction="RETRIEVE")
|
|
121
104
|
|
|
122
|
-
elif choice_key ==
|
|
105
|
+
elif choice_key == "⏰ SCHEDULER":
|
|
123
106
|
console.print(Panel("⏰ Setting up scheduler...", width=BOX_WIDTH, border_style="blue"))
|
|
124
107
|
# from machineconfig.scripts.python.scheduler import main as helper
|
|
125
108
|
# helper()
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"""Devops Devapps Install"""
|
|
2
2
|
|
|
3
3
|
# import subprocess
|
|
4
|
+
import typer
|
|
4
5
|
from rich.progress import Progress, SpinnerColumn, TextColumn
|
|
5
6
|
from machineconfig.utils.source_of_truth import LIBRARY_ROOT
|
|
6
7
|
from machineconfig.utils.options import choose_from_options
|
|
7
8
|
from machineconfig.utils.installer import get_installers, install_all
|
|
8
9
|
from platform import system
|
|
9
|
-
from typing import Any, Optional, Literal, TypeAlias, get_args
|
|
10
|
-
|
|
10
|
+
from typing import Any, Optional, Literal, TypeAlias, get_args, Annotated
|
|
11
11
|
|
|
12
12
|
WHICH_CAT: TypeAlias = Literal["AllEssentials", "EssentialsAndOthers", "SystemInstallers", "PrecheckedCloudInstaller"]
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def
|
|
15
|
+
def main_with_parser():
|
|
16
|
+
import typer
|
|
17
|
+
app = typer.Typer()
|
|
18
|
+
app.command()(main)
|
|
19
|
+
app()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main(which: Annotated[Optional[str], typer.Argument(help=f"Choose a category or program to install, {list(get_args(WHICH_CAT))} or <program_name>")]) -> None:
|
|
16
23
|
if which is not None and which in get_args(WHICH_CAT): # install by category
|
|
17
24
|
return get_programs_by_category(program_name=which) # type: ignore
|
|
18
25
|
|
|
@@ -123,7 +130,7 @@ def get_programs_by_category(program_name: WHICH_CAT):
|
|
|
123
130
|
if sub_program.startswith("#winget"):
|
|
124
131
|
sub_program = sub_program[1:]
|
|
125
132
|
program += "\n" + sub_program
|
|
126
|
-
|
|
133
|
+
# case "CHOOSE": raise NotImplementedError("CHOOSE is not implemented yet.")
|
|
127
134
|
# case "OtherDevApps":
|
|
128
135
|
# installers = get_installers(dev=True, system=system())
|
|
129
136
|
# options__: list[str] = [x.get_description() for x in tqdm(installers, desc="Checking installed programs")]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: machineconfig
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.81
|
|
4
4
|
Summary: Dotfiles management package
|
|
5
5
|
Author-email: Alex Al-Saffar <programmer@usa.com>
|
|
6
6
|
License: Apache 2.0
|
|
@@ -24,6 +24,7 @@ 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
|
|
27
28
|
Provides-Extra: windows
|
|
28
29
|
Requires-Dist: pywin32; extra == "windows"
|
|
29
30
|
Provides-Extra: docs
|
|
@@ -33,7 +33,6 @@ machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py,sha256=I
|
|
|
33
33
|
machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py,sha256=7JLq8HY-NWbJfzHfxaok_o1KrIwzMCK_PUnsdZYfzuA,4929
|
|
34
34
|
machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py,sha256=AtpIoko_ghhOXENGAfgiS2jA4IYBFRMjEbyIy_P6HIM,3758
|
|
35
35
|
machineconfig/cluster/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
machineconfig/cluster/templates/cli_click.py,sha256=7v6w-dj1whBd9ydKeOAQFuD5kF7_6ivyPAqNl8BEvc0,5084
|
|
37
36
|
machineconfig/cluster/templates/cli_gooey.py,sha256=KUiZDuqmHDkGS7NqwBTzZUbxysgasq-M0DWmwd44vOE,5534
|
|
38
37
|
machineconfig/cluster/templates/cli_trogon.py,sha256=PFWGy8SFYIhT9r3ZV4oIEYfImsQwzAHH_04stPuV5bY,647
|
|
39
38
|
machineconfig/cluster/templates/run_cloud.py,sha256=0o4-v5yFEqvlHzoKDXljRCR5ikx_r5w4oYE5OCtVIK8,2378
|
|
@@ -166,14 +165,14 @@ machineconfig/scripts/python/choose_wezterm_theme.py,sha256=Hlu_EOQhLM6wYdAdY25j
|
|
|
166
165
|
machineconfig/scripts/python/cloud_copy.py,sha256=d3gBSPBCtNCRDANpzUoCJBM3kHBarwizyZo8dkL_BXQ,8553
|
|
167
166
|
machineconfig/scripts/python/cloud_manager.py,sha256=MAVOKqXGxnlMaQGEv6k-q_PrgN0at6J8qQDhPiH2lI8,3488
|
|
168
167
|
machineconfig/scripts/python/cloud_mount.py,sha256=PLTPC9aH6v5g9lTJ8jFBBxz8ZGAuWo4sRU4FXfd1koA,6816
|
|
169
|
-
machineconfig/scripts/python/cloud_repo_sync.py,sha256=
|
|
168
|
+
machineconfig/scripts/python/cloud_repo_sync.py,sha256=GBhdUu9BJwhLYmhxxtvqJGLy7xKdQcnH9kkL4jcbzEE,9502
|
|
170
169
|
machineconfig/scripts/python/cloud_sync.py,sha256=RfgrEPGg_LrIaY3hfLDHsK8blrZvyPsoN66X0Z3WeCw,3859
|
|
171
|
-
machineconfig/scripts/python/croshell.py,sha256=
|
|
172
|
-
machineconfig/scripts/python/devops.py,sha256=
|
|
170
|
+
machineconfig/scripts/python/croshell.py,sha256=tDQaG4yxs_53Mvr9Fzc-HLuG-XVIBgcR3RRfJ4mxJhY,9561
|
|
171
|
+
machineconfig/scripts/python/devops.py,sha256=ws9AzqD-poLndODMFTe5bii3JNsPMsi0BuJJ11ZbPSw,5658
|
|
173
172
|
machineconfig/scripts/python/devops_add_identity.py,sha256=JfN3ZrYMCgmt4ks_VCfnV9BIIHAsOYO3E0W0wZ15FR8,3791
|
|
174
173
|
machineconfig/scripts/python/devops_add_ssh_key.py,sha256=KaoX83KltBsmutfKhSfZjd7nP_R1hJ2OLAWRhbswO7o,6889
|
|
175
174
|
machineconfig/scripts/python/devops_backup_retrieve.py,sha256=jZe5Vki7E2GCMG8hvqUZeOONFC4cNzISoGzq_dMG4GA,5601
|
|
176
|
-
machineconfig/scripts/python/devops_devapps_install.py,sha256=
|
|
175
|
+
machineconfig/scripts/python/devops_devapps_install.py,sha256=Q2suPkfwwdtIN3mjxH6tGZLYC7tZVxdxrGW7d9phiPA,9972
|
|
177
176
|
machineconfig/scripts/python/devops_update_repos.py,sha256=c5qBc9cuTGDEqDHufkjDT4d_vvJsswv3tlqk9MAulYk,8063
|
|
178
177
|
machineconfig/scripts/python/dotfile.py,sha256=1a4THWmfGXiJHjWGFf1Qbp6vrMEGIkonIofOcUVic90,2260
|
|
179
178
|
machineconfig/scripts/python/fire_agents.py,sha256=_k1CcPaAp3B7h72tSczFDbLsqTg6FmPDgxxU-GjRHWA,9179
|
|
@@ -425,8 +424,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=CCs5ebomW1ac
|
|
|
425
424
|
machineconfig/utils/schemas/installer/installer_types.py,sha256=iAzcALc9z_FAQE9iuGHfX6Z0B1_n3Gt6eC0d6heYik0,599
|
|
426
425
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=OmiOX9xtakPz4l6IobWnpFHpbn95fitEE9q0YL1WxjQ,617
|
|
427
426
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
428
|
-
machineconfig-3.
|
|
429
|
-
machineconfig-3.
|
|
430
|
-
machineconfig-3.
|
|
431
|
-
machineconfig-3.
|
|
432
|
-
machineconfig-3.
|
|
427
|
+
machineconfig-3.81.dist-info/METADATA,sha256=rFLSSbYq0X_oChkCMtiSXl01djYBVY4iWJ3BnlOUd9Y,6998
|
|
428
|
+
machineconfig-3.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
429
|
+
machineconfig-3.81.dist-info/entry_points.txt,sha256=_U4WOnu7h1HqsBZXB5-PIn-87TIlV_OwfTTJEZeytEk,1102
|
|
430
|
+
machineconfig-3.81.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
431
|
+
machineconfig-3.81.dist-info/RECORD,,
|
|
@@ -10,6 +10,7 @@ fire = machineconfig.scripts.python.fire_jobs:main
|
|
|
10
10
|
fire_agents = machineconfig.scripts.python.fire_agents:main
|
|
11
11
|
ftpx = machineconfig.scripts.python.ftpx:main
|
|
12
12
|
initai = machineconfig.scripts.python.ai.initai:main
|
|
13
|
+
install = machineconfig.scripts.python.devops_devapps_install:main_with_parser
|
|
13
14
|
kill_process = machineconfig.utils.procs:main
|
|
14
15
|
mount_nfs = machineconfig.scripts.python.mount_nfs:main
|
|
15
16
|
mount_nw_drive = machineconfig.scripts.python.mount_nw_drive:main
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# """Trogon
|
|
2
|
-
# """
|
|
3
|
-
|
|
4
|
-
# #
|
|
5
|
-
# # from machineconfig.cluster.distribute import Cluster, WorkloadParams
|
|
6
|
-
# from machineconfig.cluster.remote_machine import RemoteMachineConfig, RemoteMachine, CloudManager
|
|
7
|
-
# from machineconfig.cluster.templates.run_cloud import to_email_default, email_config_name_default, default_cloud
|
|
8
|
-
# import click
|
|
9
|
-
# # from trogon import tui
|
|
10
|
-
# from typing import Any, Optional
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# @click.command()
|
|
14
|
-
# @click.option('--file', prompt="Py File: ", help="The file to run.", default="")
|
|
15
|
-
# @click.option('--function', prompt="Function: ", help="The function to run.", default=None)
|
|
16
|
-
# @click.pass_context
|
|
17
|
-
# def main2(ctx: Any, file: str, function: Optional[str] = None):
|
|
18
|
-
# ctx.obj = {'file': file, 'function': function}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# # @tui()
|
|
22
|
-
# # @click.group("gg")
|
|
23
|
-
# @click.command()
|
|
24
|
-
# @click.option('--file', prompt="Py File: ", help="The file to run.", default="")
|
|
25
|
-
# @click.option('--function', prompt="Function: ", help="The function to run.", default=None)
|
|
26
|
-
# @click.option('--description', prompt="Description of the job: ", default=f"Description of running func on remotes", help="Write something that describes what this job is about.")
|
|
27
|
-
# @click.option('--update_repo', prompt="Update repo: ", default=False, help="Update the repo on the remote machine.")
|
|
28
|
-
# @click.option('--update_essential_repos', prompt="Update essential repos: ", default=True, help="Update essential repos on the remote machine.")
|
|
29
|
-
# @click.option('--cloud_name', prompt="Cloud name: ", default=default_cloud, help="The name of the cloud to use.")
|
|
30
|
-
# @click.option('--notify_upon_completion', prompt="Notify upon completion: ", default=False, help="Send an email upon completion.")
|
|
31
|
-
# @click.option('--to_email', prompt="To email: ", default=to_email_default, help="The email to send to.")
|
|
32
|
-
# @click.option('--email_config_name', prompt="Email config name: ", default=email_config_name_default, help="The name of the email config to use.")
|
|
33
|
-
# @click.option('--kill_on_completion', prompt="Kill on completion: ", default=False)
|
|
34
|
-
# @click.option('--ipython', prompt="Use ipython: ", default=False)
|
|
35
|
-
# @click.option('--interactive', prompt="Interactive: ", default=False)
|
|
36
|
-
# @click.option('--pdb', prompt="Use pdb: ", default=False)
|
|
37
|
-
# @click.option('--pudb', prompt="Use pudb: ", default=False)
|
|
38
|
-
# @click.option('--wrap_in_try_except', prompt="Wrap in try except: ", default=False)
|
|
39
|
-
# @click.option('--lock_resources', prompt="Lock resources: ", default=False)
|
|
40
|
-
# @click.option('--max_simulataneous_jobs', prompt="Max simultaneous jobs: ", default=2)
|
|
41
|
-
# @click.option('--split', prompt="Split: ", default=1)
|
|
42
|
-
# @click.option('--reset_cloud', prompt="Reset cloud: ", default=False)
|
|
43
|
-
# @click.option('--reset_local', prompt="Reset local: ", default=False)
|
|
44
|
-
# # @click.pass_context
|
|
45
|
-
# def main(
|
|
46
|
-
# file: str, function: Optional[str],
|
|
47
|
-
# description: str, update_repo: bool, update_essential_repos: bool, cloud_name: str,
|
|
48
|
-
# notify_upon_completion: bool, to_email: str, email_config_name: str, kill_on_completion: bool, ipython: bool, interactive: bool,
|
|
49
|
-
# pdb: bool, pudb: bool, wrap_in_try_except: bool, lock_resources: bool, max_simulataneous_jobs: bool,
|
|
50
|
-
# split: int, reset_cloud: bool, reset_local: bool,
|
|
51
|
-
# ) -> Any:
|
|
52
|
-
|
|
53
|
-
# # function = ctx.obj['function']
|
|
54
|
-
# # description = ctx.obj['file']
|
|
55
|
-
# from machineconfig.cluster.self_ssh import SelfSSH
|
|
56
|
-
# config = RemoteMachineConfig(
|
|
57
|
-
# # connection
|
|
58
|
-
# ssh_obj=SelfSSH(),
|
|
59
|
-
# # ssh_params=None,
|
|
60
|
-
# description=description,
|
|
61
|
-
# # job_id=, base_dir="",
|
|
62
|
-
# # data
|
|
63
|
-
# copy_repo=False, # copy_repo,
|
|
64
|
-
# update_repo=update_repo,
|
|
65
|
-
# install_repo=True, # install_repo,
|
|
66
|
-
# update_essential_repos=update_essential_repos,
|
|
67
|
-
# data=[],
|
|
68
|
-
# transfer_method="cloud", # "transfer_method,
|
|
69
|
-
# cloud_name=cloud_name,
|
|
70
|
-
# # remote machine behaviour
|
|
71
|
-
# # open_console=open_console,
|
|
72
|
-
# notify_upon_completion=notify_upon_completion,
|
|
73
|
-
# to_email=to_email,
|
|
74
|
-
# email_config_name=email_config_name,
|
|
75
|
-
# kill_on_completion=kill_on_completion,
|
|
76
|
-
# workload_params=None,
|
|
77
|
-
# launch_method="cloud_manager",
|
|
78
|
-
# # execution behaviour
|
|
79
|
-
# ipython=ipython,
|
|
80
|
-
# interactive=interactive,
|
|
81
|
-
# pdb=pdb,
|
|
82
|
-
# pudb=pudb,
|
|
83
|
-
# wrap_in_try_except=wrap_in_try_except,
|
|
84
|
-
# # resources
|
|
85
|
-
# lock_resources=lock_resources,
|
|
86
|
-
# max_simulataneous_jobs=max_simulataneous_jobs,
|
|
87
|
-
# parallelize=False, # parallelize,
|
|
88
|
-
# )
|
|
89
|
-
|
|
90
|
-
# if function is not None:
|
|
91
|
-
# module: dict[str, Any] = Read.py(file)
|
|
92
|
-
# func = module[function]
|
|
93
|
-
# else: func = file
|
|
94
|
-
# m = RemoteMachine(func=func, func_kwargs=None, config=config)
|
|
95
|
-
# res = m.submit_to_cloud(split=split, cm=CloudManager(max_jobs=0, reset_local=reset_local), reset_cloud=reset_cloud)
|
|
96
|
-
# return res
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# if __name__ == '__main__':
|
|
100
|
-
# # conf = get_options(standalone_mode=False) # type: ignore # pylint: disable=no-value-for-parameter
|
|
101
|
-
# # main2() # type: ignore
|
|
102
|
-
# main() # type: ignore
|
|
File without changes
|
|
File without changes
|