Core runtime for the Opovid testing library.
Project description
Opovid Python Runtime
This directory contains the Python runtime for Opovid.
The first Python slice ships the framework-agnostic core plus the shared remembered-state ability:
Actorand the preferredUserfacadetask,question, andcheckhelperswith_retryfor wrapping flaky or eventually-consistent tasks- nested execution reports and timeline events
render_timeline,timeline_to_json, andsummarize_failurediagnostics- listener hooks for step boundaries
RememberTheStatefor small actor-local state
Install Locally
From this directory:
python3 -m pip install -e .
Basic Usage
from opovid import Actor, RememberTheState, remembered_by, question, task
casey = Actor.named("Casey").can(RememberTheState.using_defaults())
casey.attempts_to(
task("remembers a subscription", lambda actor: remembered_by(actor).remember("plan", "pro"))
)
plan = casey.asks_for(question("reads the selected plan", lambda actor: remembered_by(actor).recall("plan")))
assert plan == "pro"
Module Layout
The Python runtime follows the same concept boundaries as the TypeScript, Java, and Ruby runtimes:
actor.py,user.py, andattempt_chain.pyown the user/actor flow.task.py,question.py, andcheck.pykeep the executable contracts separate.execution.pyandexecution_options.pyown reports, timelines, errors, listeners, and execution options.timeline.pyowns text/JSON timeline rendering and failure summaries.retry.pyowns retry task wrappers.actor_memory.py,remember_the_state.py, andmemory.pyprovide the shared remembered-state ability.core.pyand__init__.pyare public re-export entrypoints.
The Python runtime does not currently include the scenario spec module available in the TypeScript, Java, and Ruby
runtimes.
Run Tests
From this directory:
PYTHONPATH=src python3 -m unittest discover -s tests
Lint And Format
Ruff is the Python runtime's linter and formatter.
python3 -m pip install -e ".[dev]"
ruff check .
ruff format --check .
Publish
The Python runtime publishes as opovid on PyPI.
Tagged releases are handled by the root GitLab release pipeline. The Python release job builds the source distribution and wheel, checks them with Twine, and uploads with PyPI Trusted Publishing through GitLab OIDC. Configure the PyPI trusted publisher for the sunrise.water/opovid GitLab project, the top-level .gitlab-ci.yml workflow, and the release environment before the first publish.
Browser flows remain intentionally centered in the TypeScript runtime with Playwright. The Python runtime is currently focused on service, request, job, and plain unit/integration flows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opovid-0.1.7.tar.gz.
File metadata
- Download URL: opovid-0.1.7.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08982fc22a79426dcfb47f8724a5a4a2bd37c23c12307e97d7d6590a70067400
|
|
| MD5 |
ecab440ac63b1fad3710d623001a1e4b
|
|
| BLAKE2b-256 |
5d6a19745e28599376c99ec242777b2aa5459a5f6429482f5d6b01181158f1b8
|
File details
Details for the file opovid-0.1.7-py3-none-any.whl.
File metadata
- Download URL: opovid-0.1.7-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfe9f26de98e404fca920ba8cc5fc2a75b9d94ffbd489a25e61d25a32ac2f29b
|
|
| MD5 |
42206c51ef2d94ac933e2a40e614154a
|
|
| BLAKE2b-256 |
0c3ab39dbad469da4fb9b2b90389ee34fa900f115d8464e6aa9e8d2129aacebb
|