Skip to content

Adding stateruleparser for converting .xml to .conf - #307

Open
stefi07 wants to merge 3 commits into
magao-x:devfrom
stefi07:istefan/rule_parser
Open

Adding stateruleparser for converting .xml to .conf#307
stefi07 wants to merge 3 commits into
magao-x:devfrom
stefi07:istefan/rule_parser

Conversation

@stefi07

@stefi07 stefi07 commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Add utility to parse drawio state tree diagrams into .conf inputs for stateRuleEngine.

@stefi07 stefi07 self-assigned this Mar 13, 2026
@stefi07 stefi07 added the enhancement New feature or request label Mar 13, 2026
@stefi07

stefi07 commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

To test, run python -m stateruletree stateruletree/examples/fwfpm_stagesci1.drawio in dir utils/stateruletree.

To install, run make install in dir utils/stateruletree (this symlinks to /opt/MagAOX/bin, similar to pipinstall in pythonApp.mk).

@stefi07
stefi07 requested a review from a team May 11, 2026 15:18
@stefi07
stefi07 force-pushed the istefan/rule_parser branch 4 times, most recently from c50e6c6 to 300e553 Compare May 26, 2026 11:58
Not all can be fixed since Codacy enforces conflicting rules (see note in pyproject.toml).
Some patterns need to be disabled in Codacy UI.
@stefi07
stefi07 force-pushed the istefan/rule_parser branch from 300e553 to 0d4721f Compare May 26, 2026 14:02
@stefi07

stefi07 commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

I've gone through the code to fix the issues flagged by Codacy's analysis. The remaining failures are caused by pairs of mutually exclusive pydocstyle rules being active simultaneously: D212 vs D213 (whether to start docstring summary on first line or not) and D203 vs D211 (blank line before class docstring). These rules directly contradict each other, so no code change can fix both at once. I have deferred to following the numpy convention (D211 and D212), since that is what the majority of the existing code already uses.

To resolve the remaining Coday issues, D203 and D213 need to be disabled in Code Patterns, in the Codacy settings.

@jaredmales jaredmales left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants