348 Commits

Author SHA1 Message Date
Tyler Ward
b7f184e79c Moved bom entry description generation to be in order of aperance 2020-10-19 00:29:35 +01:00
Tyler Ward
cb3e3f44e8 Deduplicate additional components functions
Also refine bom variable names and fix a comple of typos
2020-10-19 00:29:33 +01:00
Tyler Ward
a450c82e72 Make description for additional components a property 2020-10-19 00:28:35 +01:00
Tyler Ward
20622e0346 Move qty_multiplier functions into Connector and cable dataclasses
Also rename long_name to description
2020-10-19 00:28:31 +01:00
Tyler Ward
3faaff6ebc Simplify several function calls and typehint qty multipliers 2020-10-19 00:28:05 +01:00
Tyler Ward
abcccbd360 Move calculation of qty_multiplier into wv_helper 2020-10-19 00:27:16 +01:00
Tyler Ward
7c67a9e004 Implement suggested code cleanup
Moved aditional components from dicts to a new dataclass
Update dict get refrences to class members
Simplify Connector and Cable bom generation (deduplication is now
handled with the additional components)
Other small sugested cleanups
2020-10-19 00:26:25 +01:00
Tyler Ward
5170631cc5 Update Tutorial 08 sources to include additional components 2020-10-19 00:24:21 +01:00
Tyler Ward
c6c54b0c4e Add Bom referenced parts lists for aditional components
Bom generation has been refactored to add an ID field and remove
duplicates. This is used to lookup adidiontal components and a lookup
reference and short description is now included in the graph rather than
the full details.
2020-10-19 00:24:19 +01:00
Tyler Ward
3e1e9b7e6d remove bom designators for connector extras with show_name=false
This matches the behaviour of the connectors themselves
2020-10-19 00:23:51 +01:00
Tyler Ward
038938cc27 Fix bugs from the the error handling additions. 2020-10-19 00:23:51 +01:00
Tyler Ward
0e929fe85a Reformat aditional component rendering in conector and cable nodes 2020-10-19 00:23:49 +01:00
Tyler Ward
983c322bf8 Add error handling for missing type in additional components. 2020-10-19 00:22:53 +01:00
Tyler Ward
22e6fb5c35 Fix conector additions to multiply quantity rather than replace it 2020-10-19 00:22:53 +01:00
Tyler Ward
e852df5fd0 Fix bad check for pn being set 2020-10-19 00:22:53 +01:00
Tyler Ward
668ee0aa9e Fix wrong designation in bom for cable additions 2020-10-19 00:22:53 +01:00
Tyler Ward
bb37b37d28 Split qty into multiple fields
There is now a numberic field 'qty' and a multiplier field 
'qty_multiplier'
2020-10-19 00:22:53 +01:00
Tyler Ward
94d6fc9015 Add units to graph output 2020-10-19 00:22:53 +01:00
Tyler Ward
1a8942abaa Add support for cables to have extra components 2020-10-19 00:22:49 +01:00
Tyler Ward
9a1bc20ace Add extra components to connector nodes in graph 2020-10-19 00:21:29 +01:00
Tyler Ward
6680e5597b Clean up construction of connectors_extra list 2020-10-19 00:19:09 +01:00
Tyler Ward
064fbc617d Add support for connectioncount as a qty option 2020-10-19 00:19:09 +01:00
Tyler Ward
84c9db6a8a Add connector aditional bom components 2020-10-19 00:19:09 +01:00
Tyler Ward
389e48035d Add bom ignore option for cables and connectors 2020-10-19 00:19:09 +01:00
Daniel Rojas
4e4dac8597 Bump version to 0.3-dev 2020-10-17 11:53:11 +02:00
Daniel Rojas
b2d1a29cc2 Rebuild all examples with v0.2 2020-10-17 11:42:30 +02:00
Daniel Rojas
3e570d648f Bump version to 0.2 2020-10-17 11:41:27 +02:00
Daniel Rojas
6db1fcf0fe Improve documentation
- Create `docs/` directory
- Add syntax description (`syntax.md`)
- Track changes since first release (`CHANGELOG.md`)
- Expand contribution guidelines (`CONTRIBUTING.md`)
- Improve main readme (`README.md`)
- Add documentation for build script (`buildscript.md`)
2020-10-16 23:13:56 +02:00
KV
fb17eae7a6 Avoid errors from HTML validator
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.
2020-10-16 22:02:15 +02:00
KV
7dcd1a7eeb Define application name and URL only once
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.
2020-10-16 22:02:15 +02:00
KV
b00040cdd9 Add version number to output files with meta info
Tag the .gv and .html output files with generator and version number.
2020-10-16 22:02:15 +02:00
KV
1809f73d58 Simplify colorbar using the same technique as html_image()
Moving common code into html_colorbar() helper function.
2020-10-14 22:37:20 +02:00
kvid
4782da47c9
Add optional image to connectors and cables (#153)
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.
2020-10-14 16:08:16 +02:00
KV
7df8a4b7cf Add command line options to show version number
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.
2020-10-11 13:37:34 +02:00
KV
c4957f1475 Comment out unimplemented command line option
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.
2020-10-11 13:37:34 +02:00
KV
83a467a4aa Add diff as an alias to the compare command
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.
2020-10-11 13:37:34 +02:00
KV
b14f5cba19 Add -b BRANCH argument to the compare and restore commands
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.
2020-10-11 13:37:34 +02:00
Daniel Rojas
df90d8326a
Add .gitattributes for GitHub Linguist (#154) 2020-08-22 18:49:39 +02:00
Daniel Rojas
e3fb39f5ae Add whitespace to GraphViz HTML for readability 2020-08-13 17:21:42 +02:00
Daniel Rojas
94faec536e Rebuild GV HTML generation using lists
Simplify code

remove superfluous temporary variables `pinlist`, `wirerow`

Add suggested changes
2020-08-13 17:21:42 +02:00
Daniel Rojas
af196dfd8c Improve line break handling 2020-08-13 17:21:42 +02:00
Daniel Rojas
102c7d6113 Simplify code and rename variables
Improve code based on review

Suggestions by @kvid
2020-08-13 17:21:42 +02:00
Daniel Rojas
43f85aedb2 Add color attribute to cables 2020-08-13 17:21:42 +02:00
Daniel Rojas
2639c77360 Refactor cable GraphViz HTML generation
to match the one for connectors.
2020-08-13 17:21:42 +02:00
Daniel Rojas
79e751dca8 Remove obsolete code 2020-08-13 17:21:42 +02:00
Marc Brückner
19b82e9662 fix #149 introduced in #147 2020-08-12 18:06:06 +02:00
Marc Brückner
84edda64df
Extend unknown color error message (#147) 2020-08-10 20:13:13 +02:00
Daniel Rojas
4802705427 Improve handling of strings with '-' in wv_helper.expand()
Fixes #139
2020-08-10 17:04:23 +02:00
KV
9a3b8bce6e Add 25-pair comments and split lines according to coloring pattern
The coloring pattern is briefly explained. By splitting the source
code lines into 10 pairs per line, the pattern is more easily seen.
2020-08-10 16:51:17 +02:00
KV
113a7310e1 Replace 20 YW color codes with YE to avoid Unknown color specified
Fixes bug #144
2020-08-10 16:51:17 +02:00