PySerials 0.0.0.dev59__tar.gz → 0.0.0.dev61__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.
Files changed (24) hide show
  1. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/PKG-INFO +5 -5
  2. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/pyproject.toml +4 -4
  3. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/PKG-INFO +5 -5
  4. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/SOURCES.txt +0 -1
  5. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/requires.txt +3 -3
  6. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/update.py +13 -7
  7. pyserials-0.0.0.dev59/README.md +0 -3
  8. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/setup.cfg +0 -0
  9. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/dependency_links.txt +0 -0
  10. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/not-zip-safe +0 -0
  11. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/PySerials.egg-info/top_level.txt +0 -0
  12. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/__init__.py +0 -0
  13. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/compare.py +0 -0
  14. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/exception/__init__.py +0 -0
  15. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/exception/_base.py +0 -0
  16. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/exception/read.py +0 -0
  17. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/exception/update.py +0 -0
  18. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/exception/validate.py +0 -0
  19. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/format.py +0 -0
  20. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/nested_dict.py +0 -0
  21. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/property_dict.py +0 -0
  22. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/read.py +0 -0
  23. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/validate.py +0 -0
  24. {pyserials-0.0.0.dev59 → pyserials-0.0.0.dev61}/src/pyserials/write.py +0 -0
@@ -1,13 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: PySerials
3
- Version: 0.0.0.dev59
3
+ Version: 0.0.0.dev61
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: jsonschema<5,>=4.21.0
6
6
  Requires-Dist: referencing>=0.35.1
7
7
  Requires-Dist: jsonpath-ng<2,>=1.6.1
8
8
  Requires-Dist: ruamel.yaml>=0.18
9
9
  Requires-Dist: ruamel.yaml.string<1,>=0.1.1
10
- Requires-Dist: tomlkit<0.12,>=0.11.8
11
- Requires-Dist: MDit==0.0.0.dev56
12
- Requires-Dist: ExceptionMan==0.0.0.dev56
10
+ Requires-Dist: tomlkit<0.14,>=0.11.8
11
+ Requires-Dist: MDit==0.0.0.dev58
12
+ Requires-Dist: ExceptionMan==0.0.0.dev58
13
13
  Requires-Dist: ProtocolMan==0.0.0.dev2
@@ -17,7 +17,7 @@ namespaces = true
17
17
  # ----------------------------------------- Project Metadata -------------------------------------
18
18
  #
19
19
  [project]
20
- version = "0.0.0.dev59"
20
+ version = "0.0.0.dev61"
21
21
  name = "PySerials"
22
22
  dependencies = [
23
23
  "jsonschema >= 4.21.0, < 5",
@@ -25,9 +25,9 @@ dependencies = [
25
25
  "jsonpath-ng >= 1.6.1, < 2",
26
26
  "ruamel.yaml >= 0.18", # https://yaml.readthedocs.io/en/stable/
27
27
  "ruamel.yaml.string >= 0.1.1, < 1",
28
- "tomlkit >= 0.11.8, < 0.12", # https://tomlkit.readthedocs.io/en/stable/,
29
- "MDit == 0.0.0.dev56",
30
- "ExceptionMan == 0.0.0.dev56",
28
+ "tomlkit >= 0.11.8, < 0.14", # https://tomlkit.readthedocs.io/en/stable/,
29
+ "MDit == 0.0.0.dev58",
30
+ "ExceptionMan == 0.0.0.dev58",
31
31
  "ProtocolMan == 0.0.0.dev2",
32
32
  ]
33
33
  requires-python = ">=3.10"
@@ -1,13 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: PySerials
3
- Version: 0.0.0.dev59
3
+ Version: 0.0.0.dev61
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: jsonschema<5,>=4.21.0
6
6
  Requires-Dist: referencing>=0.35.1
7
7
  Requires-Dist: jsonpath-ng<2,>=1.6.1
8
8
  Requires-Dist: ruamel.yaml>=0.18
9
9
  Requires-Dist: ruamel.yaml.string<1,>=0.1.1
10
- Requires-Dist: tomlkit<0.12,>=0.11.8
11
- Requires-Dist: MDit==0.0.0.dev56
12
- Requires-Dist: ExceptionMan==0.0.0.dev56
10
+ Requires-Dist: tomlkit<0.14,>=0.11.8
11
+ Requires-Dist: MDit==0.0.0.dev58
12
+ Requires-Dist: ExceptionMan==0.0.0.dev58
13
13
  Requires-Dist: ProtocolMan==0.0.0.dev2
@@ -1,4 +1,3 @@
1
- README.md
2
1
  pyproject.toml
3
2
  src/PySerials.egg-info/PKG-INFO
4
3
  src/PySerials.egg-info/SOURCES.txt
@@ -3,7 +3,7 @@ referencing>=0.35.1
3
3
  jsonpath-ng<2,>=1.6.1
4
4
  ruamel.yaml>=0.18
5
5
  ruamel.yaml.string<1,>=0.1.1
6
- tomlkit<0.12,>=0.11.8
7
- MDit==0.0.0.dev56
8
- ExceptionMan==0.0.0.dev56
6
+ tomlkit<0.14,>=0.11.8
7
+ MDit==0.0.0.dev58
8
+ ExceptionMan==0.0.0.dev58
9
9
  ProtocolMan==0.0.0.dev2
@@ -220,7 +220,7 @@ class TemplateFiller:
220
220
  path_expr = _jsonpath.parse(path)
221
221
  except _jsonpath_exceptions.JSONPathError:
222
222
  raise_error(
223
- path_invalid=path_expr,
223
+ path_invalid=path,
224
224
  description_template="JSONPath expression {path_invalid} is invalid.",
225
225
  )
226
226
  if num_periods:
@@ -242,6 +242,10 @@ class TemplateFiller:
242
242
  # Handle relative-key key
243
243
  if self._relative_key_key and path == self._relative_key_key:
244
244
  output = root_path_expr.right
245
+ if isinstance(output, _jsonpath.Fields):
246
+ output = output.fields[0]
247
+ elif isinstance(output, _jsonpath.Index):
248
+ output = output.index
245
249
  if from_code:
246
250
  return output, True
247
251
  return output
@@ -316,12 +320,14 @@ class TemplateFiller:
316
320
  def fill_nested_values(match: _re.Match | str):
317
321
  pattern_nested = self._get_value_regex_pattern(level=level + 1)
318
322
  return pattern_nested.sub(
319
- lambda x: self._recursive_subst(
320
- templ=x.group(),
321
- current_path=current_path,
322
- relative_path_anchor=get_relative_path(current_path),
323
- level=level + 1,
324
- current_chain=current_chain,
323
+ lambda x: str(
324
+ self._recursive_subst(
325
+ templ=x.group(),
326
+ current_path=current_path,
327
+ relative_path_anchor=get_relative_path(current_path),
328
+ level=level + 1,
329
+ current_chain=current_chain,
330
+ )
325
331
  ),
326
332
  match if isinstance(match, str) else match.group(1),
327
333
  )
@@ -1,3 +0,0 @@
1
- # PySerials
2
-
3
- Work with serializable data in Python.