Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: ignore global text list project files #81

Merged
merged 5 commits into from
Aug 16, 2023
Merged

Conversation

klauer
Copy link
Owner

@klauer klauer commented Aug 16, 2023

Fix GlobalTextList loading bug

Projects with GlobalTextList entries in TwinCAT projects would previously raise:
RuntimeError: Unsupported xml type for TcSource: <Element TcPlcObject at 0x7f70fc315340>
For one, that exception message has been improved to include a bit more context:
UnsupportedSourceFileError: Unsupported xml type for TcSource: TcPlcObject/GlobalTextList

If loaded directly with the TcSource.from_filename utility method, the above will be raised.
If loaded as part of a solution/tsproj, the unsupported source file will just be ignored.

Test suite changes

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #81 (d89aa43) into master (f7e0ecf) will increase coverage by 0.2%.
The diff coverage is 84.0%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #81     +/-   ##
========================================
+ Coverage    79.6%   79.9%   +0.2%     
========================================
  Files          26      26             
  Lines        5491    5505     +14     
========================================
+ Hits         4374    4399     +25     
+ Misses       1117    1106     -11     
Files Changed Coverage Δ
blark/tests/test_dependency_store.py 78.5% <ø> (ø)
blark/solution.py 79.5% <84.0%> (+0.6%) ⬆️

... and 1 file with indirect coverage changes

@klauer
Copy link
Owner Author

klauer commented Aug 16, 2023

Tests all passing and this is looking good on my local parsing tests - merging

@klauer klauer merged commit 3e1a543 into master Aug 16, 2023
22 checks passed
@klauer klauer deleted the fix_global_text_list branch August 16, 2023 17:15
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.

2 participants