Consolidate post_processing/ and post_processor/ directory duplication #38

Closed
opened 2026-06-22 16:23:20 +00:00 by Mark · 0 comments
Owner

Cleanup needed

There are two directories that handle post-processing work:

  • src/post_processing/ (21 KB across 2 files)
    • post_processor.py (21 KB)
    • pull_compensation.py (21 KB)
  • src/post_processor/ (8 KB across 2 files)
    • __init__.py (empty)
    • physical_optimizer.py (8 KB)

The naming difference (one underscore between words) makes it look like a
typo, but the contents overlap:

  • post_processing/post_processor.py does post-processing
  • post_processor/physical_optimizer.py does post-processing

A new contributor trying to find "where do pull-compensation and physical
optimization live?" has to grep both directories to figure it out.

Proposed resolution

Audit the imports of these modules across the codebase, then pick one
canonical layout:

  • Option A: post_processing/ is canonical (older, more code). Move
    physical_optimizer.py into it as post_processing/physical_optimizer.py.
    Delete the empty post_processor/.
  • Option B: post_processor/ is canonical (newer, cleaner). Move
    post_processor.py and pull_compensation.py into it, rename
    post_processor.py to post_processor.py (or merge with
    physical_optimizer.py if they overlap).
  • Option C: Different name entirely (e.g. post_processing/ with
    pipeline.py for the orchestrator, pull_compensation.py,
    physical_optimizer.py).

Recommend Option C with a clear directory-level docstring describing
ownership of each file.

Acceptance

  • Only one post-processing directory exists.
  • A grep for from post_processing and from post_processor returns
    results only from the canonical directory.
  • All import sites updated.
  • Existing tests still pass.
## Cleanup needed There are two directories that handle post-processing work: - `src/post_processing/` (21 KB across 2 files) - `post_processor.py` (21 KB) - `pull_compensation.py` (21 KB) - `src/post_processor/` (8 KB across 2 files) - `__init__.py` (empty) - `physical_optimizer.py` (8 KB) The naming difference (one underscore between words) makes it look like a typo, but the contents overlap: - `post_processing/post_processor.py` does post-processing - `post_processor/physical_optimizer.py` does post-processing A new contributor trying to find "where do pull-compensation and physical optimization live?" has to grep both directories to figure it out. ## Proposed resolution Audit the imports of these modules across the codebase, then pick one canonical layout: - **Option A:** `post_processing/` is canonical (older, more code). Move `physical_optimizer.py` into it as `post_processing/physical_optimizer.py`. Delete the empty `post_processor/`. - **Option B:** `post_processor/` is canonical (newer, cleaner). Move `post_processor.py` and `pull_compensation.py` into it, rename `post_processor.py` to `post_processor.py` (or merge with `physical_optimizer.py` if they overlap). - **Option C:** Different name entirely (e.g. `post_processing/` with `pipeline.py` for the orchestrator, `pull_compensation.py`, `physical_optimizer.py`). Recommend Option C with a clear directory-level docstring describing ownership of each file. ## Acceptance - Only one post-processing directory exists. - A grep for `from post_processing` and `from post_processor` returns results only from the canonical directory. - All import sites updated. - Existing tests still pass.
Mark 2026-06-22 19:59:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/easystitch#38
No description provided.