Skip to content

Keep FileInfo local to each EDS and DCF export - #690

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
canopen-python:masterfrom
timothyanderson096-ocdealcheck:fix/eds-fileinfo-per-export
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
canopen-python:masterfrom
timothyanderson096-ocdealcheck:fix/eds-fileinfo-per-export

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

Exporting test/sample.eds and then test/datatypes.eds in the same process writes FileName=test.dcf and CreatedBy=Christian Sandberg to both outputs. The second input actually declares FileName=datatypes.eds and CreatedBy=objdictgen. The same issue affects DCF output; the exporters accumulate metadata on their default dictionaries.

Build each export’s metadata from its own override dictionary. Explicit caller overrides still take precedence and the caller can reuse them without accumulating fields from a previous object dictionary. This preserves the per-file metadata expected by #304.

All 283 project tests passed under CPython 3.12. Independent file-based checks verified 32 sequential metadata combinations, four caller-override controls and two exports of empty dictionaries. The optional mypy check reported the same 45 diagnostics as the unmodified base.

Prepared and tested with OpenAI Codex.

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

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