Skip to content
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

[fix] Minor changes of command line options #167

Closed
kvid opened this issue Sep 13, 2020 · 2 comments
Closed

[fix] Minor changes of command line options #167

kvid opened this issue Sep 13, 2020 · 2 comments
Milestone

Comments

@kvid
Copy link
Collaborator

kvid commented Sep 13, 2020

  1. The current help output:
usage: wireviz.py [-h] [-o OUTPUT] [--generate-bom] [--prepend-file YAML_FILE]
                  YAML_FILE

It seems, however, that the current implementation ignores --generate-bom, and I suggest we comment out that parser.add_argument() code line until it gets implemented to avoid any confusion.

Originally posted by @kvid in #111 (comment)

  1. I also suggest adding an optional -b BRANCH argument to build_examples.py to enable comparing to and restoring from any branch or commit. That will help when e.g. reversing an unfortunate commit of generated files.

  2. I have noticed that I quite often by a mistake write build_examples.py diff instead of build_examples.py compare - probably because I'm used to the git diff command. I therefore consider renaming the compare command to diff or create an alias so both commands will work. What are your opinions?

@kvid
Copy link
Collaborator Author

kvid commented Oct 10, 2020

I also suggest including a -V command line option (and --version as an alias) to both wireviz.py and build_examples.py that output version information. In #157 -v was suggested, but that is often used for verbose mode, and both python and dot use -V for version information.

I suggest specifying the version number in __init__.py as done e.g. in the howdoi project. It is then important to not include code that import anything in the same file to avoid any issues when the file is also imported in setup.py.

I know you have argued against feature creep in #101 (comment), but I still feel this feature is important to include in v0.2 to later make it easy to identify the version in use when more than one version has been released. I'm sorry I didn't suggest this much earlier.

@formatc1702
Copy link
Collaborator

formatc1702 commented Oct 10, 2020

I 100% agree it's a good time to add version output now, so I am willing to include this in v0.2! Ideally we could get the version number from setup.py to avoid any discrepancies.

I don't mind changing compare to diff either.

Commenting out unused lines is perfectly reasonable.

Regarding the -b BRANCH option... feel free to implement it if you wish, you are probably the one who is using this feature most, and I don't mind having that option. I am not sure how hard it would be to implement/test this, so perhaps it is wise to do this as a separate PR that can be added at a later date in v >= 0.3. Up to you.

kvid added a commit to kvid/WireViz that referenced this issue Oct 10, 2020
Adding an optional -b BRANCH argument to build_examples.py to enable
comparing to and restoring from any branch or commit. That will help
when e.g. reversing an unfortunate commit of generated files.

This solves part 2 of issue wireviz#167.
kvid added a commit to kvid/WireViz that referenced this issue Oct 10, 2020
When used to "git diff", it is easy to write "build_examples.py diff"
instead of "build_examples.py compare" by a mistake. Therefore,
"diff" is now an alias to "compare" so both commands will work.

This solves part 3 of issue wireviz#167.
kvid added a commit to kvid/WireViz that referenced this issue Oct 10, 2020
It seems, that the current implementation ignores --generate-bom,
and that parser.add_argument() code line is therefore commented
out until it gets implemented to avoid any confusion.

This solves part 1 of issue wireviz#167.
kvid added a commit to kvid/WireViz that referenced this issue Oct 10, 2020
Add -V command line option (and --version as an alias) to
both wireviz.py and build_examples.py that show version number.

Move the version number from setup.py into __init__.py to access
the same version number specification from all files needing it.

This solves part 4 of issue wireviz#167.
@formatc1702 formatc1702 added this to the v0.2 milestone Oct 11, 2020
formatc1702 pushed a commit that referenced this issue Oct 11, 2020
Adding an optional -b BRANCH argument to build_examples.py to enable
comparing to and restoring from any branch or commit. That will help
when e.g. reversing an unfortunate commit of generated files.

This solves part 2 of issue #167.
formatc1702 pushed a commit that referenced this issue Oct 11, 2020
When used to "git diff", it is easy to write "build_examples.py diff"
instead of "build_examples.py compare" by a mistake. Therefore,
"diff" is now an alias to "compare" so both commands will work.

This solves part 3 of issue #167.
formatc1702 pushed a commit that referenced this issue Oct 11, 2020
It seems, that the current implementation ignores --generate-bom,
and that parser.add_argument() code line is therefore commented
out until it gets implemented to avoid any confusion.

This solves part 1 of issue #167.
formatc1702 pushed a commit that referenced this issue Oct 11, 2020
Add -V command line option (and --version as an alias) to
both wireviz.py and build_examples.py that show version number.

Move the version number from setup.py into __init__.py to access
the same version number specification from all files needing it.

This solves part 4 of issue #167.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants