struct2ui 0.4.2__tar.gz → 0.4.3__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.
- {struct2ui-0.4.2/src/struct2ui.egg-info → struct2ui-0.4.3}/PKG-INFO +1 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/pyproject.toml +42 -42
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/__init__.py +4 -4
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/editor.py +8 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3/src/struct2ui.egg-info}/PKG-INFO +1 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_c_parser.py +1 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_editor.py +3 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_json_format.py +1 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_save.py +1 -1
- {struct2ui-0.4.2 → struct2ui-0.4.3}/LICENSE +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/README.md +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/setup.cfg +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/__init__.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/bin_emitter.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/c_emitter.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/c_parser.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/elf_verifier.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/exporters/json_format.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/c2j.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/elf.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/export_notes_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/flowchart_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/refresh_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/report_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/save_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/save_as_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/settings_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/icons/widgets_24dp_000000_FILL0_wght400_GRAD0_opsz24.png +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/schema.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/ui/__init__.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/ui/renderers.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/ui/tables.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui/ui/widgets.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui.egg-info/SOURCES.txt +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui.egg-info/dependency_links.txt +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui.egg-info/requires.txt +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/src/struct2ui.egg-info/top_level.txt +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_bin_emitter.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_c_emitter.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_choices.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_elf_verifier.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_float_precision.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_int_checkbox.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_load_report.py +0 -0
- {struct2ui-0.4.2 → struct2ui-0.4.3}/tests/test_value_readback.py +0 -0
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=68", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "struct2ui"
|
|
7
|
-
version = "0.4.
|
|
8
|
-
description = "Render C struct / JSON schema as editable PySide6 UI, export to C/JSON/bin"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = {file = "LICENSE"}
|
|
12
|
-
authors = [
|
|
13
|
-
{name = "Jay"},
|
|
14
|
-
]
|
|
15
|
-
keywords = ["qt", "pyside6", "gui", "c-struct", "json-schema", "code-generation", "parameter-tuning"]
|
|
16
|
-
classifiers = [
|
|
17
|
-
"Development Status :: 3 - Alpha",
|
|
18
|
-
"Intended Audience :: Developers",
|
|
19
|
-
"License :: OSI Approved :: MIT License",
|
|
20
|
-
"Programming Language :: Python :: 3",
|
|
21
|
-
"Programming Language :: Python :: 3.9",
|
|
22
|
-
"Programming Language :: Python :: 3.10",
|
|
23
|
-
"Programming Language :: Python :: 3.11",
|
|
24
|
-
"Programming Language :: Python :: 3.12",
|
|
25
|
-
"Topic :: Software Development :: Code Generators",
|
|
26
|
-
"Topic :: Software Development :: User Interfaces",
|
|
27
|
-
]
|
|
28
|
-
dependencies = [
|
|
29
|
-
"Qt.py>=1.3",
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
[project.optional-dependencies]
|
|
33
|
-
pyside6 = ["PySide6>=6.4"]
|
|
34
|
-
pyqt6 = ["PyQt6>=6.4"]
|
|
35
|
-
elf = ["pyelftools>=0.29"]
|
|
36
|
-
dev = ["pytest>=8", "pyelftools>=0.29"]
|
|
37
|
-
|
|
38
|
-
[tool.setuptools.packages.find]
|
|
39
|
-
where = ["src"]
|
|
40
|
-
|
|
41
|
-
[tool.setuptools.package-data]
|
|
42
|
-
struct2ui = ["icons/*.png"]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "struct2ui"
|
|
7
|
+
version = "0.4.3"
|
|
8
|
+
description = "Render C struct / JSON schema as editable PySide6 UI, export to C/JSON/bin"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {file = "LICENSE"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Jay"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["qt", "pyside6", "gui", "c-struct", "json-schema", "code-generation", "parameter-tuning"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.9",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Topic :: Software Development :: Code Generators",
|
|
26
|
+
"Topic :: Software Development :: User Interfaces",
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"Qt.py>=1.3",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
pyside6 = ["PySide6>=6.4"]
|
|
34
|
+
pyqt6 = ["PyQt6>=6.4"]
|
|
35
|
+
elf = ["pyelftools>=0.29"]
|
|
36
|
+
dev = ["pytest>=8", "pyelftools>=0.29"]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
where = ["src"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
struct2ui = ["icons/*.png"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .editor import StructEditor
|
|
2
|
-
|
|
3
|
-
__version__ = "0.4.
|
|
4
|
-
__all__ = ["StructEditor"]
|
|
1
|
+
from .editor import StructEditor
|
|
2
|
+
|
|
3
|
+
__version__ = "0.4.3"
|
|
4
|
+
__all__ = ["StructEditor"]
|
|
@@ -1717,6 +1717,14 @@ class StructEditor(QtWidgets.QWidget):
|
|
|
1717
1717
|
layout.setContentsMargins(8, 8, 8, 8)
|
|
1718
1718
|
layout.setSpacing(8)
|
|
1719
1719
|
|
|
1720
|
+
# No sources selected yet: nothing has been loaded, so there is no
|
|
1721
|
+
# report to show. Avoid touching self.registry (still None).
|
|
1722
|
+
if self.registry is None:
|
|
1723
|
+
hint = QtWidgets.QLabel('No sources loaded')
|
|
1724
|
+
layout.addWidget(hint)
|
|
1725
|
+
layout.addStretch(1)
|
|
1726
|
+
return panel
|
|
1727
|
+
|
|
1720
1728
|
report = self.registry.report
|
|
1721
1729
|
if report.has_errors or report.has_warnings:
|
|
1722
1730
|
layout.addWidget(self._make_summary_panel())
|
|
@@ -129,7 +129,7 @@ def test_roundtrip_real_c_files():
|
|
|
129
129
|
"""Parsing the project's own cfg_t/*.c and loading the result must not
|
|
130
130
|
produce schema errors for the structs they define."""
|
|
131
131
|
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
132
|
-
c_path = os.path.join(base, 'examples', '
|
|
132
|
+
c_path = os.path.join(base, 'examples', 'abc_test', 'cfg_t', 'a_cfg_t.c')
|
|
133
133
|
with open(c_path, encoding='utf-8') as f:
|
|
134
134
|
out = build_schema_dict(parse_c_source(f.read()))
|
|
135
135
|
assert 'a_cfg_t' in out
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Tests for path handling (paths come from set_sources(), not memory)."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import os
|
|
4
5
|
|
|
5
6
|
from Qt import QtWidgets
|
|
6
7
|
|
|
@@ -142,7 +143,8 @@ def test_overflow_menu_carries_group_separators(qapp, make_editor,
|
|
|
142
143
|
def test_new_editor_ignores_previous_paths(qapp, make_editor, real_cfg_dir,
|
|
143
144
|
real_flow):
|
|
144
145
|
first = make_editor(real_flow, real_cfg_dir)
|
|
145
|
-
|
|
146
|
+
examples = os.path.dirname(os.path.dirname(real_flow))
|
|
147
|
+
first.pipeline_path = os.path.join(examples, 'speech', 'speech.json')
|
|
146
148
|
first.struct_dir = real_cfg_dir
|
|
147
149
|
first._reload(async_load=False)
|
|
148
150
|
|
|
@@ -33,7 +33,7 @@ def test_empty_containers():
|
|
|
33
33
|
def test_roundtrip_real_flow():
|
|
34
34
|
import os
|
|
35
35
|
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
36
|
-
data = json.load(open(os.path.join(base, 'examples', 'abc.json'), encoding='utf-8'))
|
|
36
|
+
data = json.load(open(os.path.join(base, 'examples', 'abc_test', 'abc.json'), encoding='utf-8'))
|
|
37
37
|
assert json.loads(dumps_json(data)) == data
|
|
38
38
|
|
|
39
39
|
|
|
@@ -19,7 +19,7 @@ def flow_copy(tmp_path):
|
|
|
19
19
|
"""Copy the real abc.json into a temp file so saves never touch the repo."""
|
|
20
20
|
import os
|
|
21
21
|
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
22
|
-
src = os.path.join(base, 'examples', 'abc.json')
|
|
22
|
+
src = os.path.join(base, 'examples', 'abc_test', 'abc.json')
|
|
23
23
|
dst = tmp_path / 'flow.json'
|
|
24
24
|
shutil.copy(src, dst)
|
|
25
25
|
return str(dst)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|