Skip to content

Make examples reproducible#169

Closed
sueszli wants to merge 13 commits intopiercefreeman:mainfrom
sueszli:edit
Closed

Make examples reproducible#169
sueszli wants to merge 13 commits intopiercefreeman:mainfrom
sueszli:edit

Conversation

@sueszli
Copy link
Contributor

@sueszli sueszli commented Feb 16, 2026

Refactored examples to improve reproducibility.

The existing example_app could not be run due to an Postgres failed to become healthy error and was moved to example/web-app.

Introduced a minimal Postgres bootstrap (~5 LoC, based on https://gist.github.com/sueszli/4165d5e388cf289978ea64fdcda7661b) and added example/demo/demo.py, which supports both a real Postgres instance and the in-memory variant.

Additionally, reproduced the README example as a self-contained uv-inline version in example/tiny-demo.

Copy link
Owner

@piercefreeman piercefreeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal with this PR is to be able to run our example app programmatically, it feels like it has a bit too much overlap with our existing testing infrastructure:

https://github.com/piercefreeman/waymark/blob/main/example_app/Makefile#L21

I would want to make sure we harmonize these and aren't duplicating workflows or pipelines to run this logic.

import asyncio
import os
import sys
from pathlib import Path
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this seems to duplicate the code in workflow.py - is it intended the be the same or different? If the same, we should consolidate them into the same place.

Copy link
Contributor Author

@sueszli sueszli Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it intended the be the same or different?

This version replaces the entire example_app with a minimal backend-only example without a seperate Dockerfile, docker-compose, Makefile, uv.lock, pyproject.toml, .python-version file.

The script itself can either:

@sueszli
Copy link
Contributor Author

sueszli commented Feb 16, 2026

Closing. It's smarter to consolidate into the same place and patch the Makefile first.

Opened new PR: #170

@sueszli sueszli closed this Feb 16, 2026
@sueszli
Copy link
Contributor Author

sueszli commented Feb 16, 2026

Just noticed the behavior here is completely different because we're pulling from PIP and not the latest wheels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants