Skip to content

Modernize deepethogram: Python 3.11, uv, unified Docker, Modal GPU tests#174

Merged
jbohnslav merged 29 commits intomasterfrom
cleanup
Mar 30, 2026
Merged

Modernize deepethogram: Python 3.11, uv, unified Docker, Modal GPU tests#174
jbohnslav merged 29 commits intomasterfrom
cleanup

Conversation

@jbohnslav
Copy link
Copy Markdown
Owner

@jbohnslav jbohnslav commented Aug 11, 2025

Summary

Major modernization of the deepethogram codebase on the cleanup branch.

Python & Packaging

  • Python 3.11 (requires >=3.9, <3.12) — up from 3.8
  • uv replaces Miniconda/pip everywhere (deps, CI, Docker, docs)
  • PyTorch via uv sources with platform-aware indexes (CPU on macOS, CUDA 12.4 on Linux)
  • Relaxed dependency pins (scipy, scikit-learn, pandas, chardet, h5py)
  • Fixed subpackage discovery (setuptools find with deepethogram*)
  • pytorch_lightning==1.6.5 retained (high-risk to change)

Docker

  • Single unified Dockerfile with named targets (gui, headless, full, test-gui, test-headless, test-full)
  • uv instead of Miniconda in all images
  • CUDA runtime instead of devel (smaller images)
  • Fixed .dockerignore (excluded .venv, tests/DATA, caches)
  • ARM-native gui target works on Apple Silicon
  • PySide6 runtime deps fixed (libdouble-conversion3)

Testing

  • GUI integration tests with pytest-qt + Xvfb (9 tests covering all major GUI flows)
  • Modal GPU testing — on-demand T4 GPU via Modal for integration tests ($0.13/run)
  • All 25 non-GPU tests pass natively on macOS
  • All 5 GPU tests pass on Modal
  • test-gui Docker target runs full non-GPU suite under Xvfb

CI/CD

  • Release workflow — version bump in pyproject.toml triggers build + PyPI publish + GitHub Release
  • Claude Code review workflows (auto PR review + @claude interactive)
  • GPU test workflow — manual dispatch via Modal
  • CI modernized to use uv + setup-uv action
  • Ruff target py311

Docs

  • README and installation docs updated for uv-first workflow
  • Legacy Miniconda/pip instructions preserved at bottom

Pre-merge checklist

  • Native CPU tests pass (25/25)
  • Modal GPU tests pass (5/5, $0.13)
  • GUI Docker image builds on ARM Mac
  • Manual GUI smoke test
  • Configure PyPI trusted publishing (post-merge, before version bump)

jbohnslav and others added 24 commits January 12, 2025 17:23
Adopt the kingdom-style release flow: trigger on master pushes that change pyproject.toml, detect version bumps, build with uv, create/update a GitHub release, and publish to PyPI via trusted publishing.

Note: PyPI trusted publishing still needs to be configured manually on pypi.org for this GitHub Actions workflow.
…backlog

- Remove old Dockerfile-gui, Dockerfile-headless, Dockerfile-full
- Update .dockerignore (exclude .venv, tests/DATA, .kd, caches)
- Add .kd/ to .gitignore
- Update build_and_test.sh for named targets
- Add docs/backlog/cd-pipeline.md (CI/CD planning)
- pytest-qt, pytest-xvfb added to dev deps
- tests/gui/ with fixtures and integration tests (14 tests)
- Xvfb + openbox in test-gui Docker target for real widget interaction
- test-gui runs full non-GPU suite (setup_tests.py + all -m 'not gpu')
- gui marker registered in pytest.ini, qt_api = pyside6
@jbohnslav jbohnslav changed the title Cleanup Modernize deepethogram: Python 3.11, uv, unified Docker, Modal GPU tests Mar 30, 2026
@jbohnslav jbohnslav marked this pull request as ready for review March 30, 2026 01:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 329efd3564

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docker/Dockerfile Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/release.yml
James Robinson-Bohnslav added 2 commits March 30, 2026 07:45
The headless target was using 'python -m deepethogram' as its CMD,
which launches the Qt GUI and crashes with no display server.

Changed to 'bash' so users can run training/inference commands
directly (e.g. python -m deepethogram.flow_generator.train).

Fixes: 2b5f
@jbohnslav jbohnslav merged commit 81d5415 into master Mar 30, 2026
5 checks passed
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.

1 participant