robotcode 1.4.0__tar.gz → 1.5.0__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.
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
4
4
 
5
+ ## [1.5.0](https://github.com/robotcodedev/robotcode/compare/v1.4.0..v1.5.0) - 2025-07-07
6
+
7
+ ### Features
8
+
9
+ - **cli:** Add new command line switch `--log-config` to specify a python json log configuration ([31a11f2](https://github.com/robotcodedev/robotcode/commit/31a11f27b96fba6c879218c9b13cdea5f8bb89c3))
10
+ - **jsonrpcl:** Simplify error message formatting in JsonRPCProtocol for better readability in clients ([75614b0](https://github.com/robotcodedev/robotcode/commit/75614b05820f57c98c416949abced03970e0b429))
11
+
12
+
13
+ ### Refactor
14
+
15
+ - **langserver:** Remove some unused code ([fa429a5](https://github.com/robotcodedev/robotcode/commit/fa429a502e1901cfc0d4126c4047994a5fd5ee39))
16
+ - **langserver:** Simplify keyword renaming ([3836362](https://github.com/robotcodedev/robotcode/commit/3836362073599bcc32d9cb38425645d34d681f91))
17
+ - **langserver:** Simplify variable renaming ([779fd70](https://github.com/robotcodedev/robotcode/commit/779fd703339ce81124f03f08b73e2639d0729212))
18
+
19
+
20
+ ### Testing
21
+
22
+ - Update regression tests for RF 7.3.2 ([fd1b89a](https://github.com/robotcodedev/robotcode/commit/fd1b89ac17b1f378bc66c6d944afc92252f13ecf))
23
+
24
+
5
25
  ## [1.4.0](https://github.com/robotcodedev/robotcode/compare/v1.3.0..v1.4.0) - 2025-06-30
6
26
 
7
27
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotcode
3
- Version: 1.4.0
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.4.0
38
- Requires-Dist: robotcode-plugin==1.4.0
39
- Requires-Dist: robotcode-robot==1.4.0
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.4.0; extra == 'all'
45
- Requires-Dist: robotcode-debugger==1.4.0; extra == 'all'
46
- Requires-Dist: robotcode-language-server==1.4.0; extra == 'all'
47
- Requires-Dist: robotcode-repl-server==1.4.0; extra == 'all'
48
- Requires-Dist: robotcode-repl==1.4.0; extra == 'all'
49
- Requires-Dist: robotcode-runner==1.4.0; extra == 'all'
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.4.0; extra == 'analyze'
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.4.0; extra == 'debugger'
57
+ Requires-Dist: robotcode-debugger==1.5.0; extra == 'debugger'
58
58
  Provides-Extra: languageserver
59
- Requires-Dist: robotcode-language-server==1.4.0; extra == 'languageserver'
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.4.0; extra == 'repl'
63
+ Requires-Dist: robotcode-repl==1.5.0; extra == 'repl'
64
64
  Provides-Extra: replserver
65
- Requires-Dist: robotcode-repl-server==1.4.0; extra == 'replserver'
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.4.0; extra == 'runner'
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
@@ -51,9 +51,9 @@ classifiers = [
51
51
  ]
52
52
  requires-python = ">=3.8"
53
53
  dependencies = [
54
- "robotcode-core==1.4.0",
55
- "robotcode-plugin==1.4.0",
56
- "robotcode-robot==1.4.0",
54
+ "robotcode-core==1.5.0",
55
+ "robotcode-plugin==1.5.0",
56
+ "robotcode-robot==1.5.0",
57
57
  ]
58
58
  dynamic = ["version"]
59
59
 
@@ -71,24 +71,24 @@ robotcode = "robotcode.cli.__main__:main"
71
71
 
72
72
 
73
73
  [project.optional-dependencies]
74
- debugger = ["robotcode-debugger==1.4.0"]
75
- languageserver = ["robotcode-language-server==1.4.0"]
76
- runner = ["robotcode-runner==1.4.0"]
77
- analyze = ["robotcode-analyze==1.4.0"]
74
+ debugger = ["robotcode-debugger==1.5.0"]
75
+ languageserver = ["robotcode-language-server==1.5.0"]
76
+ runner = ["robotcode-runner==1.5.0"]
77
+ analyze = ["robotcode-analyze==1.5.0"]
78
78
  yaml = ["PyYAML>=5.4"]
79
79
  lint = ["robotframework-robocop>=2.0.0"]
80
80
  tidy = ["robotframework-tidy>=2.0.0"]
81
81
  rest = ["docutils"]
82
- repl = ["robotcode-repl==1.4.0"]
83
- replserver = ["robotcode-repl-server==1.4.0"]
82
+ repl = ["robotcode-repl==1.5.0"]
83
+ replserver = ["robotcode-repl-server==1.5.0"]
84
84
  colored = ["rich"]
85
85
  all = [
86
- "robotcode-debugger==1.4.0",
87
- "robotcode-language-server==1.4.0",
88
- "robotcode-runner==1.4.0",
89
- "robotcode-analyze==1.4.0",
90
- "robotcode-repl==1.4.0",
91
- "robotcode-repl-server==1.4.0",
86
+ "robotcode-debugger==1.5.0",
87
+ "robotcode-language-server==1.5.0",
88
+ "robotcode-runner==1.5.0",
89
+ "robotcode-analyze==1.5.0",
90
+ "robotcode-repl==1.5.0",
91
+ "robotcode-repl-server==1.5.0",
92
92
  "PyYAML>=5.4",
93
93
  "robotframework-robocop>=2.0.0",
94
94
  "robotframework-tidy>=2.0.0",
@@ -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
- super().__init__(*args, **kwargs)
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 log:
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
 
@@ -0,0 +1 @@
1
+ __version__ = "1.5.0"
@@ -1 +0,0 @@
1
- __version__ = "1.4.0"
File without changes
File without changes
File without changes
File without changes