Skip to content

Fix integer granularity in EDS device information - #688

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
canopen-python:masterfrom
timothyanderson096-ocdealcheck:fix/eds-integer-granularity
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
canopen-python:masterfrom
timothyanderson096-ocdealcheck:fix/eds-integer-granularity

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

The existing sample EDS declares Granularity=8, but importing converts it to True and exporting writes Granularity=1. Parse this DeviceInfo property through the existing integer path, matching its Optional[int] declaration.

Changes one conversion-table entry and adds three regression methods for decimal/hexadecimal values, exact integer types, missing granularity, both EDS/DCF exports, and unchanged Boolean flags.

Validation on Linux / CPython 3.12.14 with project-compatible pytest 8.4.2 and pytest-cov 5.0.0:

  • Identical regressions on original production: 2 failed, 1 passed; fixed: 3 passed.
  • Full core coverage run: 283 passed, 1 existing optional-dependency skip. With db_export / canmatrix 1.3.3: 284 passed, zero skips.
  • Configured HTML documentation build, critical flake8 and whitespace checks pass. Supplemental mypy retains 44 identical baseline diagnostics across 7 files; no suppressions added.
  • Independent review exercised 14 real EDS/DCF import/export/reimport paths and confirmed all five Boolean flags retain their types and values. No material finding.

Exact tested head: 406b99737448e45a9884b7fc09d9e8889abdf064, based on current upstream 14b3336bc973023e82325426adf6d71046ebcf55. No hardware or hosted CI result is claimed.

Prepared with OpenAI Codex assistance and independent inspection.

Timothy Anderson — Spotted Ridge Engineering / OC Labs
Independent software verification · GDN (Global Decision Network)
timothyanderson096@gmail.com · Engineering evidence

Import Granularity using the existing integer conversion path instead of reducing nonzero values to a Boolean. This preserves Granularity=8 through both EDS and DCF export.

Add integer/missing-field import cases, both export formats, and Boolean-flag controls. Prepared with OpenAI Codex assistance and independent inspection.

Timothy Anderson — Spotted Ridge Engineering / OC Labs
Independent software verification · GDN (Global Decision Network)
timothyanderson096@gmail.com · https://github.com/timothyanderson096-ocdealcheck/gdn-engineering-benchmarks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant