* Format all files using autopep8 to add basic PEP8 conformity.
* Add Exception types to bare excepts to prevent catching `ctrl+c`
* Remove some unnecessary assignment to dummy variables before returning
* Add `Optional` to type hints that can be `NoneType`
* Change a number of single-letter variables to more descriptive names
* Replace string.format() use with Python's f-strings, as they tends to be cleaner, and provide a performance boost.
* One multiline string was left as string.format() as I do not believe f-strings support multiline
* Some of the string.format() instances had unused/ignored arguments. I left them out of the f-strings, but I marked those cases with a comments that begins `# FIXME:`
* Rename variables that were shadowding python standard functions (specifically `format->fmt`, `input->inp`, `type->maintype`)
* Some instances of `type` were not changed, as it breaks the yaml parsing. Needs to be looked into.
* Move classes in `wireviz.py` to two new files `DataClasses.py` and `Harness.py`.
Co-authored-by: Daniel Rojas <github@danielrojas.net>
- Allow prepending a separate YAML file for e.g. including common
template definitions. This is accomodated by a new commandline option,
--prepend-file, which takes a path to a YAML file. This is prepended
to the regular input as-is.
- Refactor file loading to accomodate the above. This includes moving
relevant parts to main() and instead supplying parse () with a string
representation of the YAML data. Also add early file existance checks
and bail out if any of the inputs are inaccessible or nonexistant.
There are hard copies of the graphviz and pyyaml dependencies included
in the repo. Remove these.
Sort out installation and dependency handling by writing a functional
setup.py script. Rename top level documentation. Refactor wireviz.py
slightly to allow it to run as an installed script.
# Conflicts:
# src/batch.py
# src/wireviz/batch.py
# src/wireviz/build_examples.py