Command line tool that allows the user to execute data operations on the platform.
- Python
- Click
- Python 3.7+
- Poetry
-
Install dependencies (optional: run in edit mode).
poetry install # for windows use poetry install --extras "windows" poetry run python app/pilotcli.py --help
-
Add environment variables if needed.
- Create a
.env
file in the root directory of the project. - Sdd following two environmental varibles to the
.env
file.api_url
: the url that the api server is hosted on. default ishttps://api.pilot.indocresearch.com/pilot
keycloak_realm_url
: thr url that the keycloak server is hosted on. default ishttps://iam.pilot.indocresearch.com/realms/pilot
- Create a
-
Navigate to the appropriate directory for your system.
./app/bundled_app/linux/ ./app/bundled_app/mac/ ./app/bundled_app/mac_arm/
./app/bundled_app/linux/pilotcli --help
-
Each system has its own credential, so building should be done after the updated the env file.
-
Run build commands for your system.
Linux example for each environment:
pyinstaller -F --distpath ./app/bundled_app/linux --specpath ./app/build/linux --workpath ./app/build/linux --paths=./.venv/lib/python3.8/site-packages ./app/pilotcli.py -n <app-name>
Note: Building for ARM Mac may require a newer version of
pyinstaller
.Or Windows example:
# remember to remove the poetry.lock file before building for windows rm poetry.lock pyinstaller -F --distpath ./app/bundled_app/windows --specpath ./app/build/windows --workpath ./app/build/windows --paths=./.venv/Lib/site-packages ./app/pilotcli.py -n <app-name>