haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
372 stars 113 forks source link

Adding option for subcommands #103

Closed joaomcteixeira closed 2 years ago

joaomcteixeira commented 3 years ago

Following the discussion on #102 ,

I implemented an option to allow the user to decide whether to install pdb-tools using subcommands as CLIs or the traditional one-tool one command option.

When installing the user is prompt with this question:

Install [I]ndependent scripts or [S]ubcommands?

Independent gives the usual behaviour. Subcommands gives the behaviour suggested in #102.

pdbtools fetch 12as | pdbtools selchain -B

Writing only pdbtools gives a kind-off help message. (this can be improved)

Note the proposed implementation uses only sys, os, and pathlib. I think we are okay with pathlib because we don't need to grant compatibility with py27 for this.

The current implementation already works. But let us discuss a bit more before merging this.

Cheers.

JoaoRodrigues commented 3 years ago

I really appreciate the work and the idea, but I don't think this will work. How does it play with pip install for example? Also, most people don't know what "sub-commands" are so we'll confuse the users. That said, this is something we can consider for a future version 3 of the tools.