devbisme / skidl

SKiDL is a module that extends Python with the ability to design electronic circuits.
https://devbisme.github.io/skidl/
MIT License
1.06k stars 120 forks source link

Modifying init files to allow node function to work in demo notebook. #171

Closed PolarState closed 1 year ago

PolarState commented 1 year ago

Hi Dave, thanks for making this project, I think it's super valuable!

This fix will allow the node function to be used in the demo notebooks as is.

159

I considered a few alternatives, open to any of these or other solutions if you prefer. I prefer separate explicit namespacing / imports rather than one global one but I am trying to adhere to the project's existing import pattern. There may also be a better way to do this.

  1. No change to the init files, node needs to be namespaced with tools.spice.node.
  2. Only the change to skidl/tools/init.py, node needs to be namespaced with spice.node.
  3. Only the change to skidl/tools/spice/init.py, node needs to be namespaced with tools.node.

All namespacing here can be replaced by explicitly importing the appropriately namespaced node.