vortex-cli 4.17.1__tar.gz → 4.17.2__tar.gz
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.
- {vortex_cli-4.17.1/vortex_cli.egg-info → vortex_cli-4.17.2}/PKG-INFO +26 -6
- vortex_cli-4.17.2/pyproject.toml +139 -0
- vortex_cli-4.17.2/setup.cfg +4 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/cli.py +8 -29
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/clean.py +0 -1
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/clone.py +4 -4
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/config.py +3 -3
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/export.py +1 -1
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/find.py +1 -1
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/watch.py +2 -2
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/constants.py +0 -1
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/main.py +4 -5
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/models.py +19 -6
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/workspace.py +8 -8
- {vortex_cli-4.17.1 → vortex_cli-4.17.2/vortex_cli.egg-info}/PKG-INFO +26 -6
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex_cli.egg-info/SOURCES.txt +1 -2
- vortex_cli-4.17.1/setup.cfg +0 -60
- vortex_cli-4.17.1/setup.py +0 -5
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/LICENSE +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/README.md +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/__init__.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/__main__.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/colour.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/__init__.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/code.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/copy.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/db.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/delete.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/docs.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/execute.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/grep.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/list.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/log.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/commands/new.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/docs/Blackbook.pdf +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/lib/puakma-6.0.37.jar +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/logging.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/soap.py +2 -2
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/spinner.py +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex/util.py +1 -1
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex_cli.egg-info/dependency_links.txt +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex_cli.egg-info/entry_points.txt +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex_cli.egg-info/requires.txt +0 -0
- {vortex_cli-4.17.1 → vortex_cli-4.17.2}/vortex_cli.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vortex_cli
|
|
3
|
-
Version: 4.17.
|
|
4
|
-
|
|
5
|
-
Author: Jordan Amos
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Version: 4.17.2
|
|
4
|
+
Summary: Vortex CLI
|
|
5
|
+
Author-email: Jordan Amos <jordan.amos@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 jordanamos
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Keywords: vortex,cli,puakma,tornado
|
|
9
29
|
Classifier: Intended Audience :: Developers
|
|
10
30
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
31
|
Classifier: Natural Language :: English
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-build-backend
|
|
2
|
+
[build-system]
|
|
3
|
+
requires = ["setuptools>=61.0"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "vortex_cli"
|
|
8
|
+
version = "4.17.2"
|
|
9
|
+
description = "Vortex CLI"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
12
|
+
license = { file = "LICENSE" }
|
|
13
|
+
keywords = ["vortex", "cli", "puakma", "tornado"]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"httpx==0.24.1",
|
|
16
|
+
"tabulate==0.9.0",
|
|
17
|
+
"watchfiles==0.19.0"
|
|
18
|
+
]
|
|
19
|
+
authors = [
|
|
20
|
+
{ name = "Jordan Amos", email = "jordan.amos@gmail.com" }
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
"Natural Language :: English",
|
|
26
|
+
"Programming Language :: Python",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3 :: Only"
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.entry-points."console_scripts"]
|
|
32
|
+
vortex = "vortex.__main__:main"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.package-data]
|
|
35
|
+
vortex = ["lib/puakma-6.0.37.jar", "docs/Blackbook.pdf"]
|
|
36
|
+
|
|
37
|
+
[tool.mypy]
|
|
38
|
+
check_untyped_defs = true
|
|
39
|
+
disallow_any_generics = true
|
|
40
|
+
disallow_incomplete_defs = true
|
|
41
|
+
disallow_untyped_defs = true
|
|
42
|
+
warn_redundant_casts = true
|
|
43
|
+
warn_unused_ignores = true
|
|
44
|
+
|
|
45
|
+
[[tool.mypy.overrides]]
|
|
46
|
+
module = ["tests.*", "testing.*"]
|
|
47
|
+
disallow_untyped_defs = false
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
# Exclude a variety of commonly ignored directories.
|
|
51
|
+
exclude = [
|
|
52
|
+
".bzr",
|
|
53
|
+
".direnv",
|
|
54
|
+
".eggs",
|
|
55
|
+
".git",
|
|
56
|
+
".git-rewrite",
|
|
57
|
+
".hg",
|
|
58
|
+
".ipynb_checkpoints",
|
|
59
|
+
".mypy_cache",
|
|
60
|
+
".nox",
|
|
61
|
+
".pants.d",
|
|
62
|
+
".pyenv",
|
|
63
|
+
".pytest_cache",
|
|
64
|
+
".pytype",
|
|
65
|
+
".ruff_cache",
|
|
66
|
+
".svn",
|
|
67
|
+
".tox",
|
|
68
|
+
".venv",
|
|
69
|
+
".vscode",
|
|
70
|
+
"__pypackages__",
|
|
71
|
+
"_build",
|
|
72
|
+
"buck-out",
|
|
73
|
+
"build",
|
|
74
|
+
"dist",
|
|
75
|
+
"node_modules",
|
|
76
|
+
"site-packages",
|
|
77
|
+
"venv",
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
# Same as Black.
|
|
81
|
+
line-length = 88
|
|
82
|
+
indent-width = 4
|
|
83
|
+
|
|
84
|
+
# Assume Python 3.10
|
|
85
|
+
target-version = "py310"
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint]
|
|
88
|
+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
|
89
|
+
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
|
90
|
+
# McCabe complexity (`C901`) by default.
|
|
91
|
+
|
|
92
|
+
# E = pycodestyle https://docs.astral.sh/ruff/rules/#error-e
|
|
93
|
+
# F = pyflakes https://docs.astral.sh/ruff/rules/#pyflakes-f
|
|
94
|
+
# UP = pyupgrade https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
95
|
+
# A = flake8 builtins https://docs.astral.sh/ruff/rules/#flake8-builtins-a
|
|
96
|
+
# B = flake8 bugbear https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
|
|
97
|
+
# I = isort https://docs.astral.sh/ruff/rules/#isort-i
|
|
98
|
+
select = ["E4", "E7", "E9", "F" ,"UP", "A", "B", "I"]
|
|
99
|
+
|
|
100
|
+
# UP031 Use format specifiers instead of percent format
|
|
101
|
+
ignore = ["UP031"]
|
|
102
|
+
|
|
103
|
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
104
|
+
fixable = ["ALL"]
|
|
105
|
+
unfixable = []
|
|
106
|
+
|
|
107
|
+
# Allow unused variables when underscore-prefixed.
|
|
108
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
109
|
+
|
|
110
|
+
[tool.ruff.format]
|
|
111
|
+
# Like Black, use double quotes for strings.
|
|
112
|
+
quote-style = "double"
|
|
113
|
+
|
|
114
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
115
|
+
indent-style = "space"
|
|
116
|
+
|
|
117
|
+
# Like Black, respect magic trailing commas.
|
|
118
|
+
skip-magic-trailing-comma = false
|
|
119
|
+
|
|
120
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
121
|
+
line-ending = "auto"
|
|
122
|
+
|
|
123
|
+
# Enable auto-formatting of code examples in docstrings. Markdown,
|
|
124
|
+
# reStructuredText code/literal blocks and doctests are all supported.
|
|
125
|
+
#
|
|
126
|
+
# This is currently disabled by default, but it is planned for this
|
|
127
|
+
# to be opt-out in the future.
|
|
128
|
+
docstring-code-format = false
|
|
129
|
+
|
|
130
|
+
# Set the line length limit used when formatting code snippets in
|
|
131
|
+
# docstrings.
|
|
132
|
+
#
|
|
133
|
+
# This only has an effect when the `docstring-code-format` setting is
|
|
134
|
+
# enabled.
|
|
135
|
+
docstring-code-line-length = "dynamic"
|
|
136
|
+
|
|
137
|
+
[tool.ruff.lint.isort]
|
|
138
|
+
force-single-line = true
|
|
139
|
+
required-imports = ["from __future__ import annotations"]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
|
-
from argparse import _ArgumentGroup
|
|
5
|
-
from argparse import _MutuallyExclusiveGroup
|
|
6
|
-
from argparse import _SubParsersAction
|
|
7
4
|
from argparse import ArgumentParser
|
|
8
5
|
from argparse import ArgumentTypeError
|
|
9
6
|
from argparse import Namespace
|
|
10
7
|
from argparse import RawDescriptionHelpFormatter
|
|
8
|
+
from argparse import _ArgumentGroup
|
|
9
|
+
from argparse import _MutuallyExclusiveGroup
|
|
10
|
+
from argparse import _SubParsersAction
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
|
|
13
13
|
from vortex.models import DesignType
|
|
@@ -32,10 +32,10 @@ _EXECUTE_PARSER_DESCRIPTION = """\
|
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
def _check_int_in_range(val: str,
|
|
35
|
+
def _check_int_in_range(val: str, min_: int = 0, max_: int | None = 50) -> int:
|
|
36
36
|
new_val = int(val)
|
|
37
|
-
if new_val <
|
|
38
|
-
raise ArgumentTypeError(f"%s is not between {
|
|
37
|
+
if new_val < min_ or (max_ is not None and new_val > max_):
|
|
38
|
+
raise ArgumentTypeError(f"%s is not between {min_} and {max_}. " % val)
|
|
39
39
|
return new_val
|
|
40
40
|
|
|
41
41
|
|
|
@@ -248,28 +248,6 @@ def add_clone_parser(
|
|
|
248
248
|
help="Open the application and webdesign URLs after cloning",
|
|
249
249
|
action="store_true",
|
|
250
250
|
)
|
|
251
|
-
clone_parser.add_argument(
|
|
252
|
-
"--export",
|
|
253
|
-
nargs="?",
|
|
254
|
-
metavar="DIR",
|
|
255
|
-
dest="export_path",
|
|
256
|
-
const="",
|
|
257
|
-
help=(
|
|
258
|
-
"Export applications in the .pmx format to a destination "
|
|
259
|
-
"folder. Default is 'exports' in the workspace."
|
|
260
|
-
),
|
|
261
|
-
type=Path,
|
|
262
|
-
)
|
|
263
|
-
clone_parser.add_argument(
|
|
264
|
-
"--timeout",
|
|
265
|
-
"-t",
|
|
266
|
-
type=int,
|
|
267
|
-
default=100,
|
|
268
|
-
help=(
|
|
269
|
-
"Set the timeout duration in seconds when using --export. "
|
|
270
|
-
"Default is %(default)s."
|
|
271
|
-
),
|
|
272
|
-
)
|
|
273
251
|
_add_server_option(clone_parser)
|
|
274
252
|
return clone_parser
|
|
275
253
|
|
|
@@ -373,6 +351,7 @@ def add_config_parser(command_parser: _SubParsersAction[ArgumentParser]) -> None
|
|
|
373
351
|
"--set",
|
|
374
352
|
help="Set an option value in a section. --set <section> <option> <value>",
|
|
375
353
|
nargs=3,
|
|
354
|
+
dest="set_config",
|
|
376
355
|
metavar=("SECTION", "OPTION", "VALUE"),
|
|
377
356
|
)
|
|
378
357
|
_add_server_option(config_parser)
|
|
@@ -399,7 +378,7 @@ def add_log_parser(command_parser: _SubParsersAction[ArgumentParser]) -> None:
|
|
|
399
378
|
log_type_mutex.add_argument("--info-only", action="store_true")
|
|
400
379
|
log_parser.add_argument("--keep-alive", "-k", action="store_true")
|
|
401
380
|
|
|
402
|
-
_positive_int = functools.partial(_check_int_in_range,
|
|
381
|
+
_positive_int = functools.partial(_check_int_in_range, min_=1)
|
|
403
382
|
log_parser.add_argument(
|
|
404
383
|
"--delay",
|
|
405
384
|
"-d",
|
|
@@ -86,7 +86,7 @@ def _parse_app_xml(
|
|
|
86
86
|
major, minor = (int(v) for v in java_version_ele.text.split(".", maxsplit=1))
|
|
87
87
|
version: JavaClassVersion = (major, minor)
|
|
88
88
|
app = PuakmaApplication(
|
|
89
|
-
|
|
89
|
+
id_=int(app_ele.attrib["id"]),
|
|
90
90
|
name=app_ele.attrib["name"],
|
|
91
91
|
group=app_ele.attrib["group"],
|
|
92
92
|
inherit_from=app_ele.attrib["inherit"],
|
|
@@ -168,8 +168,8 @@ async def _aclone_app(
|
|
|
168
168
|
app.design_objects = _match_and_validate_design_objs(app, objs, eles)
|
|
169
169
|
app_dir = workspace.mkdir(app, True)
|
|
170
170
|
|
|
171
|
-
for
|
|
172
|
-
(app_dir /
|
|
171
|
+
for dir_ in DesignType.dirs():
|
|
172
|
+
(app_dir / dir_).mkdir()
|
|
173
173
|
|
|
174
174
|
try:
|
|
175
175
|
logger.debug(f"Saving {len(objs)} Design Objects for [{app}]...")
|
|
@@ -235,7 +235,7 @@ def clone(
|
|
|
235
235
|
|
|
236
236
|
with (
|
|
237
237
|
workspace.exclusive_lock(),
|
|
238
|
-
Spinner(f"Cloning{len(app_ids)} application(s)..."),
|
|
238
|
+
Spinner(f"Cloning {len(app_ids)} application(s)..."),
|
|
239
239
|
):
|
|
240
240
|
return asyncio.run(
|
|
241
241
|
_aclone_apps(workspace, server, app_ids, get_resources, open_urls)
|
|
@@ -20,7 +20,7 @@ def config(
|
|
|
20
20
|
output_workspace_path: bool = False,
|
|
21
21
|
output_server_config: bool = False,
|
|
22
22
|
list_servers: bool = False,
|
|
23
|
-
|
|
23
|
+
set_config: tuple[str, str, str] | None = None,
|
|
24
24
|
) -> int:
|
|
25
25
|
if print_sample:
|
|
26
26
|
print(SAMPLE_CONFIG, end="")
|
|
@@ -37,6 +37,6 @@ def config(
|
|
|
37
37
|
elif list_servers:
|
|
38
38
|
for s in workspace.list_servers():
|
|
39
39
|
print(s)
|
|
40
|
-
elif
|
|
41
|
-
workspace.set_config(*
|
|
40
|
+
elif set_config:
|
|
41
|
+
workspace.set_config(*set_config)
|
|
42
42
|
return 0
|
|
@@ -7,9 +7,9 @@ import sys
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from typing import Literal
|
|
9
9
|
|
|
10
|
-
from watchfiles import awatch
|
|
11
10
|
from watchfiles import BaseFilter
|
|
12
11
|
from watchfiles import Change
|
|
12
|
+
from watchfiles import awatch
|
|
13
13
|
|
|
14
14
|
from vortex.colour import Colour
|
|
15
15
|
from vortex.models import DesignObject
|
|
@@ -299,7 +299,7 @@ class WorkspaceWatcher:
|
|
|
299
299
|
sys.stdout.flush()
|
|
300
300
|
res = sys.stdin.readline().strip()
|
|
301
301
|
except (KeyboardInterrupt, Exception) as e:
|
|
302
|
-
raise asyncio.CancelledError(e)
|
|
302
|
+
raise asyncio.CancelledError(e) from e
|
|
303
303
|
else:
|
|
304
304
|
return res in ["Y", "y"]
|
|
305
305
|
finally:
|
|
@@ -28,12 +28,11 @@ from vortex.commands.list import list_
|
|
|
28
28
|
from vortex.commands.log import log
|
|
29
29
|
from vortex.commands.new import new
|
|
30
30
|
from vortex.commands.watch import watch
|
|
31
|
-
from vortex.logging import logging_handler
|
|
32
31
|
from vortex.logging import LoggingHandler
|
|
32
|
+
from vortex.logging import logging_handler
|
|
33
33
|
from vortex.workspace import Workspace
|
|
34
34
|
from vortex.workspace import WorkspaceError
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
logger = logging.getLogger("vortex")
|
|
38
37
|
|
|
39
38
|
|
|
@@ -43,9 +42,9 @@ def error_handler() -> Generator[None]:
|
|
|
43
42
|
yield
|
|
44
43
|
except (WorkspaceError, HTTPStatusError) as e:
|
|
45
44
|
logger.error(e)
|
|
46
|
-
raise SystemExit(1)
|
|
45
|
+
raise SystemExit(1) from e
|
|
47
46
|
except KeyboardInterrupt:
|
|
48
|
-
raise SystemExit(130)
|
|
47
|
+
raise SystemExit(130) from None
|
|
49
48
|
except Exception as e:
|
|
50
49
|
msg = f"An unexpected error occured. {e}".rstrip()
|
|
51
50
|
logger.critical(msg)
|
|
@@ -161,7 +160,7 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
161
160
|
output_workspace_path=args.output_workspace_path,
|
|
162
161
|
output_server_config=args.output_server_config,
|
|
163
162
|
list_servers=args.list_servers,
|
|
164
|
-
|
|
163
|
+
set_config=args.set_config,
|
|
165
164
|
)
|
|
166
165
|
elif args.command in ("list", "ls"):
|
|
167
166
|
local_only = args.show_local_only or args.command == "ls"
|
|
@@ -14,9 +14,9 @@ from enum import IntEnum
|
|
|
14
14
|
from io import StringIO
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
from types import TracebackType
|
|
17
|
+
from typing import TYPE_CHECKING
|
|
17
18
|
from typing import Any
|
|
18
19
|
from typing import NamedTuple
|
|
19
|
-
from typing import TYPE_CHECKING
|
|
20
20
|
|
|
21
21
|
import httpx
|
|
22
22
|
|
|
@@ -252,7 +252,18 @@ class PuakmaServer:
|
|
|
252
252
|
query = _PUAKMA_APPLICATION_QUERY % where.getvalue()
|
|
253
253
|
where.close()
|
|
254
254
|
resp = self.database_designer.execute_query(self.puakma_db_conn_id, query)
|
|
255
|
-
|
|
255
|
+
ret = []
|
|
256
|
+
for app_dict in resp:
|
|
257
|
+
app = PuakmaApplication(
|
|
258
|
+
app_dict["id"],
|
|
259
|
+
app_dict["name"],
|
|
260
|
+
app_dict["group"],
|
|
261
|
+
app_dict["inherit_from"],
|
|
262
|
+
app_dict["template_name"],
|
|
263
|
+
self.host,
|
|
264
|
+
)
|
|
265
|
+
ret.append(app)
|
|
266
|
+
return ret
|
|
256
267
|
|
|
257
268
|
def get_last_log_items(
|
|
258
269
|
self,
|
|
@@ -306,7 +317,7 @@ class PuakmaApplication:
|
|
|
306
317
|
|
|
307
318
|
def __init__(
|
|
308
319
|
self,
|
|
309
|
-
|
|
320
|
+
id_: int,
|
|
310
321
|
name: str,
|
|
311
322
|
group: str,
|
|
312
323
|
inherit_from: str | None,
|
|
@@ -315,7 +326,7 @@ class PuakmaApplication:
|
|
|
315
326
|
db_connections: tuple[DatabaseConnection, ...] | None = None,
|
|
316
327
|
java_class_version: JavaClassVersion | None = None,
|
|
317
328
|
) -> None:
|
|
318
|
-
self.id =
|
|
329
|
+
self.id = id_
|
|
319
330
|
self.name = name
|
|
320
331
|
self.group = group
|
|
321
332
|
# Some apps dont have a group. Adding a palce holder will
|
|
@@ -368,7 +379,7 @@ class PuakmaApplication:
|
|
|
368
379
|
if not isinstance(app, cls):
|
|
369
380
|
raise TypeError(f"Unexpected instance of type {type(app)}")
|
|
370
381
|
except Exception as e:
|
|
371
|
-
raise ValueError(f"Error initialising {cls}: {e}")
|
|
382
|
+
raise ValueError(f"Error initialising {cls}: {e}") from e
|
|
372
383
|
else:
|
|
373
384
|
return app
|
|
374
385
|
|
|
@@ -669,7 +680,9 @@ class DesignPath:
|
|
|
669
680
|
if must_exist and not path.exists():
|
|
670
681
|
raise ValueError(f"Design Object '{path}' does not exist")
|
|
671
682
|
except ValueError as e:
|
|
672
|
-
raise InvalidDesignPathError(
|
|
683
|
+
raise InvalidDesignPathError(
|
|
684
|
+
f"Invalid path to Design Object '{path}': {e}"
|
|
685
|
+
) from e
|
|
673
686
|
|
|
674
687
|
self.workspace = workspace
|
|
675
688
|
self.path = path
|
|
@@ -119,9 +119,9 @@ class Workspace:
|
|
|
119
119
|
|
|
120
120
|
def init(self) -> None:
|
|
121
121
|
dirs = [self.path, self.config_dir]
|
|
122
|
-
for
|
|
123
|
-
if not
|
|
124
|
-
|
|
122
|
+
for dir_ in dirs:
|
|
123
|
+
if not dir_.is_dir():
|
|
124
|
+
dir_.mkdir()
|
|
125
125
|
|
|
126
126
|
if not self.server_config_file.exists():
|
|
127
127
|
with open(self.server_config_file, "w") as f:
|
|
@@ -218,7 +218,7 @@ class Workspace:
|
|
|
218
218
|
config.write(f)
|
|
219
219
|
|
|
220
220
|
def listapps(self, server: PuakmaServer | None = None) -> list[PuakmaApplication]:
|
|
221
|
-
return [PuakmaApplication.from_dir(
|
|
221
|
+
return [PuakmaApplication.from_dir(dir_) for dir_ in self.listdir(server)]
|
|
222
222
|
|
|
223
223
|
def list_servers(self) -> list[str]:
|
|
224
224
|
config = configparser.ConfigParser()
|
|
@@ -300,14 +300,14 @@ class Workspace:
|
|
|
300
300
|
vortex_dirs = [self.vscode_dir, self.config_dir, self.exports_dir]
|
|
301
301
|
if self.logs_dir.is_dir():
|
|
302
302
|
vortex_dirs.append(self.logs_dir)
|
|
303
|
-
folders = [{"path": str(
|
|
303
|
+
folders = [{"path": str(dir_)} for dir_ in vortex_dirs]
|
|
304
304
|
folders.extend(
|
|
305
305
|
[
|
|
306
306
|
{
|
|
307
|
-
"path": str(
|
|
308
|
-
"name": str(PuakmaApplication.from_dir(
|
|
307
|
+
"path": str(dir_),
|
|
308
|
+
"name": str(PuakmaApplication.from_dir(dir_)),
|
|
309
309
|
}
|
|
310
|
-
for
|
|
310
|
+
for dir_ in self.listdir(server)
|
|
311
311
|
]
|
|
312
312
|
)
|
|
313
313
|
folder_settings = {"folders": folders}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vortex_cli
|
|
3
|
-
Version: 4.17.
|
|
4
|
-
|
|
5
|
-
Author: Jordan Amos
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Version: 4.17.2
|
|
4
|
+
Summary: Vortex CLI
|
|
5
|
+
Author-email: Jordan Amos <jordan.amos@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 jordanamos
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Keywords: vortex,cli,puakma,tornado
|
|
9
29
|
Classifier: Intended Audience :: Developers
|
|
10
30
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
31
|
Classifier: Natural Language :: English
|
vortex_cli-4.17.1/setup.cfg
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
name = vortex_cli
|
|
3
|
-
version = 4.17.1
|
|
4
|
-
long_description = file: README.md
|
|
5
|
-
long_description_content_type = text/markdown
|
|
6
|
-
url = https://github.com/jordanamos/vortex-cli
|
|
7
|
-
author = Jordan Amos
|
|
8
|
-
author_email = jordan.amos@gmail.com
|
|
9
|
-
license = MIT
|
|
10
|
-
license_files = LICENSE
|
|
11
|
-
classifiers =
|
|
12
|
-
Intended Audience :: Developers
|
|
13
|
-
License :: OSI Approved :: MIT License
|
|
14
|
-
Natural Language :: English
|
|
15
|
-
Programming Language :: Python
|
|
16
|
-
Programming Language :: Python :: 3
|
|
17
|
-
Programming Language :: Python :: 3 :: Only
|
|
18
|
-
keywords = vortex cli
|
|
19
|
-
vdescription = Vortex CLI
|
|
20
|
-
|
|
21
|
-
[options]
|
|
22
|
-
packages = find:
|
|
23
|
-
install_requires =
|
|
24
|
-
httpx==0.24.1
|
|
25
|
-
tabulate==0.9.0
|
|
26
|
-
watchfiles==0.19.0
|
|
27
|
-
python_requires = >=3.10
|
|
28
|
-
|
|
29
|
-
[options.packages.find]
|
|
30
|
-
exclude =
|
|
31
|
-
tests*
|
|
32
|
-
testing*
|
|
33
|
-
|
|
34
|
-
[options.entry_points]
|
|
35
|
-
console_scripts =
|
|
36
|
-
vortex = vortex.__main__:main
|
|
37
|
-
|
|
38
|
-
[options.package_data]
|
|
39
|
-
vortex =
|
|
40
|
-
lib/puakma-6.0.37.jar
|
|
41
|
-
docs/Blackbook.pdf
|
|
42
|
-
|
|
43
|
-
[flake8]
|
|
44
|
-
max-line-length = 88
|
|
45
|
-
|
|
46
|
-
[mypy]
|
|
47
|
-
check_untyped_defs = true
|
|
48
|
-
disallow_any_generics = true
|
|
49
|
-
disallow_incomplete_defs = true
|
|
50
|
-
disallow_untyped_defs = true
|
|
51
|
-
warn_redundant_casts = true
|
|
52
|
-
warn_unused_ignores = true
|
|
53
|
-
|
|
54
|
-
[mypy-tests.*]
|
|
55
|
-
disallow_untyped_defs = false
|
|
56
|
-
|
|
57
|
-
[egg_info]
|
|
58
|
-
tag_build =
|
|
59
|
-
tag_date = 0
|
|
60
|
-
|
vortex_cli-4.17.1/setup.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,17 +7,17 @@ import logging
|
|
|
7
7
|
import xml.etree.ElementTree as ET
|
|
8
8
|
from abc import ABC
|
|
9
9
|
from collections.abc import Generator
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
10
11
|
from typing import Any
|
|
11
12
|
from typing import Literal
|
|
12
13
|
from typing import NamedTuple
|
|
13
14
|
from typing import NoReturn
|
|
14
|
-
from typing import TYPE_CHECKING
|
|
15
15
|
|
|
16
16
|
from vortex import constants as C
|
|
17
17
|
|
|
18
18
|
if TYPE_CHECKING:
|
|
19
|
-
from vortex.models import PuakmaServer
|
|
20
19
|
from vortex.models import DesignObject
|
|
20
|
+
from vortex.models import PuakmaServer
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger("vortex")
|
|
File without changes
|
|
@@ -12,9 +12,9 @@ from collections.abc import Generator
|
|
|
12
12
|
from collections.abc import Iterable
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
from types import TracebackType
|
|
15
|
-
from typing import Any
|
|
16
15
|
from typing import IO
|
|
17
16
|
from typing import TYPE_CHECKING
|
|
17
|
+
from typing import Any
|
|
18
18
|
|
|
19
19
|
import tabulate
|
|
20
20
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|