Commit 7f9bf0e2 authored by Yannick's avatar Yannick
Browse files

use __main__ to simply cli call

parent 7745cd3d
Pipeline #71834 failed with stages
in 29 minutes and 25 seconds
...@@ -2,14 +2,14 @@ WDMS client CLI ...@@ -2,14 +2,14 @@ WDMS client CLI
# Usage example # Usage example
`python -m wdms_client.cli --help` to list available commands. `python -m wdms_client --help` to list available commands.
## list callable apis ## list callable apis
Callable apis can be listed using command `list`: Callable apis can be listed using command `list`:
``` ```
:$ python -m wdms_client.cli list :$ python -m wdms_client list
available apis: available apis:
- crud.well.get_well - crud.well.get_well
...@@ -27,7 +27,7 @@ available apis: ...@@ -27,7 +27,7 @@ available apis:
Describe environment variables using command `show-env`. Can pass an environment file: Describe environment variables using command `show-env`. Can pass an environment file:
``` ```
:$ python -m wdms_client.cli show-env "..\..\my_environment.json" :$ python -m wdms_client show-env "..\..\my_environment.json"
environments variables given environment C:\SRC\opengroup\wellbore-domain-services\tests\integration\functional\my_environment.json environments variables given environment C:\SRC\opengroup\wellbore-domain-services\tests\integration\functional\my_environment.json
- base_url = http://127.0.0.1:8080/api/os-wellbore-ddms - base_url = http://127.0.0.1:8080/api/os-wellbore-ddms
...@@ -46,7 +46,7 @@ Use command `descibe` with an `api` and optionally an environment file. It will ...@@ -46,7 +46,7 @@ Use command `descibe` with an `api` and optionally an environment file. It will
``` ```
python -m wdms_client.cli describe crud.well.create_well --environment="..\..\my_environment.json" python -m wdms_client describe crud.well.create_well --environment="..\..\my_environment.json"
============ REQUEST =============== ============ REQUEST ===============
...@@ -80,7 +80,7 @@ body: ------------------------------------------- ...@@ -80,7 +80,7 @@ body: -------------------------------------------
Use command `descibe` with an `api` and optionally an environment file. It will run it and print the result: Use command `descibe` with an `api` and optionally an environment file. It will run it and print the result:
``` ```
python -m wdms_client.cli call about --environment="..\..\my_environment.json" python -m wdms_client call about --environment="..\..\my_environment.json"
1 run(s) for about: 1 run(s) for about:
# run 1: # run 1:
...@@ -113,7 +113,7 @@ body: ------------------------------------------- ...@@ -113,7 +113,7 @@ body: -------------------------------------------
use command `gen-env` to generate a basic environment file. By default, automatically launch editor on the created file. use command `gen-env` to generate a basic environment file. By default, automatically launch editor on the created file.
``` ```
python -m wdms_client.cli gen-env new_environment.json python -m wdms_client gen-env new_environment.json
basic environment file generated in $WORKING_DIR\new_environment.json basic environment file generated in $WORKING_DIR\new_environment.json
``` ```
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
import requests import requests
from wdms_client.variables import Variables, CmdLineSpecialVar from .variables import Variables, CmdLineSpecialVar
from typing import Any, Dict, List from typing import Any, Dict, List
from dataclasses import dataclass, field from dataclasses import dataclass, field
from datetime import datetime from datetime import datetime
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment