robotcode 1.4.0__py3-none-any.whl → 1.5.0__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.
- robotcode/cli/__init__.py +39 -6
- robotcode/cli/__version__.py +1 -1
- {robotcode-1.4.0.dist-info → robotcode-1.5.0.dist-info}/METADATA +16 -16
- {robotcode-1.4.0.dist-info → robotcode-1.5.0.dist-info}/RECORD +7 -7
- {robotcode-1.4.0.dist-info → robotcode-1.5.0.dist-info}/WHEEL +0 -0
- {robotcode-1.4.0.dist-info → robotcode-1.5.0.dist-info}/entry_points.txt +0 -0
- {robotcode-1.4.0.dist-info → robotcode-1.5.0.dist-info}/licenses/LICENSE.txt +0 -0
robotcode/cli/__init__.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
import json
|
1
2
|
import logging
|
3
|
+
import logging.config
|
2
4
|
from pathlib import Path
|
3
5
|
from typing import Any, List, Literal, Optional
|
4
6
|
|
@@ -35,8 +37,11 @@ click.Parameter.make_metavar = my_make_metavar # type: ignore[method-assign]
|
|
35
37
|
|
36
38
|
|
37
39
|
class RobotCodeFormatter(logging.Formatter):
|
38
|
-
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
39
|
-
|
40
|
+
def __init__(self, *args: Any, defaults: Any = None, **kwargs: Any) -> None:
|
41
|
+
defaults = defaults or {}
|
42
|
+
if defaults.get("indent") is None:
|
43
|
+
defaults["indent"] = ""
|
44
|
+
super().__init__(*args, defaults=defaults, **kwargs)
|
40
45
|
|
41
46
|
|
42
47
|
@click.group(
|
@@ -162,6 +167,21 @@ class RobotCodeFormatter(logging.Formatter):
|
|
162
167
|
help="Enables logging of method/function calls.",
|
163
168
|
show_envvar=True,
|
164
169
|
)
|
170
|
+
@click.option(
|
171
|
+
"--log-config",
|
172
|
+
type=click.Path(
|
173
|
+
file_okay=True,
|
174
|
+
dir_okay=False,
|
175
|
+
readable=True,
|
176
|
+
exists=True,
|
177
|
+
path_type=str,
|
178
|
+
),
|
179
|
+
help="Path to a logging configuration file. This must be a valid Python logging configuration file in JSON format."
|
180
|
+
" If this option is set, the other logging options are ignored.",
|
181
|
+
default=None,
|
182
|
+
show_default=True,
|
183
|
+
show_envvar=True,
|
184
|
+
)
|
165
185
|
@click.option(
|
166
186
|
"--default-path",
|
167
187
|
"-dp",
|
@@ -220,6 +240,7 @@ def robotcode(
|
|
220
240
|
log_style: Literal["%", "{", "$"],
|
221
241
|
log_filename: Optional[str],
|
222
242
|
log_calls: bool,
|
243
|
+
log_config: Optional[Path],
|
223
244
|
default_path: Optional[List[str]],
|
224
245
|
launcher_script: Optional[str] = None,
|
225
246
|
debugpy: bool = False,
|
@@ -257,7 +278,21 @@ def robotcode(
|
|
257
278
|
app.config.log_level = log_level
|
258
279
|
app.config.log_calls = log_calls
|
259
280
|
|
260
|
-
if
|
281
|
+
if log_config:
|
282
|
+
if log_calls:
|
283
|
+
LoggingDescriptor.set_call_tracing(True)
|
284
|
+
|
285
|
+
app.verbose(f"Loading logging configuration from '{log_config}'")
|
286
|
+
try:
|
287
|
+
with open(log_config, "r", encoding="utf-8") as f:
|
288
|
+
config = json.load(f)
|
289
|
+
|
290
|
+
logging.config.dictConfig(config)
|
291
|
+
|
292
|
+
except Exception as e:
|
293
|
+
app.error(f"Failed to load logging configuration from '{log_config}': {e}")
|
294
|
+
|
295
|
+
elif log:
|
261
296
|
if log_calls:
|
262
297
|
LoggingDescriptor.set_call_tracing(True)
|
263
298
|
|
@@ -269,9 +304,7 @@ def robotcode(
|
|
269
304
|
)
|
270
305
|
|
271
306
|
try:
|
272
|
-
logging.root.handlers[0].formatter = RobotCodeFormatter(
|
273
|
-
fmt=log_format, style=log_style, defaults={"indent": ""}
|
274
|
-
)
|
307
|
+
logging.root.handlers[0].formatter = RobotCodeFormatter(fmt=log_format, style=log_style)
|
275
308
|
except TypeError:
|
276
309
|
pass
|
277
310
|
|
robotcode/cli/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.
|
1
|
+
__version__ = "1.5.0"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: robotcode
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.5.0
|
4
4
|
Summary: Command line interface for RobotCode
|
5
5
|
Project-URL: Homepage, https://robotcode.io
|
6
6
|
Project-URL: Donate, https://opencollective.com/robotcode
|
@@ -34,39 +34,39 @@ Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
|
|
34
34
|
Classifier: Topic :: Utilities
|
35
35
|
Classifier: Typing :: Typed
|
36
36
|
Requires-Python: >=3.8
|
37
|
-
Requires-Dist: robotcode-core==1.
|
38
|
-
Requires-Dist: robotcode-plugin==1.
|
39
|
-
Requires-Dist: robotcode-robot==1.
|
37
|
+
Requires-Dist: robotcode-core==1.5.0
|
38
|
+
Requires-Dist: robotcode-plugin==1.5.0
|
39
|
+
Requires-Dist: robotcode-robot==1.5.0
|
40
40
|
Provides-Extra: all
|
41
41
|
Requires-Dist: docutils; extra == 'all'
|
42
42
|
Requires-Dist: pyyaml>=5.4; extra == 'all'
|
43
43
|
Requires-Dist: rich; extra == 'all'
|
44
|
-
Requires-Dist: robotcode-analyze==1.
|
45
|
-
Requires-Dist: robotcode-debugger==1.
|
46
|
-
Requires-Dist: robotcode-language-server==1.
|
47
|
-
Requires-Dist: robotcode-repl-server==1.
|
48
|
-
Requires-Dist: robotcode-repl==1.
|
49
|
-
Requires-Dist: robotcode-runner==1.
|
44
|
+
Requires-Dist: robotcode-analyze==1.5.0; extra == 'all'
|
45
|
+
Requires-Dist: robotcode-debugger==1.5.0; extra == 'all'
|
46
|
+
Requires-Dist: robotcode-language-server==1.5.0; extra == 'all'
|
47
|
+
Requires-Dist: robotcode-repl-server==1.5.0; extra == 'all'
|
48
|
+
Requires-Dist: robotcode-repl==1.5.0; extra == 'all'
|
49
|
+
Requires-Dist: robotcode-runner==1.5.0; extra == 'all'
|
50
50
|
Requires-Dist: robotframework-robocop>=2.0.0; extra == 'all'
|
51
51
|
Requires-Dist: robotframework-tidy>=2.0.0; extra == 'all'
|
52
52
|
Provides-Extra: analyze
|
53
|
-
Requires-Dist: robotcode-analyze==1.
|
53
|
+
Requires-Dist: robotcode-analyze==1.5.0; extra == 'analyze'
|
54
54
|
Provides-Extra: colored
|
55
55
|
Requires-Dist: rich; extra == 'colored'
|
56
56
|
Provides-Extra: debugger
|
57
|
-
Requires-Dist: robotcode-debugger==1.
|
57
|
+
Requires-Dist: robotcode-debugger==1.5.0; extra == 'debugger'
|
58
58
|
Provides-Extra: languageserver
|
59
|
-
Requires-Dist: robotcode-language-server==1.
|
59
|
+
Requires-Dist: robotcode-language-server==1.5.0; extra == 'languageserver'
|
60
60
|
Provides-Extra: lint
|
61
61
|
Requires-Dist: robotframework-robocop>=2.0.0; extra == 'lint'
|
62
62
|
Provides-Extra: repl
|
63
|
-
Requires-Dist: robotcode-repl==1.
|
63
|
+
Requires-Dist: robotcode-repl==1.5.0; extra == 'repl'
|
64
64
|
Provides-Extra: replserver
|
65
|
-
Requires-Dist: robotcode-repl-server==1.
|
65
|
+
Requires-Dist: robotcode-repl-server==1.5.0; extra == 'replserver'
|
66
66
|
Provides-Extra: rest
|
67
67
|
Requires-Dist: docutils; extra == 'rest'
|
68
68
|
Provides-Extra: runner
|
69
|
-
Requires-Dist: robotcode-runner==1.
|
69
|
+
Requires-Dist: robotcode-runner==1.5.0; extra == 'runner'
|
70
70
|
Provides-Extra: tidy
|
71
71
|
Requires-Dist: robotframework-tidy>=2.0.0; extra == 'tidy'
|
72
72
|
Provides-Extra: yaml
|
@@ -1,12 +1,12 @@
|
|
1
|
-
robotcode/cli/__init__.py,sha256=
|
1
|
+
robotcode/cli/__init__.py,sha256=dQ0Hhc3BJCf07zyHINEfAYROccgsnP-jcRUYzdTmD9g,9456
|
2
2
|
robotcode/cli/__main__.py,sha256=hX3nwROMTnsYGT1KS0rXUYrslu9sFzctYdAh66Rcckw,153
|
3
|
-
robotcode/cli/__version__.py,sha256=
|
3
|
+
robotcode/cli/__version__.py,sha256=X9pTeGHIYZtDOmfb9pnn2DEqWZMAyaPlqdFwEhsuSvk,22
|
4
4
|
robotcode/cli/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
|
5
5
|
robotcode/cli/commands/__init__.py,sha256=XJHRt_YwMO2Ni2EfL2aj4jkJXMVG6NGFTpzvSVgIRnQ,92
|
6
6
|
robotcode/cli/commands/config.py,sha256=0Jmf7HDIo7IIaOMU9M_bYi7PdHAfcae6x3SW93NA3EA,10481
|
7
7
|
robotcode/cli/commands/profiles.py,sha256=5H9lvSVCMggWXf0IH54QtgDgqupEEvpcUrEsTZvZsNM,6127
|
8
|
-
robotcode-1.
|
9
|
-
robotcode-1.
|
10
|
-
robotcode-1.
|
11
|
-
robotcode-1.
|
12
|
-
robotcode-1.
|
8
|
+
robotcode-1.5.0.dist-info/METADATA,sha256=rQFPSxxHHy7E1XhcXRkKih4hMdBp6tlLy4i-N52g7GI,13729
|
9
|
+
robotcode-1.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
robotcode-1.5.0.dist-info/entry_points.txt,sha256=Pb4DKVVdJb5PboVl48njwk3DkKQHBJOL1A8KkpemqA8,58
|
11
|
+
robotcode-1.5.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
|
12
|
+
robotcode-1.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|