Closed klauer closed 4 years ago
Merging #172 into master will increase coverage by
0.26%
. The diff coverage is91.83%
.
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
+ Coverage 79.56% 79.82% +0.26%
==========================================
Files 17 18 +1
Lines 2114 2196 +82
==========================================
+ Hits 1682 1753 +71
- Misses 432 443 +11
Impacted Files | Coverage Δ | |
---|---|---|
pytmc/bin/pytmc.py | 80.85% <ø> (ø) |
:arrow_up: |
pytmc/code.py | 90.41% <100%> (-4.91%) |
:arrow_down: |
pytmc/parser.py | 88.79% <90.47%> (+0.44%) |
:arrow_up: |
pytmc/bin/summary.py | 86.44% <90.9%> (-1.17%) |
:arrow_down: |
pytmc/bin/code.py | 91.66% <91.66%> (ø) |
|
pytmc/bin/util.py | 57.89% <0%> (-2.64%) |
:arrow_down: |
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 8dfb940...a1d020d. Read the comment docs.
I'd like to include this one in the next tag, if either of you have a chance for a quick review @n-wbrown / @ZLLentz
I have no familiarity with twincat actions, so can't really give input on that, but I'll review this PR now regardless
"Not sure what this is for but it doesn't smell bad" is a perfectly valid PR approval message ;)
Will self-merge after my flake8 style fixes are confirmed.
Adds
POU.get_source_code
methodProvides easier access to Actions (e.g.,
FB_Name.Action();
- equivalent of Python methods, pretty much)[ ] I'm not 100% on the ST syntax of actions outside of a
.TcPOU
file (can anyone find an example?).[x] This PR also has a bit too much in the way of TODOs. That said, it still offers an improvement over master in that action source code can easily be retrieved from POUs.
[x] I think
pytmc summary
should probably rely onget_source_code
, which should clean up our html docs as well.(Aside: this PR pairs with my airplane/weekend side-project that allowed me to somewhat stave off jet lag, https://github.com/klauer/blark/ - an IEC61311-3 structured text parser using an Earley parser from Lark. Having a full parser for structured text POUs may allow us to do some sort of static analysis, generate more thorough documentation, and who knows what else. It parses almost all of the PCDS code I've downloaded locally, with a few exceptions...)