You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our previous work (see PR #828), we introduced the RuntimeOptions class. This development was aimed at decoupling command-line argument parsing from controller construction. The RuntimeOptions class is instantiated and utilized to initialize the CntlrCmdLine class directly within the CntlrCmdLine module.
The current implementation limits the RuntimeOptions class's utility to only the CntlrCmdLine class. This limitation prevents its use with the Python API with the underlying base Cntlr class.
To address this, we should allow both the Cntlr and CntlrCmdLine constructors to accept the RuntimeOptions class as an optional named field. If it's provided, the other parameters must either not be set or match the values in RuntimeOptions (if they don't, a ValueError should be raised).
There's additional handling in CntlrCmdLine.py for preloading plugins and configuring controller logging. It should be possible to do this for the base Cntlr class from a single function that takes RuntimeOptions.
With this work a user should be able to:
Create and configure an instance of RuntimeOptions.
Call the function to create and setup a Cntlr from the RuntimeOptions instance.
Call the run method of the Cntlr instance to execute validation, generate renderers, or whatever else they configured in the options class.
The text was updated successfully, but these errors were encountered:
What should we change and why?
In our previous work (see PR #828), we introduced the
RuntimeOptions
class. This development was aimed at decoupling command-line argument parsing from controller construction. TheRuntimeOptions
class is instantiated and utilized to initialize theCntlrCmdLine
class directly within theCntlrCmdLine
module.The current implementation limits the
RuntimeOptions
class's utility to only theCntlrCmdLine
class. This limitation prevents its use with the Python API with the underlying baseCntlr
class.To address this, we should allow both the
Cntlr
andCntlrCmdLine
constructors to accept theRuntimeOptions
class as an optional named field. If it's provided, the other parameters must either not be set or match the values inRuntimeOptions
(if they don't, a ValueError should be raised).There's additional handling in CntlrCmdLine.py for preloading plugins and configuring controller logging. It should be possible to do this for the base
Cntlr
class from a single function that takesRuntimeOptions
.With this work a user should be able to:
RuntimeOptions
.Cntlr
from theRuntimeOptions
instance.Cntlr
instance to execute validation, generate renderers, or whatever else they configured in the options class.The text was updated successfully, but these errors were encountered: