Install the package
pip install kleinkramRun the CLI
kleinHere are some basic examples of how to use the CLI.
To list all files in a mission:
klein list -p project-name -m mission-nameTo upload all *.bag files in the current directory to a mission:
klein upload -p project-name -m mission-name *.bagIf you would like to create a new mission on upload use the --create flag.
To download all files from a mission and save them out:
klein download -p project-name -m mission-name --dest outYou can additionally specify filenames or ids if you only want to download specific files.
Instead of downloading files from a specified mission you can download arbitrary files by specifying their ids:
klein download --dest out *id1* *id2* *id3*For more information consult the documentation.
Clone the repo
git clone git@github.com:leggedrobotics/kleinkram.git
cd kleinkram/cliSetup the environment
virtualenv -ppython3.8 .venv
source .venv/bin/activate
pip install -e . -r requirements.txtInstall pre-commit hooks
pre-commit installRun the CLI
klein --helpto run unit tests:
pytest -m "not slow"to run all tests (including e2e and integration tests):
pytestFor the latter you need to have an instance of the backend running locally.
See instructions in the root of the repository for this.
On top of that these tests require particular files to be present in the cli/tests/data directory.
These files are automatically generated by the cli/tests/generate_test_data.py script.
You also need to make sure to be logged in with the cli with klein login.