objdictgen 3.3.post1__tar.gz → 3.5__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 (77) hide show
  1. {objdictgen-3.3.post1 → objdictgen-3.5}/PKG-INFO +53 -60
  2. {objdictgen-3.3.post1 → objdictgen-3.5}/README.md +27 -46
  3. objdictgen-3.5/pyproject.toml +606 -0
  4. objdictgen-3.5/setup.cfg +70 -0
  5. objdictgen-3.5/src/objdictgen/__init__.py +59 -0
  6. objdictgen-3.5/src/objdictgen/__main__.py +430 -0
  7. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/eds_utils.py +341 -313
  8. objdictgen-3.5/src/objdictgen/gen_cfile.py +835 -0
  9. objdictgen-3.5/src/objdictgen/img/networkedit.ico +0 -0
  10. objdictgen-3.5/src/objdictgen/img/networkedit.png +0 -0
  11. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/jsonod.py +566 -470
  12. objdictgen-3.5/src/objdictgen/maps.py +825 -0
  13. objdictgen-3.5/src/objdictgen/node.py +1195 -0
  14. objdictgen-3.5/src/objdictgen/nodelist.py +279 -0
  15. objdictgen-3.5/src/objdictgen/nodemanager.py +1113 -0
  16. objdictgen-3.5/src/objdictgen/nosis.py +600 -0
  17. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/schema/od.schema.json +8 -10
  18. objdictgen-3.5/src/objdictgen/typing.py +271 -0
  19. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/ui/commondialogs.py +544 -447
  20. objdictgen-3.5/src/objdictgen/ui/exception.py +136 -0
  21. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/ui/networkedit.py +176 -173
  22. objdictgen-3.5/src/objdictgen/ui/networkeditortemplate.py +163 -0
  23. objdictgen-3.5/src/objdictgen/ui/nodeeditortemplate.py +241 -0
  24. objdictgen-3.5/src/objdictgen/ui/objdictedit.py +637 -0
  25. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/ui/subindextable.py +291 -235
  26. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen.egg-info/PKG-INFO +53 -60
  27. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen.egg-info/SOURCES.txt +12 -7
  28. objdictgen-3.5/src/objdictgen.egg-info/entry_points.txt +2 -0
  29. objdictgen-3.5/src/objdictgen.egg-info/requires.txt +22 -0
  30. objdictgen-3.5/tests/test_imports.py +45 -0
  31. objdictgen-3.5/tests/test_jsonod.py +132 -0
  32. objdictgen-3.5/tests/test_knownfailures.py +32 -0
  33. objdictgen-3.5/tests/test_main.py +113 -0
  34. objdictgen-3.5/tests/test_maps.py +130 -0
  35. objdictgen-3.5/tests/test_node.py +21 -0
  36. objdictgen-3.5/tests/test_nodelist.py +38 -0
  37. objdictgen-3.5/tests/test_nodemanager.py +116 -0
  38. objdictgen-3.5/tests/test_nosis.py +190 -0
  39. objdictgen-3.5/tests/test_odcompare.py +430 -0
  40. objdictgen-3.3.post1/pyproject.toml +0 -10
  41. objdictgen-3.3.post1/setup.cfg +0 -15
  42. objdictgen-3.3.post1/setup.py +0 -210
  43. objdictgen-3.3.post1/src/objdictgen/__init__.py +0 -49
  44. objdictgen-3.3.post1/src/objdictgen/__main__.py +0 -441
  45. objdictgen-3.3.post1/src/objdictgen/gen_cfile.py +0 -666
  46. objdictgen-3.3.post1/src/objdictgen/maps.py +0 -289
  47. objdictgen-3.3.post1/src/objdictgen/node.py +0 -1283
  48. objdictgen-3.3.post1/src/objdictgen/nodelist.py +0 -276
  49. objdictgen-3.3.post1/src/objdictgen/nodemanager.py +0 -1144
  50. objdictgen-3.3.post1/src/objdictgen/nosis/pickle.py +0 -680
  51. objdictgen-3.3.post1/src/objdictgen/nosis/xtoy.py +0 -144
  52. objdictgen-3.3.post1/src/objdictgen/ui/exception.py +0 -131
  53. objdictgen-3.3.post1/src/objdictgen/ui/networkeditortemplate.py +0 -147
  54. objdictgen-3.3.post1/src/objdictgen/ui/nodeeditortemplate.py +0 -254
  55. objdictgen-3.3.post1/src/objdictgen/ui/objdictedit.py +0 -606
  56. objdictgen-3.3.post1/src/objdictgen.egg-info/entry_points.txt +0 -4
  57. objdictgen-3.3.post1/src/objdictgen.egg-info/requires.txt +0 -19
  58. objdictgen-3.3.post1/tests/test_knownfailures.py +0 -33
  59. objdictgen-3.3.post1/tests/test_nodelist.py +0 -24
  60. objdictgen-3.3.post1/tests/test_nodemanager.py +0 -23
  61. objdictgen-3.3.post1/tests/test_objdictgen.py +0 -27
  62. objdictgen-3.3.post1/tests/test_odcompare.py +0 -370
  63. objdictgen-3.3.post1/tests/test_odg.py +0 -29
  64. {objdictgen-3.3.post1 → objdictgen-3.5}/LICENSE +0 -0
  65. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-302.prf +0 -0
  66. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-401.prf +0 -0
  67. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-402.prf +0 -0
  68. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-404.prf +0 -0
  69. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-406.prf +0 -0
  70. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-408.prf +0 -0
  71. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-410.prf +0 -0
  72. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-418.prf +0 -0
  73. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/config/DS-419.prf +0 -0
  74. /objdictgen-3.3.post1/src/objdictgen/nosis/__init__.py → /objdictgen-3.5/src/objdictgen/py.typed +0 -0
  75. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen/ui/__init__.py +0 -0
  76. {objdictgen-3.3.post1 → objdictgen-3.5}/src/objdictgen.egg-info/dependency_links.txt +0 -0
  77. {objdictgen-3.3.post1 → objdictgen-3.5}/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.post1
4
- Summary: CanFestival object dictionary tools
5
- Home-page: https://github.com/laerdal-svg/python-objdictgen
3
+ Version: 3.5
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,33 @@ 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<8.0.0
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"
42
+ Requires-Dist: freezegun; extra == "dev"
31
43
 
32
44
  # Objdictgen (`odg`)
33
45
 
@@ -38,13 +50,13 @@ communication protocol.
38
50
 
39
51
  This repo is located:
40
52
 
41
- > https://github.com/laerdal/python-objdictgen
53
+ > https://github.com/Laerdal/python-objdictgen
42
54
 
43
55
  objdictgen includes tools to generate c code that works in tandem with a
44
56
  canfestival library. This tool has been built to work together with the
45
57
  Laerdal Medical fork for the canfestival library:
46
58
 
47
- > https://github.com/laerdal/canfestival-laerdal
59
+ > https://github.com/Laerdal/canfestival-laerdal
48
60
 
49
61
  objdictgen is a tool to parse, view and manipulate files containing object
50
62
  dictionary (OD). An object dictionary is entries with data and configuration
@@ -53,53 +65,20 @@ reading and writing OD files in `.json` format, in legacy XML `.od` and `.eds`
53
65
  files. It can generate c code for use with the canfestival library.
54
66
 
55
67
 
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/canfestival-3-asc
72
-
73
-
74
68
  ## Install
75
69
 
76
70
  To install into a virtual environment `venv`. Check out this repo and go to
77
71
  the top in a command-prompt (here assuming Windows and git bash):
78
72
 
79
73
  $ py -3 -mvenv venv
80
- $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
81
- $ venv/Scripts/pip install .
74
+ $ venv/Scripts/python -mpip install --upgrade pip setuptools # Optional
75
+ $ venv/Scripts/pip install objdictgen[ui] # [ui] will install GUI tools
82
76
 
83
- After this `venv/Scripts/odg.exe` will exist and can be called
77
+ After this `venv/Scripts/odg.exe` (on Windows) will exist and can be called
84
78
  from anywhere to run it.
85
79
 
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-27
98
- $ venv-27/Scripts/python -mpip install --upgrade pip wheel setuptools
99
- $ venv-27/Scripts/pip install .
100
-
101
- NOTE: The `py.exe` tool is only shipped with recent Python 3.
102
-
80
+ The `[ui]` suffix to `pip install` will install the wx dependency needed
81
+ for the UI `odg edit`. If no UI is needed, this suffix can be omitted.
103
82
 
104
83
  ## `odg` command-line tool
105
84
 
@@ -122,10 +101,8 @@ The most useful commands are:
122
101
 
123
102
  ### Legacy commands
124
103
 
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.
104
+ The legacy commands `objdictgen` and `objdictedit` are no longer available. The
105
+ commands are available under `odg gen` and `odg edit` respectively.
129
106
 
130
107
 
131
108
  ## JSON schema
@@ -152,7 +129,6 @@ descriptions, help with values and validate the file.
152
129
  }
153
130
  ```
154
131
 
155
-
156
132
  ## Conversion
157
133
 
158
134
  The recommended way to convert existing/legacy `.od` files to the new JSON
@@ -166,6 +142,23 @@ parameters. The `--drop-unused` will remove any unused *profile* and *DS-302*
166
142
  parameter that might be used in the file.
167
143
 
168
144
 
145
+ ## Motivation
146
+
147
+ The biggest improvement with the new tool over the original implementation is
148
+ the introduction of a new `.json` based format to store the object dictionary.
149
+ The JSON format is well-known and easy to read. The tool supports jsonc,
150
+ allowing comments in the json file. `odg` will process the file in a repeatable
151
+ manner, making it possible support diffing of the `.json` file output. `odg`
152
+ remains 100% compatible with the legacy `.od` format on both input and output.
153
+
154
+ The original objdictedit and objdictgen tool were written in legacy python 2 and
155
+ and this is a port to python 3.
156
+
157
+ This tool is a fork from upstream canfestival-3-asc repo:
158
+
159
+ > https://github.com/Laerdal/canfestival-3-asc
160
+
161
+
169
162
  ## License
170
163
 
171
164
  Objdictgen has been based on the python tool included in CanFestival. This
@@ -175,4 +168,4 @@ original work from CanFestival is:
175
168
 
176
169
  The Python 3 port and tool improvements have been implemented under
177
170
 
178
- Copyright (C) 2022-2023 Svein Seldal, Laerdal Medical AS
171
+ 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/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/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,53 +22,20 @@ 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/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
46
28
  the top in a command-prompt (here assuming Windows and git bash):
47
29
 
48
30
  $ py -3 -mvenv venv
49
- $ venv/Scripts/python -mpip install --upgrade pip wheel setuptools
50
- $ venv/Scripts/pip install .
31
+ $ venv/Scripts/python -mpip install --upgrade pip setuptools # Optional
32
+ $ venv/Scripts/pip install objdictgen[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-27
67
- $ venv-27/Scripts/python -mpip install --upgrade pip wheel setuptools
68
- $ venv-27/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-2023 Svein Seldal, Laerdal Medical AS
128
+ Copyright (C) 2022-2024 Svein Seldal, Laerdal Medical AS