-
-
Notifications
You must be signed in to change notification settings - Fork 45
Add Electrical Component docstrings #7
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
Conversation
Added docstrings for: - Pins - Ideal components - Sensors
- Docstrings are more in line with README - Pins mentioned in Connectors section - Variables section renamed to States - Parameters mentioned in Observables section - Updated OpAmp docstring
It seems like documenting macro usages is not straightforward. The docstrings for |
Apologies for the inactivity. I have a lot going on right now. Would love to get back to this in a week! |
- `ConstantVoltage`, `CosineVoltage` documented - `Pin` and `DigitalPin` documented (using `@doc`)
Documenting |
- Docstrings for `DampedSineVoltage`, `RampVoltage`, `SineVoltage`, `SquareVoltage`
If #18 is on its way to completion, it might be better to wait and migrate the docstrings over to those new functions? It would reduce a lot of duplicacy |
- Added docstrings for Analog `StepVoltage`, `TriangularVoltage` components - Added docstrings for all Digital components
I'm not familiar with |
Looks good thanks! |
Test failure |
I'll look into this. Weird that docs failed tests. |
It seems that I tried updating to using |
we should just drop the earlier Symbolics and update. |
I'm afraid this still won't precompile, because Symbolics doesn't like the |
It seems the deprecation of v4.1.1 breaks this, so from looking at the release log, my guess would be that JuliaSymbolics/Symbolics.jl#457 is the relevant PR causing issues |
MTK v8 removed |
If the variables are appropriately defined as flow variables this should all happen automatically through the |
I guess that should happen in #25 then. Symbolics v4.1.1 still breaks this, and main as well. |
Tests should pass now with Symbolics v4.2.2 release |
Please update this to match master. We just had a pretty major change (#7) and it would be good to copy these over if possible. |
Looking at http://mtkstdlib.sciml.ai/dev/API/electrical/, I like how your format defines the ports and everything, so updating it would be great. |
Sure! I'm a bit swamped with work right now, but I'll get to this as soon as I can. |
Oh no, don't merge, rebase this one 😓. You might want to just start from scratch and copy over the major changes. |
I guess that's a better idea. I spent the past half hour trying to reconcile all of this only for it to show up again :P Rebasing was annoying, since it seemed to process commit by commit and kept getting merge conflicts in the same files at the same places repeatedly, so I tried |
Working on adding some docstrings, trying to follow the pattern in MTK.jl docs.
Some questions:Do theModelingToolkit.connect
methods need docstrings? Consequently, doesElectricalPin
need one?Do the ideal components need to specify how their variables are calculated?I've studied OpAmps a bit, but I'm not particularly sure how this one worksHow should the pins of sensors (and components in general) be documented? All two-pin components have pinsp
andn
, so should this be mentioned in every sensor/component or left as an assumed standard? What about components with more pins?EDIT: I'm not sure why I didn't just take the docs from the README