Add Churn Explorer Streamlit app, Docker image and CI - #3
Merged
Merged
Conversation
- src/churn_app: batched parquet/csv loading (path, bytes, upload) with date-range and deterministic user sampling, schema validation, PII dropping, normalisation, EventFilter, ever/horizon churn labels, leakage-safe user features, sklearn models with balanced-accuracy threshold tuning, deterministic synthetic data generator (+ CLI) - app/streamlit_app.py: overview, segments, user drill-down, churn model and data tabs - tests: 103 unit and headless AppTest end-to-end tests, 98% coverage - uv.lock + .python-version, digest-pinned multi-stage non-root Dockerfile with healthcheck, docker-compose - GitHub Actions: lockfile check, ruff, pytest on 3.12/3.13, image build + container smoke test, multi-arch push to GHCR on main/tags - Dependabot, pre-commit, Makefile, README documentation Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/churn_app: an installable package for loading event logs (parquet/CSV from a path, bytes or upload; batched reads with date-range and deterministic user sampling), schema validation, PII dropping, filtering (EventFilter), churn labels (ever / competition horizon), leakage-safe user features, and sklearn models with the threshold tuned for balanced accuracy.app/streamlit_app.py: Overview, Segments, User drill-down, Churn model and Data tabs. Runs on a deterministic synthetic sample, or on the real Kaggle files when they are mounted at/dataor uploaded.AppTestend-to-end runs.Dockerfilewith digest-pinned bases,uv.lock --frozen, a non-root user and a healthcheck.docker-compose.ymlis included.mainand tags it pushes a multi-arch image toghcr.io/martinoor/churn-explorer.Test plan
make lintandmake testpass locally (103 passed)docker buildworks; the container turns healthy, runs as UID 10001 and reads a parquet file mounted at/data🤖 Generated with Claude Code