-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adds extensive CLI documentation
The CLI has lacked extensive documentation for most part and that leaves its users confused about its usage. This commit attempts to solve that problem by adding some elaborate docstrings to the commands with examples such that the users can figure out things by reading it.
- Loading branch information
1 parent
aa3f36b
commit 00effe6
Showing
149 changed files
with
1,303 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contribution Guidelines | ||
## Setup your development environment | ||
|
||
The project uses [pipenv](https://pipenv.pypa.io/en/latest/) for | ||
development. It needs to be installed to setup the development environment. | ||
|
||
``` bash | ||
pip install pipenv | ||
``` | ||
|
||
Once Pipenv is installed, a Python virtual environment can be quickly | ||
bootstrapped by running the following commands in the root of the repository. | ||
|
||
``` bash | ||
pipenv install --dev | ||
``` | ||
|
||
This will create a virtual environment in the Pipenv's preconfigured location | ||
(if one doesn't already exists). It will also install all the dependencies and | ||
`riocli` package in the location. | ||
|
||
To run the CLI (or any command) under the context of Pipenv's virtual | ||
environment, prepend the commands with `pipenv run` | ||
|
||
```bash | ||
pipenv run rio | ||
``` | ||
|
||
To run the RIO CLI from the source directly, you can use `riocli` module | ||
directly. | ||
|
||
``` bash | ||
pipenv run python -m riocli | ||
``` | ||
|
||
New dependencies can be installed directly using `pipenv`. This modifies the | ||
`Pipfile` and `Pipfile.lock`. | ||
|
||
``` bash | ||
pipenv install {dependency} | ||
``` | ||
|
||
But using the `pipenv` directly doesn't sync the dependencies in the | ||
`setup.py` file. For this, the project uses a utility called `pipenv-setup` | ||
which allows us to sync the dependencies. | ||
|
||
``` bash | ||
pipenv run pipenv-setup sync | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,61 @@ | ||
# Rapyuta CLI | ||
# rapyuta.io CLI | ||
|
||
Rapyuta CLI exposes features of Rapyuta.io platform on the command-line. | ||
The rapyuta.io CLI exposes features of the rapyuta.io cloud platform on the command-line. | ||
|
||
The application is written in Python 3 and it is distributed through PyPI for | ||
Python 3 environments. | ||
The application is written in Python 3, and it is distributed through PyPI for Python 3 environments. | ||
|
||
For Reference on directory structure please refer Please have a look at the | ||
corresponding article: | ||
http://gehrcke.de/2014/02/distributing-a-python-command-line-application/ | ||
|
||
## Install | ||
## Installation | ||
|
||
Rio CLI is available on PyPI index and can be installed directly by running the | ||
following command. | ||
### Installing the `AppImage` | ||
|
||
``` bash | ||
pip install rapyuta-io-cli | ||
You can install the latest `AppImage` using the following command. | ||
|
||
```bash | ||
curl -fSsL https://cli.rapyuta.io/install.sh | bash | ||
``` | ||
|
||
> Note: The `AppImage` is a self-contained executable that can be run on any Linux distribution. | ||
However, it is not supported for non-Linux systems. | ||
|
||
### Installing via `pip` | ||
|
||
```bash | ||
pip install rapyuta-io-cli | ||
``` | ||
|
||
On Unix-like systems it places the `rio` executable in the user's PATH. On | ||
Windows it places the `rio.exe` in the centralized `Scripts` directory | ||
which should be in the user's PATH. | ||
|
||
### Installing from source | ||
|
||
To install the CLI from source, you can use the `setup.py` script directly. | ||
Clone the repository and from the root of the directory, run the following | ||
command. | ||
|
||
``` bash | ||
```bash | ||
git clone git@github.com:rapyuta-robotics/rapyuta-io-cli.git | ||
cd rapyuta-io-cli | ||
python setup.py install | ||
``` | ||
|
||
## Getting Started | ||
|
||
To begin using the CLI, it must be authenticated with the Platform. | ||
|
||
``` bash | ||
rio auth login | ||
``` | ||
|
||
The Email and Password can either be given through flags (for scripting | ||
purposes) or interactively through the Prompts. | ||
|
||
NOTE: Entering password as a Flag is not recommended because it leaves the | ||
Traces. | ||
To begin using the CLI, it must be authenticated with rapyuta.io. | ||
|
||
## Development | ||
|
||
Rio CLI project uses [Pipenv](https://pipenv.pypa.io/en/latest/) for | ||
development. It needs to be installed to setup the development environment. | ||
|
||
``` bash | ||
pip install pipenv | ||
``` | ||
|
||
Once Pipenv is installed, a Python virtual environment can be quickly | ||
bootstrapped by running the following commands in the root of the repository. | ||
|
||
``` bash | ||
pipenv install --dev | ||
``` | ||
|
||
This will create a virtual environment in the Pipenv's preconfigured location | ||
(if one doesn't already exists). It will also install all the dependencies and | ||
`riocli` package in the location. | ||
|
||
To run the CLI (or any command) under the context of Pipenv's virtual | ||
environment, prepend the commands with `pipenv run` | ||
|
||
```bash | ||
pipenv run rio | ||
``` | ||
|
||
To run the RIO CLI from the source directly, you can use `riocli` module | ||
directly. | ||
|
||
``` bash | ||
pipenv run python -m riocli | ||
rio auth login | ||
``` | ||
|
||
New dependencies can be installed directly using `pipenv`. This modifies the | ||
`Pipfile` and `Pipfile.lock`. | ||
The `email` and `password` can either be given through flags (for scripting purposes) or interactively through the prompt. | ||
|
||
``` bash | ||
pipenv install {dependency} | ||
``` | ||
> Note: Entering the password as a flag is not recommended because it leaves the traces. | ||
But using the `pipenv` directly doesn't sync the dependencies in the | ||
`setup.py` file. For this, the project uses a utility called `pipenv-setup` | ||
which allows us to sync the dependencies. | ||
Once set up, run `rio --help` to see the available commands. | ||
|
||
``` bash | ||
pipenv run pipenv-setup sync | ||
``` | ||
## References | ||
* [Development Guide](CONTRIBUTING.md) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.