-
Notifications
You must be signed in to change notification settings - Fork 241
Merge refactored code into dev #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`edotor.net` does not seem to like leading underscores, which makes GraphViz debugging difficult.
no diff should ocurr as a result of the refactoring Add `metadata.title` to `demo01.yml` to avoid diffs later when calling via CLI Add temporary loop to `demo01` for debugging purposes Add `cleanup.sh` (maybe move/delete later? or add commit hook?) Deprecate Python 3.7, add Python 3.10 Add `devtools.txt` Add `pyan` to `devtools.txt` Add sample use to `devtools.txt`
Refactor connector node generation Further refactor connector node generation Rebuild demos Generate gauge string inside Cable object WIP: refactor cable node generation Implement HTML indentation WIP More WIP Remove old stuff, slightly simplify code Outsource `gv_pin_table()`, simplify padding Add TODOs Outsource `set_dot_basics()` and `apply_dot_tweaks()` Make setting HTML tag attributes easier through `kwargs` Fix and simplify bgcolor logic Reactivate cable edge generation Outsource `gv_edge_wire()` Make connecting things more object-oriented Alphabetize HTML tags, improve bgcolor rendering Make mates object-oriented Run `autoflake -i` Run `autoflake -i --remove-all-unused-imports` Streamline assignment of ports to simple connectors Implement color objects Use color objects in WireViz Re-sort `wv_colors.py` Make green color darker Break longer lines not caught by `black` because they were unbroken strings or comments Make variable name more expressive Apply dot tweaks last Remove unused line Improve subclassing of components, prepare for BOM refactoring Clean up Include nested additional components in BOM do not add autogenerated designators to BOM Improve BOM generation (TODO: wires from a bundle) Prepare `harness.populate_bom()` Change `description` to `type` in additional BOM item YAML Define CLI epilog str in single statement Rename modules, adjust imports, move `build_examples.py` Restructure and update `.gitignore` Clarify `wireviz.parse()` input types Implement BOM population (missing: qty multipliers) Make `pin_objects` and `wire_objects` dictionaries Compute qty's of additional components (WIP) Add qty test file Adapt `tutorial08.yml` (remove `unit` field) Add `tabulate` to dependency list (might remove later if not needed) Sort BOM by category, assign BOM IDs Rename `Options.color_mode` to `.color_output_mod` for consistency Change BOM output file extension from `.bom.tsv` to `.tsv` Implement BOM bubbles Stop recursive nesting of additional components Add BOM bubble to additional component list (WIP) Fix gauge conversion Fix line breaks in code Optimize BOM bubble geometry Implement pin color output Small issue: GraphViz warning ``` Warning: table size too small for content ``` Add some test files to `tests/` directory Update test files Allow multiple colors for components Implement multiple colors for components, improve multicolor table rendering Fix color cell implementation Fix node background color rendering Add test file for node and title bgcolors WIP: BOM modes Add TODO for empty connector pin tables Comment out BOM modes (WIP) and BOM bubbles Resume work on BOM Include part number info in BOM table Fix BOM output in TSV and HTML Add bundles' wires' part number info to BOM Add TODOs Implement bundle part number rendering Improve conductor table rendering Fix additional component BOM table layout Disable CLI BOM output Add suggestions from #246 Add suggestions from #186 Add .vscode/ to .gitignore Fix PyLance problems Update interim version number Fix zero-size cell for simple connectors without type Implement additional parameters dict for components Implement note for additional components Thicken additional component table Add placeholder for add.comp. PN info Apply black
It seems "-dev" (normalized to ".dev") should only be directly followed by a number for different deveopment releases of the same version. See full description: https://peps.python.org/pep-0440/
Complementary changes to the commit with the same title earlier in the same PR. Avoid refering to the old filenames.
Allow absent "prefix" in group entries to simplify the code
Bug: 0x112233:0x445566 in YAML input didn't convert such colors to #112233:#445566 and the strings where just passed as uppercase to the .gv file. Hence Graphviz printed warnings about unknown colors and used black as color instead. Add test for int as string. Re-ordered if statements to give an exception when a color has an unknown type.
#251 (comment) No output changed for any examples/tutorial/tests input.
…utils.py` Remove unused attribute Remove unused `&&` in GitHub workflow Remove duplicate `category` attribute Removed from `Connector` class since it is already defined in the `Component` superclass. Remove unnecessary casting of `int` to `float` #251 (comment) Continue work on BOM handling (WIP)
Use version from v0.4.1 master branch. Fix missing link to v0.4.1 (L8) so it's not forgotten.
Co-authored-by: Jeremy Ruhland (hatchery) <jeremy@goopypanther.org> squash me
Co-authored-by: kvid <kvid@users.noreply.github.com>
This happened to be a regression for WireViz-Web [1], which aims to do as much in memory as possible. [1] https://github.com/daq-tools/wireviz-web. kvid rebased and mixed original commit with similar change by Daniel Rojas Co-authored-by: Andreas Motl <andreas.motl@panodata.org> Co-authored-by: kvid <kvid@users.noreply.github.com>
Co-authored-by: kvid <kvid@users.noreply.github.com>
Remove the references in the CLI help, but keep the placeholders elsewhere in the code as a TODO
Co-authored-by: kvid <kvid@users.noreply.github.com>
Running 6 different Python versions (3.7 to 3.12) in parallel now. NOTE: This is in conflict with #309, but can be resolved easily in a later PR. GitHub Actions require an update: - actions/upload-artifact@v3 is scheduled for deprecation on November 30, 2024. - Similarly, v1/v2 are scheduled for deprecation on June 30, 2024. - Updating this comes with a breaking change in upload-artifact@v4: Uploading to the same named Artifact multiple times. Due to how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple Artifacts with different names, or only upload once. Otherwise you will encounter an error. The artifact .zip files therefore have the python version added to their name.
Use ubuntu-22.04 only for Python 3.7-3.8 by including them separately into the matrix.
In Windows might OSError(errno=EINVAL) be raised instead of the already catched exceptions in some cases (depending on the Python version). Suggested fix posted by JarrettR in #344 (comment) Co-authored-by: kvid <kvid@users.noreply.github.com> Co-authored-by: JarrettR <jrainier@gmail.com>
Specify all HTML files under templates folder to be included as package data files.
The CLI handling code was redesigned for v0.4 and it seems the code to assign a default title from v0.3.1 has been messed up. This bug has not been triggered by build_examples.py due to it seems to call the parse() function differently. The output_name should be used as default title when present. This will fix the #360 bug report. Co-authored-by: kvid <kvid@users.noreply.github.com>
The project was moved into the new organization 2023-05-30, but old URLs are still working due to automatic redirects by GitHub. #316 (comment) Co-authored-by: kvid <kvid@users.noreply.github.com>
Fixes #377 (makes HTML output template placeholders more consistent) Co-authored-by: kvid <kvid@users.noreply.github.com>
Work-around to improve the #286 use case. - #286 (comment) - https://stackoverflow.com/questions/70996779/graphviz-edges-between-cells-in-the-same-html-table-are-too-long Co-authored-by: kvid <kvid@users.noreply.github.com>
Might help in reported issues like #342
Raising TypeError is better than assert. (Black reformatted) Co-authored-by: Andreas Motl <andreas.motl@panodata.org>
In Windows might OSError(errno = None) be raised instead of the already catched exceptions in some cases (depending on the Python version) Fixes #391
In Windows might ValueError be raised instead of the already catched exceptions in some cases (depending on the Python version) Fixes point 2 of #318 (review)
Clarify all exceptions catched, including changes in #392 Co-authored-by: kvid <kvid@users.noreply.github.com>
A number of such warnings showed up when running e.g. PYTHONWARNINGS=always python build_examples.py PYTHONWARNINGS=always wireviz ../../examples/demo0?.yml See #309 (comment) Fix: All open() calls should be in a "with open() as x" statement to ensure closing the file when exiting the block in any way. Otherwise, use the new file_read_text() or file_write_text() functions to read or write the whole utf-8 text file and closing it. Co-authored-by: kvid <kvid@users.noreply.github.com>
Co-authored-by: kvid <kvid@users.noreply.github.com>
Yayyyy🗣🗣 |
Perhaps it would make sense to flip it around: force-push this branch onto #251 (so that the discussion there remains part of the merged code) and use a separate branch to preserve the full history. 🤔 |
Time to just do it and move forward with the new code. 💪 |
This was referenced Mar 8, 2025
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is what I have done:
Co-authored-by
info in the commit to preserve original authorshipdev-refactored
branch, which can now be fast-forward-merged intodev
How I envision the next steps:
Figure out why the GitHub build is failing at the momentdev
, so everyone can finally move on to the new codebasePlease share any thoughts you have on this process. If there is no strong argument against it, it will be merged into
dev
and #251 will be closed unmerged (but preserved). Thank you!The following commits are explicitly NOT yet part of the PR and should be added afterwards. I need to look into the code a bit more in-depth to figure out how to implement these changes in the refactored code, but did not want them to hold up the process.