Skip to main content

Reasoner CLI

Local development

To run locally:

uv run python -m src.reasoner.cli upload --path=/path/to/docs

Building for pip

uv pip sync pyproject.toml
uv run python -m build
uv run pip install --editable .

# this will install into a temporary location e.g. /Users/username/.pyenv/versions/3.12.7/bin/reasoner

Publishing to pypi

python3 -m build

# publish onto pypi
python3 -m twine upload dist/*

# publish onto testpypi
python3 -m twine upload --repository testpypi dist/*

# to install via testpypi
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple reasonercli

Building standalone executable

uv pip sync pyproject.toml
uv run pyinstaller --clean --onefile --name reasoner entry.py

cd dist
./reasoner

Testing with older versions of python

pipenv --python 3.8 shell
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple reasonercli
reasonercli auth

Automated Testing

Unit Tests

To run the unit tests locally, run the following command

pytest

You can also run the unit tests in docker container, which emulates what happens when you push a branch

./scripts/build_test_image.sh
./scripts/run_test_suite.sh

Smoke Tests

Smoke tests take a long time to run, so it's recommended to run them when you make major changes and when you are cutting a new version of the SDK.

To add your version new version to the smoke test rotation, built a wheel following the the instructions above and add it to tests/integration/sdk_versions.

Then run the following commands to create a smoketest docker container and run the smoke tests. Warning: smoke tests can take longer than 10 minutes to run!

You will need to point to a specific environment determined by the environment variables you set when running the scripts

./scripts/build_smoketest_image.sh

REASONER_API_KEY=<your-api-key> REASONER_BASE_URL=<api-environment-url> ./scripts/run_smoke_test_suite.sh

Metadata

Release files for reasonercli 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reasonercli 0.9.0
File Size Uploaded
reasonercli-0.9.0.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reasonercli 0.9.0
File Interpreter ABI Platform
reasonercli-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / reasonercli-0.9.0.tar.gz

Download URL reasonercli-0.9.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d4f625c8944017162a896628ca42183062397cc03c2c06590fe87cfcd124820
BLAKE2b-256 checksum
How to use checksums
22d5a8b9e38002b688ff2f1b563e81fd83928e618f3fc2fcf76c77fd46d9b611
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / reasonercli-0.9.0-py3-none-any.whl

Download URL reasonercli-0.9.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e212e2b5d7854c4393c4940941f723aba55c5b4af4b1e6e14643644521b86003
BLAKE2b-256 checksum
How to use checksums
cd00e4c12b608281f70943e9cd29f80a4f5a1d52e4182116c780a429e79f89df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page