Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1878244
Make prefix for autogenerated component names configurable
17o2 Oct 17, 2021
2f737c2
Prepare for refactoring (squashed commit)
17o2 Oct 17, 2021
c33a197
Refactor code (squashed commit)
17o2 Oct 17, 2021
e7902e8
Change version string to comply with PEP440
kvid Aug 27, 2023
d0e2586
Change BOM output file extension from `.bom.tsv` to `.tsv`
kvid Sep 8, 2023
c47de6b
Include "tests" folders in the build tool groups
kvid Sep 9, 2023
f5f3842
Handle also int colors in colon separated string
kvid Sep 16, 2023
e4ecf97
Avoid wrong function name in warnings
kvid Oct 10, 2023
bc01e7c
Add PN string in gv_additional_component_table()
kvid Oct 11, 2023
51f730f
Rename fill_partnumbers() to __post_init__()
kvid Oct 20, 2023
6f6235a
Split out class AdditionalBomItem from AdditionalComponent
kvid Oct 27, 2023
400c242
Move `parse_number_and_unit()` and `NumberAndUnit` definition to `wv_…
17o2 Apr 16, 2024
a7e667e
Update changelog
17o2 Jul 13, 2024
d8c6230
Add warning about unconnected components
Mar 1, 2025
c376c49
Update syntax description
17o2 Apr 16, 2024
e756d62
Add unpopulated option to additional components qty multiplier
Mar 1, 2025
fee05a7
Do not allow negative `qty_multiplier`
Mar 1, 2025
7077543
Adjust tutorial08.yml
Mar 1, 2025
9d1700c
Improve gracefulness when invoking `wireviz.parse()` without `file_out`
Mar 1, 2025
0fed30a
Apply suggestions from code review
Mar 1, 2025
7018158
Remove references for unsupported output formats
Mar 1, 2025
2400193
Add check for outdated connector attributes
Mar 1, 2025
fb8c6e9
Add documentation on template separator character
Mar 1, 2025
abbedc4
Update deprecated GitHub Actions and add Python versions (#408)
martinrieder Oct 14, 2024
7d8999b
Use ubuntu-latest for the supported Python versions (#442)
kvid Jan 16, 2025
e73e189
Update setup.py with all tested python versions (#442)
kvid Jan 16, 2025
98e103a
Handle OSError(errno=EINVAL) that might be raised in Windows (#346)
Mar 1, 2025
50b1901
Add package_data to to setup() call in setup.py (#347)
kvid May 16, 2024
32a62a6
Use output_name as default title (#361)
Mar 1, 2025
ceaad3c
Update APP_URL (#364)
Mar 1, 2025
287c47a
Add HTML template placeholders for filename (#371)
Mar 1, 2025
6c30d0c
Add HTML template placeholder for diagram_png_base64 (#371)
Mar 1, 2025
812c4aa
Avoid reading diagram file to embed unless used (#371)
Mar 1, 2025
7420718
Add HTML output templates README.md (#371)
kvid Jun 5, 2024
b06c75b
Rename diagram_png_base64 to diagram_png_b64 (#371)
Mar 1, 2025
8608445
Add link from syntax.md to HTML output templates (#371)
kvid Jun 9, 2024
f5c00fa
Rename "sheetsize_default" to <!-- %template_sheetsize% --> (#380)
Mar 1, 2025
152f97c
Add non-empty label to avoid over-sized loops (#381)
Mar 1, 2025
07555f2
Explain unexpeced top-level type (#383)
kvid Jun 10, 2024
018e3de
Update src/wireviz/wireviz.py (#383)
kvid Jun 12, 2024
edc68cf
Catch OSError also with errno=None (#392)
martinrieder Jun 20, 2024
d4902ce
Catch also ValueError (#392)
martinrieder Jul 1, 2024
ff6afac
Update comment in src/wireviz/wireviz.py (#392)
martinrieder Jul 1, 2024
38ca3e2
Provide more information when raising exception
kvid Jul 4, 2024
9fbce3b
Avoid ResourceWarning: unclosed file (#395)
Mar 1, 2025
8f0dbe9
Add TODOs about utf-8 encoding/charset (#395)
Mar 1, 2025
fe7f4a3
Apply black
Mar 1, 2025
a4581d0
Bump version to 0.5-dev+refactor
Mar 1, 2025
0683b44
Update GitHub workflow
Mar 1, 2025
b1d02b9
Rebuild examples
Mar 1, 2025
01c3771
Merge branch 'refactor/big-refactor-squashed' into dev-refactored
Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ docs/* linguist-documentation
examples/* linguist-documentation
tutorial/* linguist-documentation

**/*.bom.tsv linguist-generated
**/*.bom.csv linguist-generated
**/*.tsv linguist-generated
**/*.csv linguist-generated
**/*.gv linguist-generated
**/*.html linguist-generated
**/*.png linguist-generated
Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,24 @@ jobs:
python-version: "3.8"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Create Examples
run: PYTHONPATH=$(pwd)/src/wireviz:$PYTHONPATH cd src/wireviz/ && python build_examples.py
- name: Upload examples, demos, and tutorials
uses: actions/upload-artifact@v4
with:
name: examples-and-tutorials-v${{ matrix.python-version }}
path: |
examples/
tutorial/
if-no-files-found: error

- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Create Examples
run: PYTHONPATH=$(pwd)/src/wireviz:$PYTHONPATH cd src/wireviz/tools/ && python build_examples.py
- name: Upload examples, demos, and tutorials
uses: actions/upload-artifact@v4
with:
name: examples-and-tutorials-v${{ matrix.python-version }}
path: |
examples/
tutorial/
if-no-files-found: error
28 changes: 17 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# OS-specific files
.DS_Store
desktop.ini
Thumbs.db

# Development aids
.idea/
.eggs
__pycache__
.*.swp
*.egg-info
*.pyc
build
data
dist
.vscode/
temp/
venv/
.venv/
desktop.ini
thumbs.db
temp/

# Build/compile/release artifacts
build/
dist/
*.egg-info
*.pyc

# Other temporary files
__pycache__
.*.swp
5 changes: 5 additions & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh

autoflake -i --remove-all-unused-imports src/wireviz/*.py
isort src/wireviz/*py
black src/wireviz/*.py
12 changes: 12 additions & 0 deletions devtools.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The following tools have proven useful during development
# Feel free to install while inside the WireViz virtualenv, using:
# pip install -r devtools.txt

# Code formatting
black # black src/wireviz/*.py
isort # isort src/wireviz/*py

# Development aids
pudb # import pudb; pudb.set_trace()
autoflake # autoflake -i --remove-all-unused-imports src/wireviz/*.py
pyan # pyan3 src/wireviz/*.py -uncge --html > temp/pyan.html
121 changes: 74 additions & 47 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guidelines

When contributing to this repository, please [submit a new issue](https://github.com/formatc1702/WireViz/issues) first to discuss the proposed change, before submitting a pull request.
When contributing to this repository, please [submit a new issue](https://github.com/wireviz/WireViz/issues) first to discuss the proposed change, before submitting a pull request.

## Submitting a new Issue

Expand All @@ -27,7 +27,7 @@ When contributing to this repository, please [submit a new issue](https://github
1. Push the changes to your fork.
1. Please format your code using [`isort`](https://pycqa.github.io/isort/) and [`black`](https://black.readthedocs.io) before submitting.
1. Submit a new pull request, using `dev` as the base branch.
- If your code changes or extends the WireViz YAML syntax, be sure to update the [syntax description document](https://github.com/formatc1702/WireViz/blob/dev/docs/syntax.md) in your PR.
- If your code changes or extends the WireViz YAML syntax, be sure to update the [syntax description document](https://github.com/wireviz/WireViz/blob/dev/docs/syntax.md) in your PR.
1. Please include in the PR description (and optionally also in the commit message body) a reference (# followed by issue number) to the issue where the suggested changes are discussed.

### Hints
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ Output file:
![Sample output diagram](../examples/demo01.png)
[Bill of Materials](../examples/demo01.bom.tsv) (auto-generated)
[Bill of Materials](../examples/demo01.tsv) (auto-generated)
### Demo 02
![](../examples/demo02.png)
[Source](../examples/demo02.yml) - [Bill of Materials](../examples/demo02.bom.tsv)
[Source](../examples/demo02.yml) - [Bill of Materials](../examples/demo02.tsv)
### Syntax, tutorial and example gallery
Expand Down Expand Up @@ -133,7 +133,7 @@ Depending on the options specified, this will output some or all of the followin
mywire.gv GraphViz output
mywire.svg Wiring diagram as vector image
mywire.png Wiring diagram as raster image
mywire.bom.tsv BOM (bill of materials) as tab-separated text file
mywire.tsv BOM (bill of materials) as tab-separated text file
mywire.html HTML page with wiring diagram and BOM embedded
```

Expand Down
4 changes: 2 additions & 2 deletions docs/buildscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
The following text is taken from #118
https://github.com/formatc1702/WireViz/pull/118
https://github.com/wireviz/WireViz/pull/118

TODO: write a better explaination -->

Expand All @@ -26,7 +26,7 @@ Possible group names:
- `tutorial` to process`tutorial/{readme.md,tutorial*.*}`
- `demos` to process`examples/demo*.*`

Affected filetypes: `.gv`, `.bom.tsv`, `.png`, `.svg`, `.html`
Affected filetypes: `.gv`, `.tsv`, `.png`, `.svg`, `.html`


## Usage hints
Expand Down
3 changes: 2 additions & 1 deletion docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ If any component is defined in the `connectors` or `cables` sections but not ref
# If no value is specified for 'title', then the
# output filename without extension is used.
```
See [HTML Output Templates](../src/wireviz/templates/) for how metadata entries can be inserted into the HTML output.

## Options

Expand Down Expand Up @@ -499,7 +500,7 @@ The following colors are understood:
- `GD` ![##ffcf80](https://via.placeholder.com/15/ffcf80/000000?text=+) (gold)

<!-- color list generated with a helper script: -->
<!-- https://gist.github.com/formatc1702/3c93fb4c5e392364899283f78672b952 -->
<!-- https://gist.github.com/17o2/3c93fb4c5e392364899283f78672b952 -->

It is also possible to specify colors as hexadecimal RGB values, e.g. `#112233` or `#FFFF00:#009900`.
Remember quoting strings containing a `#` in the YAML file.
Expand Down
8 changes: 4 additions & 4 deletions examples/demo01.bom.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading