-
Notifications
You must be signed in to change notification settings - Fork 226
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
[bug] Unconnected components are ignored by v0.4-dev #328
Comments
If this new fuctionality is intended as a feature, then it might be a solution to #294. However, in that case, it should not be the default option, IMHO, because I find it counterintuitive unless deliberately activating it as an optional feature, e.g. by setting: |
Thanks for bringing this up. The easy fix with the current code, is to define a connection set, with only that connector included: connectors:
X1:
pinlabels: [GND, VCC]
connections:
- - X1 The question is where
|
I you want I can add this to the documentation and try some test cases on my machine! |
I am coming back to this issue, and I can now offer a better explanation. Previously, connectors were immediately generated unless they were explicitly meant for autogeneration, then added to the harness, and thus rendered. Cables did not have autogeneration capabilities. WireViz/src/wireviz/wireviz.py Lines 64 to 68 in b0d0070
However, after implementing the new autogeneration syntax proposed in #184 (comment), implemented in #186 and explained in the new syntax description* , the WireViz/src/wireviz/wireviz.py Lines 240 to 254 in 9cb9ede
and only afterwards is the harness actually populated populating with them. WireViz/src/wireviz/wireviz.py Lines 279 to 286 in 9cb9ede
Since I strongly believe the new autogeneration syntax is more robust and flexible**, I will preserve the current behavior and instead amend the syntax description with a note on how to force rendering components that are not connected by referencing them in a one-line connection set as described above. connections:
- - X1 * There are still some mentions of the ** For example, the new syntax allows to generate multiple complex but identical components by using autogeneration, without resorting to YAML templates, and while still allowing the user to assign designators for every instance. connectors:
X_template:
# ... complex connector description
connections:
-
- X_template.X1: [...]
- ...
- X_template.X2: [...]
-
- X_template.X3: [...]
... |
@formatc1702 - thank you for the detailed explanation above. I now agree that the advantages with the new algorithm are probably greater than the disadvantage about breaking the old way to document an unconnected connector. The disadvantage can be reduced by describing such use cases in the documentation and maybe include a proper example. How can we best give the user an explanation about the reason when generating an empty diagram? There might also be other possible reasons for this than the use case described in this issue. |
See the updated syntax description in the unreleased interim v0.4 for a (IMHO) concise and simple explanation and solution. |
The current
dev
branch (after merging in multiple PRs this summer) is no longer able to document unconnected connectors or cables - as has been possible with all releases (at least v0.2 and later).This is a minimal example to document a single connector without any connections:
With the current
dev
branch, this results in an empty diagram - which is not very useful!Why is the algorithm that generates the diagram rewritten to only add components that are referred to from connections? That makes it impossible to document e.g. a loop-back connector, which is not an unusual use case. See also the slightly related #217.
The PR #251 on top of
dev
does not seem to help with this issue.The text was updated successfully, but these errors were encountered: