objdictgen 3.3__tar.gz → 3.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.
Files changed (76) hide show
  1. {objdictgen-3.3 → objdictgen-3.4}/PKG-INFO +51 -59
  2. {objdictgen-3.3 → objdictgen-3.4}/README.md +26 -45
  3. objdictgen-3.4/pyproject.toml +606 -0
  4. objdictgen-3.4/setup.cfg +69 -0
  5. objdictgen-3.4/src/objdictgen/__init__.py +59 -0
  6. objdictgen-3.4/src/objdictgen/__main__.py +430 -0
  7. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/eds_utils.py +341 -313
  8. objdictgen-3.4/src/objdictgen/gen_cfile.py +835 -0
  9. objdictgen-3.4/src/objdictgen/img/networkedit.ico +0 -0
  10. objdictgen-3.4/src/objdictgen/img/networkedit.png +0 -0
  11. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/jsonod.py +532 -443
  12. objdictgen-3.4/src/objdictgen/maps.py +825 -0
  13. objdictgen-3.4/src/objdictgen/node.py +1195 -0
  14. objdictgen-3.4/src/objdictgen/nodelist.py +279 -0
  15. objdictgen-3.4/src/objdictgen/nodemanager.py +1109 -0
  16. objdictgen-3.4/src/objdictgen/nosis.py +600 -0
  17. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/schema/od.schema.json +8 -10
  18. objdictgen-3.4/src/objdictgen/typing.py +271 -0
  19. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/ui/commondialogs.py +544 -447
  20. objdictgen-3.4/src/objdictgen/ui/exception.py +136 -0
  21. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/ui/networkedit.py +176 -173
  22. objdictgen-3.4/src/objdictgen/ui/networkeditortemplate.py +163 -0
  23. objdictgen-3.4/src/objdictgen/ui/nodeeditortemplate.py +241 -0
  24. objdictgen-3.4/src/objdictgen/ui/objdictedit.py +635 -0
  25. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/ui/subindextable.py +291 -235
  26. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen.egg-info/PKG-INFO +51 -59
  27. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen.egg-info/SOURCES.txt +12 -7
  28. objdictgen-3.4/src/objdictgen.egg-info/entry_points.txt +2 -0
  29. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen.egg-info/requires.txt +11 -9
  30. objdictgen-3.4/tests/test_imports.py +45 -0
  31. objdictgen-3.4/tests/test_jsonod.py +105 -0
  32. objdictgen-3.4/tests/test_knownfailures.py +32 -0
  33. objdictgen-3.4/tests/test_main.py +113 -0
  34. objdictgen-3.4/tests/test_maps.py +130 -0
  35. objdictgen-3.4/tests/test_node.py +21 -0
  36. objdictgen-3.4/tests/test_nodelist.py +38 -0
  37. objdictgen-3.4/tests/test_nodemanager.py +116 -0
  38. objdictgen-3.4/tests/test_nosis.py +190 -0
  39. objdictgen-3.4/tests/test_odcompare.py +430 -0
  40. objdictgen-3.3/pyproject.toml +0 -10
  41. objdictgen-3.3/setup.cfg +0 -15
  42. objdictgen-3.3/setup.py +0 -210
  43. objdictgen-3.3/src/objdictgen/__init__.py +0 -49
  44. objdictgen-3.3/src/objdictgen/__main__.py +0 -441
  45. objdictgen-3.3/src/objdictgen/gen_cfile.py +0 -666
  46. objdictgen-3.3/src/objdictgen/maps.py +0 -289
  47. objdictgen-3.3/src/objdictgen/node.py +0 -1283
  48. objdictgen-3.3/src/objdictgen/nodelist.py +0 -276
  49. objdictgen-3.3/src/objdictgen/nodemanager.py +0 -1144
  50. objdictgen-3.3/src/objdictgen/nosis/pickle.py +0 -680
  51. objdictgen-3.3/src/objdictgen/nosis/xtoy.py +0 -144
  52. objdictgen-3.3/src/objdictgen/ui/exception.py +0 -131
  53. objdictgen-3.3/src/objdictgen/ui/networkeditortemplate.py +0 -147
  54. objdictgen-3.3/src/objdictgen/ui/nodeeditortemplate.py +0 -254
  55. objdictgen-3.3/src/objdictgen/ui/objdictedit.py +0 -606
  56. objdictgen-3.3/src/objdictgen.egg-info/entry_points.txt +0 -4
  57. objdictgen-3.3/tests/test_knownfailures.py +0 -33
  58. objdictgen-3.3/tests/test_nodelist.py +0 -24
  59. objdictgen-3.3/tests/test_nodemanager.py +0 -23
  60. objdictgen-3.3/tests/test_objdictgen.py +0 -27
  61. objdictgen-3.3/tests/test_odcompare.py +0 -370
  62. objdictgen-3.3/tests/test_odg.py +0 -29
  63. {objdictgen-3.3 → objdictgen-3.4}/LICENSE +0 -0
  64. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-302.prf +0 -0
  65. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-401.prf +0 -0
  66. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-402.prf +0 -0
  67. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-404.prf +0 -0
  68. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-406.prf +0 -0
  69. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-408.prf +0 -0
  70. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-410.prf +0 -0
  71. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-418.prf +0 -0
  72. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/config/DS-419.prf +0 -0
  73. /objdictgen-3.3/src/objdictgen/nosis/__init__.py → /objdictgen-3.4/src/objdictgen/py.typed +0 -0
  74. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen/ui/__init__.py +0 -0
  75. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen.egg-info/dependency_links.txt +0 -0
  76. {objdictgen-3.3 → objdictgen-3.4}/src/objdictgen.egg-info/top_level.txt +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: objdictgen
3
- Version: 3.3
4
- Summary: CanFestival object dictionary tools
5
- Home-page: https://github.com/laerdal-svg/python-objdictgen
3
+ Version: 3.4
4
+ Summary: CanFestival Object Dictionary tool
5
+ Home-page: https://github.com/Laerdal/python-objdictgen
6
6
  Author: Svein Seldal
7
7
  Author-email: sveinse@seldal.com
8
- Keywords: build,development,canfestival,canopen,objdictgen
8
+ Keywords: build,development,canopen,canfestival,object dictionary,od
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Topic :: Software Development :: Build Tools
@@ -13,21 +13,32 @@ Classifier: Topic :: Software Development :: Code Generators
13
13
  Classifier: Topic :: Software Development :: Embedded Systems
14
14
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
15
15
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
16
- Classifier: Programming Language :: Python :: 2
17
- Classifier: Programming Language :: Python :: 2.7
18
16
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.6
20
- Classifier: Programming Language :: Python :: 3.7
21
- Classifier: Programming Language :: Python :: 3.8
22
- Classifier: Programming Language :: Python :: 3.9
23
17
  Classifier: Programming Language :: Python :: 3.10
24
18
  Classifier: Programming Language :: Python :: 3.11
25
- Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Requires-Python: <4,>=3.10
26
22
  Description-Content-Type: text/markdown
27
- Provides-Extra: dist
28
- Provides-Extra: lint
29
- Provides-Extra: test
30
23
  License-File: LICENSE
24
+ Requires-Dist: jsonschema
25
+ Requires-Dist: colorama
26
+ Requires-Dist: deepdiff
27
+ Provides-Extra: ui
28
+ Requires-Dist: wxPython; extra == "ui"
29
+ Provides-Extra: dist
30
+ Requires-Dist: build; extra == "dist"
31
+ Provides-Extra: dev
32
+ Requires-Dist: pylint; extra == "dev"
33
+ Requires-Dist: isort; extra == "dev"
34
+ Requires-Dist: mypy; extra == "dev"
35
+ Requires-Dist: types-setuptools; extra == "dev"
36
+ Requires-Dist: types-colorama; extra == "dev"
37
+ Requires-Dist: types-wxpython; extra == "dev"
38
+ Requires-Dist: pytest; extra == "dev"
39
+ Requires-Dist: coverage; extra == "dev"
40
+ Requires-Dist: pytest-cov; extra == "dev"
41
+ Requires-Dist: pytest-mock; extra == "dev"
31
42
 
32
43
  # Objdictgen (`odg`)
33
44
 
@@ -38,13 +49,13 @@ communication protocol.
38
49
 
39
50
  This repo is located:
40
51
 
41
- > https://github.com/laerdal-svg/python-objdictgen
52
+ > https://github.com/Laerdal/python-objdictgen
42
53
 
43
54
  objdictgen includes tools to generate c code that works in tandem with a
44
55
  canfestival library. This tool has been built to work together with the
45
56
  Laerdal Medical fork for the canfestival library:
46
57
 
47
- > https://github.com/laerdal-svg/canfestival-laerdal
58
+ > https://github.com/Laerdal/canfestival-laerdal
48
59
 
49
60
  objdictgen is a tool to parse, view and manipulate files containing object
50
61
  dictionary (OD). An object dictionary is entries with data and configuration
@@ -53,24 +64,6 @@ reading and writing OD files in `.json` format, in legacy XML `.od` and `.eds`
53
64
  files. It can generate c code for use with the canfestival library.
54
65
 
55
66
 
56
- ## Motivation
57
-
58
- The biggest improvement with the new tool over the original implementation is
59
- the introduction of a new `.json` based format to store the object dictionary.
60
- The JSON format is well-known and easy to read. The tool supports jsonc,
61
- allowing comments in the json file. `odg` will process the file in a repeatable
62
- manner, making it possible support diffing of the `.json` file output. `odg`
63
- remains 100% compatible with the legacy `.od` format on both input and output.
64
-
65
- The original objdictedit and objdictgen tool were written in legacy python2 and
66
- and this is a port to python3. The package still remains compatible with
67
- python2, as python2 is required for running the UI tools.
68
-
69
- This tool is a fork from upstream canfestival-3-asc repo:
70
-
71
- > https://github.com/laerdal-svg/canfestival-3-asc
72
-
73
-
74
67
  ## Install
75
68
 
76
69
  To install into a virtual environment `venv`. Check out this repo and go to
@@ -78,28 +71,13 @@ the top in a command-prompt (here assuming Windows and git bash):
78
71
 
79
72
  $ py -3 -mvenv venv
80
73
  $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
81
- $ venv/Scripts/pip install .
74
+ $ venv/Scripts/pip install .[ui] # [ui] will install GUI tools
82
75
 
83
- After this `venv/Scripts/odg.exe` will exist and can be called
76
+ After this `venv/Scripts/odg.exe` (on Windows) will exist and can be called
84
77
  from anywhere to run it.
85
78
 
86
-
87
- ### Python 2
88
-
89
- To run the `objdictedit` GUI, wxPython is required and it is only available
90
- for Python 2.7. Download and install both.
91
-
92
- * https://www.python.org/downloads/release/python-2716/
93
- * https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
94
-
95
- To setup the virtual environment run (assuming git bash):
96
-
97
- $ py.exe -2 -mvirtualenv --system-site-packages venv
98
- $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
99
- $ venv/Scripts/pip install .
100
-
101
- NOTE: The `py.exe` tool is only shipped with recent Python 3.
102
-
79
+ The `[ui]` suffix to `pip install` will install the wx dependency needed
80
+ for the UI `odg edit`. If no UI is needed, this suffix can be omitted.
103
81
 
104
82
  ## `odg` command-line tool
105
83
 
@@ -122,10 +100,8 @@ The most useful commands are:
122
100
 
123
101
  ### Legacy commands
124
102
 
125
- The legacy commands `objdictgen` and `objdictedit` are still available. The
126
- same commands are available under `odg gen` and `odg edit` respectively. Note
127
- that Python 2 is required to run `objdictedit` due to the dependency on the
128
- old wxpython library.
103
+ The legacy commands `objdictgen` and `objdictedit` are no longer available. The
104
+ commands are available under `odg gen` and `odg edit` respectively.
129
105
 
130
106
 
131
107
  ## JSON schema
@@ -152,7 +128,6 @@ descriptions, help with values and validate the file.
152
128
  }
153
129
  ```
154
130
 
155
-
156
131
  ## Conversion
157
132
 
158
133
  The recommended way to convert existing/legacy `.od` files to the new JSON
@@ -166,6 +141,23 @@ parameters. The `--drop-unused` will remove any unused *profile* and *DS-302*
166
141
  parameter that might be used in the file.
167
142
 
168
143
 
144
+ ## Motivation
145
+
146
+ The biggest improvement with the new tool over the original implementation is
147
+ the introduction of a new `.json` based format to store the object dictionary.
148
+ The JSON format is well-known and easy to read. The tool supports jsonc,
149
+ allowing comments in the json file. `odg` will process the file in a repeatable
150
+ manner, making it possible support diffing of the `.json` file output. `odg`
151
+ remains 100% compatible with the legacy `.od` format on both input and output.
152
+
153
+ The original objdictedit and objdictgen tool were written in legacy python 2 and
154
+ and this is a port to python 3.
155
+
156
+ This tool is a fork from upstream canfestival-3-asc repo:
157
+
158
+ > https://github.com/Laerdal/canfestival-3-asc
159
+
160
+
169
161
  ## License
170
162
 
171
163
  Objdictgen has been based on the python tool included in CanFestival. This
@@ -175,4 +167,4 @@ original work from CanFestival is:
175
167
 
176
168
  The Python 3 port and tool improvements have been implemented under
177
169
 
178
- Copyright (C) 2022 Svein Seldal, Laerdal Medical AS
170
+ Copyright (C) 2022-2024 Svein Seldal, Laerdal Medical AS
@@ -7,13 +7,13 @@ communication protocol.
7
7
 
8
8
  This repo is located:
9
9
 
10
- > https://github.com/laerdal-svg/python-objdictgen
10
+ > https://github.com/Laerdal/python-objdictgen
11
11
 
12
12
  objdictgen includes tools to generate c code that works in tandem with a
13
13
  canfestival library. This tool has been built to work together with the
14
14
  Laerdal Medical fork for the canfestival library:
15
15
 
16
- > https://github.com/laerdal-svg/canfestival-laerdal
16
+ > https://github.com/Laerdal/canfestival-laerdal
17
17
 
18
18
  objdictgen is a tool to parse, view and manipulate files containing object
19
19
  dictionary (OD). An object dictionary is entries with data and configuration
@@ -22,24 +22,6 @@ reading and writing OD files in `.json` format, in legacy XML `.od` and `.eds`
22
22
  files. It can generate c code for use with the canfestival library.
23
23
 
24
24
 
25
- ## Motivation
26
-
27
- The biggest improvement with the new tool over the original implementation is
28
- the introduction of a new `.json` based format to store the object dictionary.
29
- The JSON format is well-known and easy to read. The tool supports jsonc,
30
- allowing comments in the json file. `odg` will process the file in a repeatable
31
- manner, making it possible support diffing of the `.json` file output. `odg`
32
- remains 100% compatible with the legacy `.od` format on both input and output.
33
-
34
- The original objdictedit and objdictgen tool were written in legacy python2 and
35
- and this is a port to python3. The package still remains compatible with
36
- python2, as python2 is required for running the UI tools.
37
-
38
- This tool is a fork from upstream canfestival-3-asc repo:
39
-
40
- > https://github.com/laerdal-svg/canfestival-3-asc
41
-
42
-
43
25
  ## Install
44
26
 
45
27
  To install into a virtual environment `venv`. Check out this repo and go to
@@ -47,28 +29,13 @@ the top in a command-prompt (here assuming Windows and git bash):
47
29
 
48
30
  $ py -3 -mvenv venv
49
31
  $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
50
- $ venv/Scripts/pip install .
32
+ $ venv/Scripts/pip install .[ui] # [ui] will install GUI tools
51
33
 
52
- After this `venv/Scripts/odg.exe` will exist and can be called
34
+ After this `venv/Scripts/odg.exe` (on Windows) will exist and can be called
53
35
  from anywhere to run it.
54
36
 
55
-
56
- ### Python 2
57
-
58
- To run the `objdictedit` GUI, wxPython is required and it is only available
59
- for Python 2.7. Download and install both.
60
-
61
- * https://www.python.org/downloads/release/python-2716/
62
- * https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
63
-
64
- To setup the virtual environment run (assuming git bash):
65
-
66
- $ py.exe -2 -mvirtualenv --system-site-packages venv
67
- $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
68
- $ venv/Scripts/pip install .
69
-
70
- NOTE: The `py.exe` tool is only shipped with recent Python 3.
71
-
37
+ The `[ui]` suffix to `pip install` will install the wx dependency needed
38
+ for the UI `odg edit`. If no UI is needed, this suffix can be omitted.
72
39
 
73
40
  ## `odg` command-line tool
74
41
 
@@ -91,10 +58,8 @@ The most useful commands are:
91
58
 
92
59
  ### Legacy commands
93
60
 
94
- The legacy commands `objdictgen` and `objdictedit` are still available. The
95
- same commands are available under `odg gen` and `odg edit` respectively. Note
96
- that Python 2 is required to run `objdictedit` due to the dependency on the
97
- old wxpython library.
61
+ The legacy commands `objdictgen` and `objdictedit` are no longer available. The
62
+ commands are available under `odg gen` and `odg edit` respectively.
98
63
 
99
64
 
100
65
  ## JSON schema
@@ -121,7 +86,6 @@ descriptions, help with values and validate the file.
121
86
  }
122
87
  ```
123
88
 
124
-
125
89
  ## Conversion
126
90
 
127
91
  The recommended way to convert existing/legacy `.od` files to the new JSON
@@ -135,6 +99,23 @@ parameters. The `--drop-unused` will remove any unused *profile* and *DS-302*
135
99
  parameter that might be used in the file.
136
100
 
137
101
 
102
+ ## Motivation
103
+
104
+ The biggest improvement with the new tool over the original implementation is
105
+ the introduction of a new `.json` based format to store the object dictionary.
106
+ The JSON format is well-known and easy to read. The tool supports jsonc,
107
+ allowing comments in the json file. `odg` will process the file in a repeatable
108
+ manner, making it possible support diffing of the `.json` file output. `odg`
109
+ remains 100% compatible with the legacy `.od` format on both input and output.
110
+
111
+ The original objdictedit and objdictgen tool were written in legacy python 2 and
112
+ and this is a port to python 3.
113
+
114
+ This tool is a fork from upstream canfestival-3-asc repo:
115
+
116
+ > https://github.com/Laerdal/canfestival-3-asc
117
+
118
+
138
119
  ## License
139
120
 
140
121
  Objdictgen has been based on the python tool included in CanFestival. This
@@ -144,4 +125,4 @@ original work from CanFestival is:
144
125
 
145
126
  The Python 3 port and tool improvements have been implemented under
146
127
 
147
- Copyright (C) 2022 Svein Seldal, Laerdal Medical AS
128
+ Copyright (C) 2022-2024 Svein Seldal, Laerdal Medical AS