Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/refactor/big-refactor' into Ju…
Browse files Browse the repository at this point in the history
…mpers_reimp
  • Loading branch information
tobiasfalk committed Jul 8, 2024
2 parents 5905041 + 1da0b0f commit 23e7737
Show file tree
Hide file tree
Showing 99 changed files with 13,184 additions and 12,247 deletions.
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
42 changes: 21 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]
python-version: ["3.8", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Create Examples
run: PYTHONPATH=$(pwd)/src:$PYTHONPATH cd src/wireviz/ && python build_examples.py
- name: Upload examples, demos, and tutorials
uses: actions/upload-artifact@v2
with:
name: examples-and-tutorials
path: |
examples/
tutorial/
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Create Examples
run: PYTHONPATH=$(pwd)/src:$PYTHONPATH python src/wireviz/tools/build_examples.py
- name: Upload examples, demos, and tutorials
uses: actions/upload-artifact@v2
with:
name: examples-and-tutorials
path: |
examples/
tutorial/
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
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
2 changes: 1 addition & 1 deletion docs/buildscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions examples/demo01.gv

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

275 changes: 142 additions & 133 deletions examples/demo01.html

Large diffs are not rendered by default.

Binary file modified examples/demo01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
273 changes: 141 additions & 132 deletions examples/demo01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions examples/demo01.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
metadata:
title: demo01

connectors:
X1:
type: D-Sub
subtype: female
pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
loops:
- [7,8]
X2:
type: Molex KK 254
subtype: female
Expand Down
10 changes: 5 additions & 5 deletions examples/demo02.gv

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

Loading

0 comments on commit 23e7737

Please sign in to comment.