Open JacobHast opened 1 day ago
Yes this is actually intended behaviour, and I agree it's not ideal. Originally it raised an error, but this resulted in several other issues:
QUAM.print_summary()
, making it harder to debugAs a result, I've opted to turn it into a warning instead. Do you see the warning? If not, it may be that you logging
package needs to stop filtering out the warnings.
Turning it back into an error would be a breaking change, and could lead to the code of others suddenly not working anymore. Maybe a good in-between solution is to have a global flag that specifies whether it returns an error or warning? I would like it to be warning by default to avoid breaking changes
I see. I don't get warnings, not even when running the above example in a fresh kernel, so I'm not sure if I'm filtering out warnings, at least not intended. It would be nice to have the option to turn on errors - of course since I currently don't see the warnings I don't know if I'm in the group of people for which everything would stop working, but it would be good to find out. Alternatively, would this be fixable by adding some kind of quam decorator to properties such that, when everything is "booting up", errors are not thrown, but once the machine is construct errors can be thrown?
Both could work, bit since the decorator would still be a breaking change, I propose we handle this by adding a flag to specify whether it'll raise an error.
We can also look separately at why you aren't receiving a warning. I can also raise the log status from warning to error.
I'm planning to allow quam to have an optional config file. We can then easily add this as a flag
If a quam component attribute is a reference to a property and this property throws an error, the error is ignored and the property instead returns the string reference. Is this intended behaviour? I my experience it makes it hard to debug custom components - if the attribute throws an error I think I would always like to see this error and have the program halt, rather than continuing with the string.