Files
imagepipeline/CLEANUP_PLAN.md
T
Frank Schwenk 84447d1d2c docs: add cleanup roadmap for quality pass
Phase 0 analysis and prioritized roadmap for the cleanup/quality-pass branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:34:12 +02:00

2.1 KiB
Raw Blame History

Cleanup Plan — imagepipeline quality pass

Branch: cleanup/quality-pass
Started: 2026-07-18

Phase 0 findings (summary)

Area Risk Notes
Core (runner, resume, pipeline) Medium Solid tests; xcf_stack special-case in runner — defer refactor
Modules LowMedium gmic_grayscale missing finalize_gmic_output (resume parity)
Dependencies High dependencies = [] but Pillow/numpy imported at module load
Pipelines Low Machine-local paths intentional (SOUL); stale CONTINUE_FROM left as-is
Tests Medium 87/88 pass; watermark integration fails on darktable-cli 5.6
Tooling Safe No linter/formatter/CI

Roadmap

Phase 1 — Low-risk quick wins

  • Add Ruff (lint + format) and apply once
  • Expand .gitignore
  • Remove dead duplicate branch in imagemagick_grayscale
  • Fix flaky test_watermark_pipeline (darktable probe skip)

Phase 2 — Structure & config

  • Explicit import imagepipeline.modules in pipeline.py
  • gmic_grayscale: call finalize_gmic_output (parity with gmic)
  • Pipeline CONTINUE_FROM reset — skipped (machine-local resume state)
  • xcf_stack runner hook — deferred (medium refactor risk)

Phase 3 — Code quality

  • Pytest markers (integration, slow)
  • Broad dedup of pipeline scripts — deferred (domain-specific, RECIPES first)

Phase 4 — Dependencies & CI

  • Declare Pillow in core; numpy in dev for import-time ai_tone_map
  • Add Ruff to dev extras
  • Gitea Actions: pytest on push

Phase 5 — Docs

  • README sync (resume, .env, [ai], external tools)
  • docs/ARCHITECTURE.md, CONTRIBUTING.md
  • LICENSE (MIT, matches pyproject)

Known bugs (not fixed — behavior change or out of scope)

  1. darktable-cli 5.6 — integration test fails locally; style file exists but CLI exits 1 on PNG export (possible upstream CLI change).
  2. Eager module importsai_tone_map pulls numpy at import; mitigated via dev dep, not lazy-import refactor.

Verification

pip install -e ".[dev,ai]"
ruff check .
ruff format --check .
pytest