Couple of usability improvements and cert config path fix (#49)
This commit is contained in:
parent
c03568e408
commit
3b420a5c41
@ -10,6 +10,11 @@ Requires [poetry](https://github.com/python-poetry/poetry).
|
||||
|
||||
Install python dependencies with `poetry install`.
|
||||
|
||||
Recommended updates to your .bashrc/zshrc:
|
||||
|
||||
1. `export PATH="export PATH="<path-to-infra-repo>/op-conductor-ops:$PATH""`
|
||||
2. `export CONDUCTOR_CONFIG="<path-to-op-conductor-ops-config.toml>"`
|
||||
|
||||
## Usage
|
||||
|
||||
After installing dependencies with `poetry`, the tool can be invoked with `./op-conductor-ops`,
|
||||
|
@ -7,6 +7,9 @@ def read_config(config_path: str) -> tuple[dict[str, Sequencer], str]:
|
||||
config = toml.load(config_path)
|
||||
|
||||
cert_path = config.get('cert_path', "")
|
||||
# if cert path is relative, pre-pend the config path
|
||||
if not cert_path.startswith('/'):
|
||||
cert_path = f"{config_path.rsplit('/', 1)[0]}/{cert_path}"
|
||||
|
||||
# load sequencers into a map
|
||||
sequencers = {}
|
||||
|
@ -1,3 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# cd to the directory of the script
|
||||
cd "$(dirname "$0")"
|
||||
poetry install --no-interaction --quiet
|
||||
poetry run python op-conductor-ops.py "${@}"
|
||||
|
Loading…
Reference in New Issue
Block a user