🏁 Kaggle sandbox

hatching Kaggle attempts :]

🏁 Kaggle sandbox

CI complete testing codecov pre-commit.ci status

A small Python 3.10+ template for Kaggle competitions. It keeps a real installable placeholder helper package in src/challenge_xyz/ so shared functions can be used from scripts, notebooks, and Kaggle package resources. Forks should rename challenge_xyz to the competition package name once the project stops being a template. The package is intentionally small: put shared functions there, then import them from multiple Kaggle notebooks.

⚑ Quickstart

Create an environment and install the template:

python -m venv .venv
source .venv/bin/activate
pip install --upgrade uv
uv sync --group dev --extra kaggle

On Kaggle, attach this repository or a built wheel as a resource, then install the helper package from that attached path:

pip install /kaggle/input/<resource-name>

Then import shared helpers from notebook cells:

from challenge_xyz import assert_same_csv_shape, read_csv_shape

For local smoke checks, install the package editable and run tests:

uv sync --group dev
uv run --group dev pytest -q

πŸ—‚οΈ Project Layout

.
β”œβ”€β”€ src/challenge_xyz/  # reusable helper package shared by scripts and notebooks
β”œβ”€β”€ notebooks/          # percent-format notebook scripts with # %% cell markers
β”œβ”€β”€ resources/          # lightweight notes, links, and metadata
β”œβ”€β”€ tests/              # doctests and regression tests for shared helpers
β”œβ”€β”€ data/               # optional local competition files, ignored by git
└── outputs/            # optional local generated files, ignored by git

βš™οΈ Development Checks

uv run --group dev ruff check .
uv run --group dev pytest -q
uv build
uv run --group dev twine check dist/*

For a full local pre-commit pass:

uv run --group dev pre-commit run --all-files

πŸ“‹ Template Checklist

When starting a new competition, update or add:

🌟 Showcases

Some derived projects:

Selected Kaggle notebooks:

Selected writing:

πŸ”— References