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
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Sync (dev + collector + deep)
run: uv sync --group dev --extra collector --extra deep
- name: Lint
run: uv run ruff check .
- name: Format check
run: uv run ruff format --check .
- name: Type check
run: uv run mypy src/
- name: Tests (unit)
run: uv run pytest -q -m "not integration"
- name: Build package
run: uv build

web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm run build
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs

# Build the MkDocs site and publish it to the gh-pages branch (GitHub Pages).
# Deploys only from main (i.e. on a release merge) or when run manually — never
# from develop, so published docs always match a released state.
on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Sync docs deps
run: uv sync --group docs
- name: Build and deploy
run: uv run mkdocs gh-deploy --force
86 changes: 86 additions & 0 deletions .github/workflows/workflow-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish

# Cut a release by pushing a version tag (e.g. v0.1.0). This builds the Python
# distributions and publishes them to PyPI with a Trusted Publisher (OIDC, no
# stored token), builds and pushes the collector + dashboard images to GHCR, and
# creates the GitHub release.
on:
push:
tags: ["v*"]

jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Build sdist + wheel
run: uv build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

pypi:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
# Trusted Publishing requires the id-token permission; no API token is stored.
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

images:
name: Build & push images (GHCR)
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Collector image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/daskgenie-collector:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/daskgenie-collector:latest
- name: Dashboard image
uses: docker/build-push-action@v6
with:
context: ./web
file: ./web/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/daskgenie-web:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/daskgenie-web:latest

release:
name: GitHub release
needs: [pypi, images]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Run `uv run pre-commit install` once, then these run on every commit.
# Local/system hooks use the project's own pinned tool versions via uv, so
# there's no drift between pre-commit and CI.
repos:
- repo: local
hooks:
- id: ruff-format
name: ruff format
entry: uv run ruff format
language: system
types: [python]
- id: ruff
name: ruff check
entry: uv run ruff check --fix
language: system
types: [python]
- id: mypy
name: mypy
entry: uv run mypy src/
language: system
types: [python]
pass_filenames: false
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Changelog

All notable changes to this project are documented here. The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.1.0]

### Added

- **Deep memory profiling** with memray driven as a library: per-source-line
high-water-mark attribution and full call stacks for a per-worker flamegraph /
memray-style tree. Opt-in `deep=True`; degrades to lightweight sampling where
memray isn't available.
- **Real-time dashboard** (Next.js) streaming over WebSocket: live Workers table,
global + per-worker task stream, whole-graph canvas DAG, memory-over-time with
a click-to-inspect spike explorer, per-layer allocations over time, and the
deep flamegraph. Collapsible sidebar, in-app modals, Dask warm palette + logo.
- **TimescaleDB** backend (hypertables) as the default collector store behind a
`StoreProtocol`, with SQLite kept for local use and tests. Prometheus
`/metrics` retained.
- **Worker-death post-mortem** joining suspect tasks with chunk metadata and the
allocation lines at the high-water mark.
- **Origin tracking** — each run records the client hostname and IP.
- **Examples** across Dask: distributed/deep OOM demos, a minutes-long pipeline,
a self-limiting crash, and one per collection type (`dask.delayed`,
`dask.dataframe`, `dask.bag`, xarray on Zarr and NetCDF).
- Packaging (PyPI metadata, MIT license), CI, and release workflows.

[Unreleased]: https://github.com/polymood/DaskGenie/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/polymood/DaskGenie/releases/tag/v0.1.0
Loading
Loading