Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test instructions #365

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lumigator/python/mzai/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ uv sync --dev && \
source .venv/bin/activate
```

## Test instructions

The backend needs to retrieve the location of the database used in tests via the `SQLALCHEMY_DATABASE_URL` enviroment variable. For simplicity, an SQLite inside the test container is used. To run the tests, please use:
javiermtorres marked this conversation as resolved.
Show resolved Hide resolved

```bash
SQLALCHEMY_DATABASE_URL=sqlite:///local.db uv run pytest
```

## Data models

As an engineer/contributor, when you change a data model or add a new model which needs to be
Expand Down
20 changes: 19 additions & 1 deletion lumigator/python/mzai/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,26 @@ or
uv pip install lumigator-sdk
```


Now that you have the SDK installed, you can use it to communicate with Lumigator. You can run the
[example notebook](/notebooks/walkthrough.ipynb) for a platform API walkthrough, or follow the
[quickstart guide](https://mozilla-ai.github.io/lumigator/get-started/quickstart.html) in the
documentation.

## Test instructions

The SDK contains both unit tests (requiring no additional containers) and integration tests (requiring a live lumigator backend). By default only unit tests are run.
javiermtorres marked this conversation as resolved.
Show resolved Hide resolved

To run unit tests, please use:

```bash
uv run pytest
```

To run integration tests, please use:

```bash
pushd ../../../../ # go back to the project root
make start-lumigator-build # wait until all containers are up and running
popd
uv run pytest -o python_files="int_test_*.py"
```
javiermtorres marked this conversation as resolved.
Show resolved Hide resolved