AstuteSource / chasten

:dizzy: Chasten Uses XML and XPATH to Check a Python Program's AST for Specified Patterns!
https://pypi.org/project/chasten/
GNU General Public License v2.0
7 stars 8 forks source link

Provide a `--help` command when calling `chasten` alone #43

Closed CalebKendra closed 11 months ago

CalebKendra commented 1 year ago

Right now when you run the command chasten an error message appears. the chasten command should show chasten --help's output just like other similar programs like pip.

gkapfham commented 12 months ago

Hi @CalebKendra, I think that this is a really good idea! Can you investigate how you would implement this feature? Finally, what type of information would you want to provide? Here is what I see when I type chasten --help:

╭─ Options ─────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current      │
│                               shell.                                  │
│ --show-completion             Show completion for the current shell,  │
│                               to copy it or customize the             │
│                               installation.                           │
│ --help                        Show this message and exit.             │
╰───────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────╮
│ analyze               💫 Analyze the AST of Python source code.       │
│ configure             🪂 Manage chasten's configuration.              │
│ datasette-publish     🌎 Publish a datasette to Fly or Vercel.        │
│ datasette-serve       🏃 Start a local datasette server.              │
│ integrate             🚧 Integrate files and make a database.         │
│ interact              🚀 Interactively configure and run.             │
│ log                   🦚 Start the logging server.                    │
╰───────────────────────────────────────────────────────────────────────╯

what are you seeing? What would you expect? If there is something else that you would want, please document it here.

Jaclynpqc commented 12 months ago

Hi Caleb, just a suggestion. I've seen some tools have this command tool --version. Perhaps we could integrate it into our program too?

gkapfham commented 12 months ago

Hi @Jaclynpqc, yes this is a really good idea. There is #12 that also hints at the need for a --version flag. Can one or both of you find out if the teams wants to implement this feature now and then get started on it?

Jaclynpqc commented 12 months ago

Yes, I could start finding an approach to this feature

gkapfham commented 11 months ago

Hi @Jaclynpqc, thanks! @CalebKendra, please consider whether or not you can help as well.

CalebKendra commented 11 months ago

I will help with the --version after I fix this issue, however, this current issue is my priority

As for the details of this project, I would expect to see the exact same output that you get when inputting chasten --help, when you input chasten, In order to do this I have been experimenting with directing the chasten command without any option selected to point towards the chasten --help command. I am still looking for the cleanest solution to this problem as I do not want to have to re-create the chasten --help menu.