Skip to content

Commit

Permalink
Merge refactored code into dev branch
Browse files Browse the repository at this point in the history
Based on #251
  • Loading branch information
17o2 committed Mar 1, 2025
2 parents 7cf9244 + 67d2bc6 commit 8dfd523
Show file tree
Hide file tree
Showing 159 changed files with 24,890 additions and 19,716 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
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
4 changes: 0 additions & 4 deletions examples/demo01.bom.tsv

This file was deleted.

Loading

0 comments on commit 8dfd523

Please sign in to comment.