pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

FIX: enums; utf8 BOM on win32 #129

Closed klauer closed 4 years ago

klauer commented 4 years ago

The UTF-8 BOM was causing pytmc running on Windows to bail immediately with the message:

lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

Enums were apparently also being ignored in some (all?) cases in recent builds. b79f4a9 attempts to fix that by ensuring DataType.walk() is always yielding something, allowing for the creation of chains.

Confusing implementation detail: enums should be seen to pytmc in a way similar to a built-in type (UINT + some metadata), and as BuiltInType yields [] for walk() this PR brings it in line with that.

~One test is now failing as a previously-ignored enum is now found to be duplicated...~ The pragma was already fixed upstream; updated to master in 53aa27f.

codecov-io commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@06a68f6). Click here to learn what that means. The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #129   +/-   ##
=========================================
  Coverage          ?   78.82%           
=========================================
  Files             ?       16           
  Lines             ?     1823           
  Branches          ?        0           
=========================================
  Hits              ?     1437           
  Misses            ?      386           
  Partials          ?        0
Impacted Files Coverage Δ
pytmc/parser.py 87.31% <80%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 06a68f6...57e03db. Read the comment docs.