-
Notifications
You must be signed in to change notification settings - Fork 223
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
Processing Jumpers and Loops, Plus Processing Wires inside the Table as Edges #369
base: dev
Are you sure you want to change the base?
Conversation
Now everything from #350 is implemented. |
Syntax:
|
Changed the syntax and added options for the shorts, see ex15 for more
New Syntax:
|
I'm sorry that I've not yet had time to play with this PR, but it seems to work as proof of concept for the #350 discussions.
|
I mainly have problems with the bom and how I add the shorts to the bom |
Have you considered making the additional components list be a union of shorts and explicitly specified entries, instead of having a separate list for shorts? Then adding to BOM could be handled equally as well. |
@kvid @martinrieder could you look at the new syntax in ex15 & 16? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a bit of rework. Comments added.
examples/ex15.yml
Outdated
manufacturer: WireViz | ||
mpn: 42XCD42A5 | ||
type: shortPartA | ||
qty: 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find qty
confusing for unit mm
. How about length
as an alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but Additional Components works with qty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just leave it, as changing this is not in scope.
examples/ex15.yml
Outdated
shorts: | ||
- SH1: [1, 5, 7] | ||
- SH2: [2, 6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a list here is fine. Does not match the syntax description though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Syntax description is yet to be updated.
} | ||
else: | ||
common_args = { | ||
"qty": part.qty * component.get_qty_multiplier(part.qty_multiplier), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numShorts
could be the return value of the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not completely understand what you mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You had the qty_multiplier
choice extended for shorted
, so I thought that the function get_qty_multiplier
might return numShorts
as an integer in that case. The meaning has changed now with references
.
src/wireviz/wv_bom.py
Outdated
else: | ||
numShorts = len(part.shorts) | ||
|
||
if numShorts > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be avoided, see below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not completely understand what you mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the order of comments got mixed up and my statement was possibly misleading.
Overall question is if the syntax is acceptable? |
@tobiasfalk wrote:
I would prefer a solution that does not require using Overall, I would say that this implementation is quite close to what was discussed in #224 (comment). The only difference is that Please also have a look at #288, which also implements some loop handling and might cause some merge issues. What I need for my daily work is having alphanumeric pin names and pinlabels matching to work also on loops. I am currently using a workaround for this. ex15 connectors:
X1:
#[...]
pinlabels: [GND, VCC, RX, TX, GND, VCC, GND]
shorts:
- SH1: [1, 5, 7]
- SH2: [2, 6]
additional_components:
- reference: SH1 # discussed in #224
color: PK
#[...]
- reference: SH2
color: RD
#[...]
X2:
#[...]
pinlabels: [GND, VCC, RX, TX, GND, VCC, GND]
shorts:
- SH1: [1, 5, 7] # same designator as above...
- SH2: [2, 6] # does this imply the same attributes? EDIT: Cross-referring to #224 (comment) for additional details. |
@tobiasfalk I finally got around to test your PR on my dev machine. It fails to run
You may need to use an absolute path for calling this script. I tried to set the environment variable to point to the right path and also moved |
Will look in to it |
@tobiasfalk I fixed it by adding the line os.environ['GVPRPATH'] = str(Path(__file__).parent) |
@martinrieder to where exactly? |
Just before the call to |
@martinrieder could you test it again? |
Some commits back, do not know exactly which one, I implemented #352 and it works without a problem for me |
Then I propose you edit the description of the PR to include this and the other issues from #369 (comment) as well. |
If everything is now Ok, then I would now wait for #251 |
Oh yes I need to clean up the code a bit, I know that |
@tobiasfalk: While working on another machine I ran into a dependency issue for
It was a fresh install of Python 3.12.4, see the detailed log below: Details
During some research, I found out that https://docs.python.org/3.12/whatsnew/3.12.html#distutils
Doing |
@martinrieder |
https://peps.python.org/pep-0632/
|
I realized that |
I still want to look if there is a current way to do it since it is already depricated. |
@martinrieder in #412 I have now replaced |
Here I started to implement Jumpers, and a new way of drawing Wires inside the Wire table.
Currently, only the Black circles are done and nothing else.
See ex15.png
Ps. And now even the right branch
Edit:
Ex15:
Ex16: