dmyersturnbull / tyrannosaurus

Generate beautifully modern (2021+) Python projects with seamless, GitHub-based CI/CD, Docker and Conda support, and out-of-the-box integration with >30 best-practices tools and standards.
https://pypi.org/project/tyrannosaurus/
Apache License 2.0
91 stars 7 forks source link

--version doesn't wok #217

Open vladistan opened 4 months ago

vladistan commented 4 months ago

0.10.4

MacOS Sonoma 14.5

-- Issue

Observed behavior:

Running tyrannosaurus --version produces an error

$ tyrannosaurus --version
Usage: tyrannosaurus [OPTIONS] COMMAND [ARGS]...
Try 'tyrannosaurus --help' for help.
╭─ Error ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Missing command.                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

despite the fact that --help lists it as a valid option

$ tyrannosaurus --help

 Usage: tyrannosaurus [OPTIONS] COMMAND [ARGS]...

 Tyrannosaurus. Tyrannosaurus can create new modern Python projects from a template and synchronize metadata
 across the project.

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version                     Write version and exit                                                          │
│ --info                        Write info and exit (same as 'tyrannosaurus info')                              │
│ --install-completion          Install completion for the current shell.                                       │
│ --show-completion             Show completion for the current shell, to copy it or customize the              │

Also --info doesn't work when given as an option

$ tyrannosaurus --info
Usage: tyrannosaurus [OPTIONS] COMMAND [ARGS]...
Try 'tyrannosaurus --help' for help.
╭─ Error ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Missing command.                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

The only thing that works is tyrannosaurus info

$ tyrannosaurus info
Tyrannosaurus v0.10.4 (2020-09-25)

Expected behavior

Tyranosaurus version should work as stated in the help

$ tyrannosaurus --version
Tyrannosaurus v0.10.4 (2020-09-25)

Additional problems

Why info is a both a command and an option?

dmyersturnbull commented 4 months ago

Thanks for reporting!

I haven't been maintaining this because I've been prototyping a replacement at dmyersturnbull/cicd. It's massively better, and I've been using it in several projects. If you're starting a new project, I recommend cloning that repository and modifying as you see fit.

Most GitHub workflows are broken, but you can extract the pytest job. Alternatively, modify an example workflow.

Changes: