New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plain text component values #40
Comments
Hey there! Somehow this originally fell threw the cracks in my inbox, but the improvement looks great and I'd love to figure out how to get it merged! |
Thinking about this further: I like
This way, I think we have a utility function to add, which you already wrote, and hooks to add to the Personally, I'd move even the existing |
We already have more infrastructure for this than I realised, as G took the initiative to work towards SPICE syntax compatibility! Found just reading netlist_parser thinking about unicode units..... |
SPICE annoyingly equates Anyway the intent was for this to be for the pythonic API, not SPICE. |
Hi, I made this for parsing plain text schematic values:
https://gist.github.com/endolith/1a74477fc1659cd6bf9d138e09c72672
So you could make entering components more readable and catch mistakes more easily, too:
Is this something you'd be interested in incorporating?
For instance in
Circuit.add_resistor
, it would be something like this:or put the exception inside the function:
So entering units would be optional, but would help catch errors of changing the wrong value, etc. I think most SPICE implementations ignore units.
The text was updated successfully, but these errors were encountered: