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

Removes start-runtime option #44

Merged
merged 2 commits into from
Jun 27, 2020
Merged

Removes start-runtime option #44

merged 2 commits into from
Jun 27, 2020

Conversation

filipesaraiva
Copy link
Contributor

Removes start-runtime command option. This way, we just need to run pade to start the runtime environment by default.

This change doesn't affect other options except for --help: now the user needs to run pade --help to see the help options, because just run pade start the runtime environment.

Relate to #42.

@filipesaraiva filipesaraiva self-assigned this Jun 25, 2020
@filipesaraiva filipesaraiva linked an issue Jun 25, 2020 that may be closed by this pull request
@lucassm
Copy link
Contributor

lucassm commented Jun 27, 2020

@filipesaraiva I think that is a good idea lets the start-runtime command as a default command, when a command is not passed by the user.
But in my view the command start-runtime must exist in order to keep a coherent CLI structure.

@filipesaraiva
Copy link
Contributor Author

I did some research and the way to remain the cmd function and its CLI structure would be implementing a specific class for default group and add the others CLI function to it. That approach was discussed and also recommended by click authors.

Because the authors discussed that, they created a click-default-group module to be imported and used in projects. The example in module page is very easy to understand.

So, may I use that module?

@filipesaraiva
Copy link
Contributor Author

I tested click-default-group module and works good.

There are some additional advantages: if you run without argument the script run the --help option; if run with an argument, it starts the runtime environment; this approach also allows both the use of pade without argument and using the start-runtime argument to do the same thing.

commands of PADE

Now it is possible to start the runtime environment
just running `pade path/to/agent/class`
@lucassm
Copy link
Contributor

lucassm commented Jun 27, 2020

@filipesaraiva I have tested here the modifications and they are working to me, nice!
The pull request has been accepted.
Thanks.

@lucassm lucassm merged commit aa1cf0a into develop Jun 27, 2020
@filipesaraiva filipesaraiva deleted the remove-start-runtime branch June 27, 2020 16:01
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

Successfully merging this pull request may close these issues.

Removes the start-runtime option
3 participants