this tree UI allows for viewing and basic editing of a configuration section from a board. it does a decent job of displaying most of the settings, and editing is equally convenient, as in it tries to handle enums correctly, but doesn't validate pins or handle long binary strings well. saving is done in place --- if a config/storage section was opened, a config section (no padding) is what results. if a whole board was opened, the whole binary is rewritten with the new offset config section. this way, a whole board dump can be changed in place, or a new config can be made for use in e.g. concatenate to build an image many enhancements to come over time
57 lines
1.8 KiB
TOML
57 lines
1.8 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
|
|
|
|
[project]
|
|
name = "gp2040ce-binary-tools"
|
|
description = "Tools for working with GP2040-CE binary dumps."
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
authors = [
|
|
{name = "Brian S. Stephan", email = "bss@incorporeal.org"},
|
|
]
|
|
requires-python = ">=3.9"
|
|
dependencies = ["grpcio-tools", "textual"]
|
|
dynamic = ["version"]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["bandit", "decorator", "flake8", "flake8-blind-except", "flake8-builtins", "flake8-docstrings",
|
|
"flake8-executable", "flake8-fixme", "flake8-isort", "flake8-logging-format", "flake8-mutable",
|
|
"flake8-pyproject", "mypy", "pip-tools", "pytest", "pytest-asyncio", "pytest-cov", "setuptools-scm",
|
|
"tox"]
|
|
|
|
[project.scripts]
|
|
concatenate = "gp2040ce_bintools.builder:concatenate"
|
|
edit-config = "gp2040ce_bintools.gui:edit_config"
|
|
visualize-storage = "gp2040ce_bintools.storage:visualize"
|
|
|
|
[tool.flake8]
|
|
enable-extensions = "G,M"
|
|
exclude = [".tox/", "venv/", "_version.py", "tests/test-files/"]
|
|
extend-ignore = "T101"
|
|
max-complexity = 10
|
|
max-line-length = 120
|
|
|
|
[tool.isort]
|
|
line_length = 120
|
|
|
|
[tool.mypy]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "google.protobuf.*"
|
|
ignore_missing_imports = true
|
|
|
|
# there's a lot of class inheritance and so on going on in textual that I haven't figured out
|
|
# e.g. assigning Select or Input to the same variable is valid but not type-safe, bindings
|
|
# can just exit but mypy thinks they should return coroutines... better just to disable it for
|
|
# now until I can figure things out and learn more about doing proper type checking
|
|
[[tool.mypy.overrides]]
|
|
module = "gp2040ce_bintools.gui"
|
|
ignore_errors = true
|
|
|
|
[tool.pytest]
|
|
python_files = ["*_tests.py", "tests.py", "test_*.py"]
|
|
|
|
[tool.setuptools_scm]
|
|
write_to = "gp2040ce_bintools/_version.py"
|