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.
If `show_wirenumbers` is omitted from a cable section, its value will be `None`. In that case, we want to choose a default based on whether this is a bundle or not.
If the user did specify `show_wirenumbers`, then its value will be `True` or `False`, and we want to respect that whether it's a bundle or not.
Bug: Failing to assign the default cable length unit when not present.
It was introduced in #198.
Fix: Test the correct cable attribute. This fix solves issue #205.
Using Any or str in type annotations might increase the need for extra
comments to explain the real valid values. However, such needs can be
drastically reduced with the help of semanticly named type aliases.
Each type alias have their legal values described in comments.
Actual validation might be implemented in the future.
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.
The https://validator.w3.org/ reported Errors:
The align attribute on the th/td element is obsolete. Use CSS instead.
By replacing align="X" attributes with text-align:X; CSS equivalent,
the validator now completes without any errors or warnings.
This solves the remaining issues from #97.
The application name and URL was defined several places in the code,
and the name was not written exactly the same everywhere.
By using the same constants everywhere, consistency is obtained.
This image, with an optional caption below, is displayed in the lower
section of the connector/cable node in the diagram - just above the
notes if present.
This solves the basic part of issue #27, and is a continuation of
PR #137 that was closed due to changes in the base branch.
Add -V command line option (and --version as an alias) to
both wireviz.py and build_examples.py that show version number.
Move the version number from setup.py into __init__.py to access
the same version number specification from all files needing it.
This solves part 4 of issue #167.
It seems, that the current implementation ignores --generate-bom,
and that parser.add_argument() code line is therefore commented
out until it gets implemented to avoid any confusion.
This solves part 1 of issue #167.
When used to "git diff", it is easy to write "build_examples.py diff"
instead of "build_examples.py compare" by a mistake. Therefore,
"diff" is now an alias to "compare" so both commands will work.
This solves part 3 of issue #167.
Adding an optional -b BRANCH argument to build_examples.py to enable
comparing to and restoring from any branch or commit. That will help
when e.g. reversing an unfortunate commit of generated files.
This solves part 2 of issue #167.
- Add double quotes around path string in `os.system()` call and
status output to handle any spaces in the path.
- Split the `generated_extensions` list into the two lists
`extensions_not_containing_graphviz_output` and
`extensions_containing_graphviz_output` for readability.
By putting all value entries on separate lines with a trailing comma,
it becomes easier to read the diff when later inserting or deleting
the first or last value entry in any dict.