Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ viron/
│ └── services/ # Business logic
├── src/main/python/ # Python client SDK
├── src/test/java/... # Unit and integration tests
├── src/test/python/... # Python client SDK tests (pytest)
├── db-scripts/ # SQL schema setup scripts, and migrations for existing databases
├── docs/
│ ├── MVP.md # Implementation checklist for MVP
Expand Down Expand Up @@ -152,9 +153,21 @@ or refer to the `docs/openapi/viron-api.json` file.

## 🧪 Testing

Run all unit and integration tests:
Run all Java unit and integration tests:
mvn test

Run the Python client tests (requires Python 3.8+, `requests`, and pytest 7 or newer):
pytest

`pytest.ini` puts the repository root on the path, so the client is imported the same way
from tests as it is from application code (`src.main.python.preponderous.viron...`). The
`pythonpath` setting it uses arrived in pytest 7.0, so the pytest 6.2.4 pinned by
`requirements.txt` ignores it and collection fails; install a newer pytest until that pin is
raised.

Note that CI runs the Java build and tests only — Python client changes are not covered there
and must be checked locally.

---

## 📄 License
Expand Down
6 changes: 4 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[pytest]
pythonpath = ./src/main/python
./src/test/python
# The client and its tests import through the full path from the repository
# root (src.main.python.preponderous.viron...), so the root is what belongs on
# the path.
pythonpath = .
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2024 Preponderous Software
# MIT License

from typing import Optional
from typing import List, Optional
import requests
from src.main.python.preponderous.viron.models.environment import Environment

Expand All @@ -18,7 +18,7 @@ def get_base_url(self) -> str:
def get_auth_headers(self) -> dict:
return {"Authorization": f"Bearer {self.auth_token}"} if self.auth_token else {}

def get_all_environments(self) -> list[Environment]:
def get_all_environments(self) -> List[Environment]:
response = requests.get(f"{self.get_base_url()}", headers=self.get_auth_headers())
response.raise_for_status()
return [Environment(**env) for env in response.json()]
Expand Down
Loading