Skip to content

Conversation

@rburghol
Copy link
Contributor

@rburghol rburghol commented Jan 20, 2026

This is to begin to enable IF-THEN statements in SPECL, and with some reoranization to facilitate collaboration with @timcera who is doing some work to expand/refine UCI parsing. This is a very minor change, and is being submitted as standalone from the other concurrent SPECL enhancement PR to facilitate it getting included so as to not impede Tim's progress.

  • Parses IF-THEN-ELSE statements, including nested IF-THEN-ELSE layers
  • Adds a pointer to other SPECL components (ACTIONS currently) to insure tracking of activity state.
  • Separated the special action parsing function into a separate file from ReadUCI.py so that it can be more easily used by Tim's new parsers
  • Updated the readUCI.py function getlines() to accept an optional argument line_end="END" in order to not cut off SPECIAL-ACTION parsing at the first END IF statement. The default condition line_end="END" insures that the function behaves identically for all existing function calls prior to the expansion of the args for this function.
  • Updated a sample UCI with conditionals, and moved into a more test friendly hierarchy (hwmA51800.uci)
  • Added ParseTable.csv entry for conditional table.

@rburghol
Copy link
Contributor Author

@PaulDudaRESPEC @austinorr I need further help with the testing framework. I cannot replicate this error (below) in command prompt (linux). The entire, very simple block of code successfully loads the hdf5, finds the element specactions["conditions"] and proceeds. Again, I think that if I was more clear on the behavior of the testing suite, I would be able to sort this out, but I am ignorant -- as is evidenced by my inability to reproduce the error noted here #143 (comment)

I have managed to proceed by renaming my demo script from test_land_specl.py to demo_land_specl.py which is all fine and dandy, but I still need to full some gaps in my understanding to solve more complex adjustments to the code base as in the PR at #202 .

==================================== ERRORS ====================================
_________ ERROR collecting examples/state_specl_ops/test_land_specl.py _________
examples/state_specl_ops/test_land_specl.py:34: in <module>
    conditions = specactions["conditions"]
E   KeyError: 'conditions'
=========================== short test summary info ============================
ERROR examples/state_specl_ops/test_land_specl.py - KeyError: 'conditions'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 2.42s ===============================

@PaulDudaRESPEC PaulDudaRESPEC merged commit 2352c50 into respec:develop Jan 21, 2026
11 checks passed
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