Armada gRPC API python client
Project description
Armada Python Client
How To Use This Application
These instructions are intended for end-users. If you wish to develop against armada_client, please see our documentation on contributing
- Click on armada_client.
- Read the file CONTRIBUTING.md
- Click here get an overview of Armada client libraries
Python client wrapping the gRPC services defined in submit.proto
and events.proto
; allows for
- submitting, cancelling, and re-prioritising jobs, and
- watching for job events.
Build
Prerequisites:
For building the python client:
In the repo level, run make python
then cd client/python
and lastly run pip install .
to install the client from git with all necessary dependencies.
- pyenv
- Sets up local python environment for supporting multiple python environments
- Set up a local python 3.9 environment
- pip
- Package is defined by pyproject.toml
pip install .
will pull dependencies and install based on pyproject.toml
- tox
tox -e format
will check formatting/linter for your code according to default black settings and flake8tox -e py39
will run unit tests with your default python 3.9 environment
- Auto formatting
tox -e format-code
will run black formatter on client and testing code.
CI
We use tox for running our formatting and testing jobs in github actions.
Testing
gRPC requires a server to start so our unit tests are not true unit tests. We start a grpc server and then our unit tests run against that server.
poetry run pytest tests/unit/test_client.py
This is just a simple test that starts a grpc server in the background and verifies that we can call the client.
Releasing
This is to be automated.
Manual Release:
Log into the Armada-GROSS account on PyPI.
Generate the API tokens and copy those tokens to ~/.pypirc.
poetry build
poetry run twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file armada_client-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: armada_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 69.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bcb777bdc2228717ea1633caac632e03b9b2c390eae0cc978d8506a841dcf2e9
|
|
MD5 |
3fda921a91f39c7b05082c81ad6a5ed6
|
|
BLAKE2b-256 |
7c2daeeda45d56eb9a8d71412c51209946a9b6d13e6cf55c43bb351f1b8cb10d
|