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
We have a solution coming for this soon but it won't have custom exceptions unfortunately. Once we have a better parsing solution we'll have custom errors that will let the user know. I'll update the issue with the fix once the fix is pushed but I'll keep the issue open until the better parsing solution is implemented.
I was imagining basic validation that just recognizes the general syntax for actions (comma-separated list enclosed in curly brackets).
Validation of the specific attributes associated with particular actions would be even better, but I wasn't trying to suggest that. Basic validation as outlined above would be helpful.
This is partially addressed with 0.4.6 release. The actions now know their possible arguments and will raise an error if the argument is incorrect. Eventually with the full parser I'm hoping to point out the exact reason why something fails but until then this should catch majority of these hopefully.
Here's an example of an ill-formatted action (missing end
}
) that pyBioNetGen doesn't raise an exception for and doesn't parse as intendedThe parsed args for the action can be accessed as below
This returns this data structure
The first argument is not parsed as intended.
The text was updated successfully, but these errors were encountered: