edison-parser 0.3__tar.gz → 0.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edison-parser
3
- Version: 0.3
3
+ Version: 0.4
4
4
  Summary: An EDIFACT parser with a real syntax tree.
5
5
  Author-email: Alex Prengère <alex.prengere@gmail.com>
6
6
  License-Expression: MIT
@@ -36,16 +36,16 @@ Dynamic: license-file
36
36
  </div>
37
37
 
38
38
  Edison is a Python library for parsing EDIFACT messages. Instead of treating a
39
- message as a flat stream of segments, it models valid messages as a tree of
40
- transitions. You define the schema once, then parse, validate, or pretty-print
39
+ message as a flat stream of segments, it models valid messages as a tree.
40
+ You define the schema once, then parse, validate, or pretty-print
41
41
  messages against that structure.
42
42
 
43
43
  ## Highlights
44
44
 
45
45
  - Define EDIFACT syntax trees directly in Python.
46
+ - Segments can define groups of child segments, which can be conditional, mandatory, or repeatable.
46
47
  - Attach parsing callbacks to the segments you care about.
47
48
  - Select schemas by message version.
48
- - Model conditional, mandatory, and repeatable segments.
49
49
  - Handle escaped EDIFACT separators and EBCDIC control characters.
50
50
  - Properly tokenize segments with specified lengths like `BLB`
51
51
  - Export transition graphs with `pydot`.
@@ -323,9 +323,12 @@ finishes.
323
323
  <details>
324
324
  <summary>Transition graphs</summary>
325
325
 
326
- `pydot` is installed with Edison. To write PNG files, make sure Graphviz is
327
- available on your system, then call `build_dot_object()` on a `BaseParser`
328
- subclass.
326
+ Internally, Edison builds a directed graph of transitions between segments, when the parser class is created.
327
+ Each node is a specific segment, and each edge is a valid transition to the next segment.
328
+ With this, parsing is just a walk through the graph, and validation is checking if the path exists.
329
+
330
+ You can visualize the transition graph with `build_dot_object()`, which returns a `pydot.Dot` object.
331
+ `pydot` is installed with Edison. To write PNG files, make sure Graphviz is available on your system.
329
332
 
330
333
  ```python
331
334
  from edison import BaseParser
@@ -350,6 +353,12 @@ dot = Parser.build_dot_object()
350
353
  dot.write_png("transitions.png")
351
354
  ```
352
355
 
356
+ Here is the resulting graph for the above schema.
357
+
358
+ <p align="center">
359
+ <img src="https://raw.githubusercontent.com/AmadeusITGroup/Edison/main/docs/transitions.png" alt="pydot">
360
+ </p>
361
+
353
362
  You can pass the same version selector used by parsing, and hide upward links
354
363
  for a simpler tree-like graph:
355
364
 
@@ -11,16 +11,16 @@
11
11
  </div>
12
12
 
13
13
  Edison is a Python library for parsing EDIFACT messages. Instead of treating a
14
- message as a flat stream of segments, it models valid messages as a tree of
15
- transitions. You define the schema once, then parse, validate, or pretty-print
14
+ message as a flat stream of segments, it models valid messages as a tree.
15
+ You define the schema once, then parse, validate, or pretty-print
16
16
  messages against that structure.
17
17
 
18
18
  ## Highlights
19
19
 
20
20
  - Define EDIFACT syntax trees directly in Python.
21
+ - Segments can define groups of child segments, which can be conditional, mandatory, or repeatable.
21
22
  - Attach parsing callbacks to the segments you care about.
22
23
  - Select schemas by message version.
23
- - Model conditional, mandatory, and repeatable segments.
24
24
  - Handle escaped EDIFACT separators and EBCDIC control characters.
25
25
  - Properly tokenize segments with specified lengths like `BLB`
26
26
  - Export transition graphs with `pydot`.
@@ -298,9 +298,12 @@ finishes.
298
298
  <details>
299
299
  <summary>Transition graphs</summary>
300
300
 
301
- `pydot` is installed with Edison. To write PNG files, make sure Graphviz is
302
- available on your system, then call `build_dot_object()` on a `BaseParser`
303
- subclass.
301
+ Internally, Edison builds a directed graph of transitions between segments, when the parser class is created.
302
+ Each node is a specific segment, and each edge is a valid transition to the next segment.
303
+ With this, parsing is just a walk through the graph, and validation is checking if the path exists.
304
+
305
+ You can visualize the transition graph with `build_dot_object()`, which returns a `pydot.Dot` object.
306
+ `pydot` is installed with Edison. To write PNG files, make sure Graphviz is available on your system.
304
307
 
305
308
  ```python
306
309
  from edison import BaseParser
@@ -325,6 +328,12 @@ dot = Parser.build_dot_object()
325
328
  dot.write_png("transitions.png")
326
329
  ```
327
330
 
331
+ Here is the resulting graph for the above schema.
332
+
333
+ <p align="center">
334
+ <img src="https://raw.githubusercontent.com/AmadeusITGroup/Edison/main/docs/transitions.png" alt="pydot">
335
+ </p>
336
+
328
337
  You can pass the same version selector used by parsing, and hide upward links
329
338
  for a simpler tree-like graph:
330
339
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edison-parser
3
- Version: 0.3
3
+ Version: 0.4
4
4
  Summary: An EDIFACT parser with a real syntax tree.
5
5
  Author-email: Alex Prengère <alex.prengere@gmail.com>
6
6
  License-Expression: MIT
@@ -36,16 +36,16 @@ Dynamic: license-file
36
36
  </div>
37
37
 
38
38
  Edison is a Python library for parsing EDIFACT messages. Instead of treating a
39
- message as a flat stream of segments, it models valid messages as a tree of
40
- transitions. You define the schema once, then parse, validate, or pretty-print
39
+ message as a flat stream of segments, it models valid messages as a tree.
40
+ You define the schema once, then parse, validate, or pretty-print
41
41
  messages against that structure.
42
42
 
43
43
  ## Highlights
44
44
 
45
45
  - Define EDIFACT syntax trees directly in Python.
46
+ - Segments can define groups of child segments, which can be conditional, mandatory, or repeatable.
46
47
  - Attach parsing callbacks to the segments you care about.
47
48
  - Select schemas by message version.
48
- - Model conditional, mandatory, and repeatable segments.
49
49
  - Handle escaped EDIFACT separators and EBCDIC control characters.
50
50
  - Properly tokenize segments with specified lengths like `BLB`
51
51
  - Export transition graphs with `pydot`.
@@ -323,9 +323,12 @@ finishes.
323
323
  <details>
324
324
  <summary>Transition graphs</summary>
325
325
 
326
- `pydot` is installed with Edison. To write PNG files, make sure Graphviz is
327
- available on your system, then call `build_dot_object()` on a `BaseParser`
328
- subclass.
326
+ Internally, Edison builds a directed graph of transitions between segments, when the parser class is created.
327
+ Each node is a specific segment, and each edge is a valid transition to the next segment.
328
+ With this, parsing is just a walk through the graph, and validation is checking if the path exists.
329
+
330
+ You can visualize the transition graph with `build_dot_object()`, which returns a `pydot.Dot` object.
331
+ `pydot` is installed with Edison. To write PNG files, make sure Graphviz is available on your system.
329
332
 
330
333
  ```python
331
334
  from edison import BaseParser
@@ -350,6 +353,12 @@ dot = Parser.build_dot_object()
350
353
  dot.write_png("transitions.png")
351
354
  ```
352
355
 
356
+ Here is the resulting graph for the above schema.
357
+
358
+ <p align="center">
359
+ <img src="https://raw.githubusercontent.com/AmadeusITGroup/Edison/main/docs/transitions.png" alt="pydot">
360
+ </p>
361
+
353
362
  You can pass the same version selector used by parsing, and hide upward links
354
363
  for a simpler tree-like graph:
355
364
 
@@ -16,6 +16,7 @@
16
16
  "README.md",
17
17
  "docs/Image.png",
18
18
  "docs/edison.png",
19
+ "docs/transitions.png",
19
20
  "pyproject.toml",
20
21
  "src/edison/__init__.py",
21
22
  "src/edison/envelope.py",
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.3",
2
+ "tag": "0.4",
3
3
  "distance": 0,
4
- "node": "g903d48fb0f27f07def1b2ff3044dee024c863b68",
4
+ "node": "gd5d6d94b1b4dd48881eaa4ea42bee94e6e437a97",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-10-21"
File without changes
File without changes
File without changes
File without changes