109 Commits

Author SHA1 Message Date
Daniel Rojas
52026a39dc Improve subclassing of components, prepare for BOM refactoring 2021-10-21 17:15:02 +02:00
Daniel Rojas
84a85327fe Remove unused line 2021-10-21 12:21:00 +02:00
Daniel Rojas
f8300913c6 Apply dot tweaks last 2021-10-21 12:11:04 +02:00
Daniel Rojas
962f7d3eda Make variable name more expressive 2021-10-21 12:09:28 +02:00
Daniel Rojas
9c48b625ec Break longer lines not caught by black
because they were unbroken strings or comments
2021-10-21 12:05:00 +02:00
Daniel Rojas
ab358442ae Use color objects in WireViz 2021-10-20 20:14:10 +02:00
Daniel Rojas
652fcc2f8e Streamline assignment of ports to simple connectors 2021-10-19 22:53:47 +02:00
Daniel Rojas
7abfd1df4a Run autoflake -i --remove-all-unused-imports 2021-10-19 21:47:40 +02:00
Daniel Rojas
395b8788e0 Run autoflake -i 2021-10-19 21:46:43 +02:00
Daniel Rojas
40e693df41 Make mates object-oriented 2021-10-19 21:44:08 +02:00
Daniel Rojas
8fde579e45 Alphabetize HTML tags, improve bgcolor rendering 2021-10-19 19:43:12 +02:00
Daniel Rojas
3a7a5e85bc Make connecting things more object-oriented 2021-10-19 19:16:59 +02:00
Daniel Rojas
0c149a9b4b Outsource gv_edge_wire() 2021-10-19 16:54:30 +02:00
Daniel Rojas
db5666f037 Reactivate cable edge generation 2021-10-19 16:17:38 +02:00
Daniel Rojas
59164b320f Outsource set_dot_basics() and apply_dot_tweaks() 2021-10-18 18:50:03 +02:00
Daniel Rojas
501a19f442 Add TODOs 2021-10-18 18:08:09 +02:00
Daniel Rojas
e0347c8f57 Outsource gv_pin_table(), simplify padding 2021-10-18 17:53:48 +02:00
Daniel Rojas
d88e1f6edb WIP 2021-10-18 13:42:51 +02:00
Daniel Rojas
104391421c Implement HTML indentation 2021-10-18 12:20:40 +02:00
Daniel Rojas
64d22d5db4 WIP: refactor cable node generation 2021-10-17 20:43:38 +02:00
Daniel Rojas
29ff099e9a Generate gauge string inside Cable object 2021-10-17 20:01:05 +02:00
Daniel Rojas
9ed3cadd53 Further refactor connector node generation 2021-10-17 18:50:42 +02:00
Daniel Rojas
e1f03907bf Refactor connector node generation 2021-10-17 16:13:45 +02:00
Daniel Rojas
8020bad94d WIP 2021-10-17 15:33:41 +02:00
Daniel Rojas
f7b791afe2 Make prefix for autogenerated component names configurable
`edotor.net` does not seem to like leading underscores, which makes GraphViz debugging difficult.
2021-10-17 13:00:43 +02:00
Daniel Rojas
6f9bb67d02 Embed images into SVG output 2021-10-16 22:39:41 +02:00
Daniel Rojas
d19c260940 Simplify file access operations 2021-10-16 22:27:00 +02:00
Daniel Rojas
c89cf735ae Apply some manual fixes, reapply black 2021-10-16 22:09:59 +02:00
Daniel Rojas
f92985a61c Apply black 2021-10-16 22:09:59 +02:00
Daniel Rojas
344615483a Apply isort 2021-10-16 22:09:59 +02:00
Daniel Rojas
65b8e36fe5 Create cache of graph to avoid generating it more than once 2021-10-16 22:08:01 +02:00
Daniel Rojas
b1fa2b9de9 Do not output .gv files by default 2021-10-16 22:08:01 +02:00
Daniel Rojas
d3e99abaa8 Only output requested file types (closes #60) 2021-10-16 22:08:00 +02:00
Daniel Rojas
6b1e274d57 Refactor functions for harness building
- Use pin names instead of pin indices, until the last moment when generating the ports for the GraphViz nodes
- `Harness.add_mate_pin()` now uses pin names
- Remove unused `if is_arrow()` check from `Harness.connect()`
- Consolidate calling of `Connector.activate_pin()` to prevent subtle bugs
  - Call it from `connect()` and `add_mate_pin()`
  - No longer call it from `create_graph()`
- Misc. other tuning
2021-10-16 21:46:31 +02:00
Daniel Rojas
02a800abef Fix bug of arrows using the wrong port IDs 2021-10-14 18:03:18 +02:00
Daniel Rojas
8ea8248721 Squash feature/mate+autogenerate branch 2021-10-13 21:38:23 +02:00
Daniel Rojas
3cc36e1573 Harmonize shebangs and encoding info
- Use `#!/usr/bin/env python3` on executable modules
- Remove shebangs on all other `.py` files
- Add UTF-8 encoding info where mising
2021-10-11 20:05:52 +02:00
KV
45d7d03fe0 Support both bgcolor and bgcolor_title attributes
Solves #210 completely by supporting bgcolor of both the node title
and the whole node independently using separate attributes.
2021-09-28 19:14:28 +02:00
KV
dbccb77b08 Add bgcolor attribute to connectors and cables
This solves the #210 suggestion to render the title row of
the graph nodes with this bgcolor.
2021-09-28 19:14:28 +02:00
Daniel Rojas
a3eefe6659
Implement suppliers and supplier part numbers (#241)
Co-authored-by: kvid <kvid@users.noreply.github.com>
2021-09-14 19:29:59 +02:00
kvid
db05514469
Add optional tweaking of the .gv output (#215)
Co-authored-by: Daniel Rojas <github@danielrojas.net>
2021-09-14 19:20:51 +02:00
kvid
92354e6852
Add basic options and metadata (#214) 2021-08-25 19:46:37 +02:00
Daniel Rojas
e212fc9058
Use unique index for connector pin ports (#229)
Closes #160.

Co-authored-by: kvid <kvid@users.noreply.github.com>
2021-08-23 19:26:23 +02:00
KV
7546991b04 Show connector pins even when all are unconnected
Bug: Hiding connector pins when none are connected is not reasonable.
When combined with loops or neither pinlabels nor pincolors, then
exceptions are raised as well.

Fix: Forcing pins at the left side in such cases solves #217.
2021-03-20 11:11:11 +01:00
William Sutton
dec64abaf5 Add support for wire length units
Based on #161, #162, #171.

Co-authored-by: stevegt <stevegt@t7a.org>
Co-authored-by: kvid <kvid@users.noreply.github.com>
2020-11-16 17:14:46 +01:00
Daniel Rojas
96bd121403 Create separate modules for BOM and HTML functions 2020-11-15 08:42:57 +01:00
Daniel Rojas
eebf932c8d Show pin labels of adjacent connectors in cable node (#70) 2020-11-14 23:21:08 +01:00
Daniel Rojas
03e6077512 Allow referencing wires by color/label (#169,#193) 2020-11-14 23:21:08 +01:00
Daniel Rojas
feff47f47b
Add option to add colors to connector pins (#141) 2020-11-14 09:43:01 +01:00
Miklos Marton
e2e8bbfb91 Remove input text hyperlinks except in the HTML BOM
GraphViz does not support the a HTML tag when generating the tables for the
cables/connectors, so this change will remove these tags for the graph generation.
However for the HTML BOM output table these links will be generated.
2020-10-22 23:08:13 +02:00