Skip to content

chore(release): prepare v0.2.4 release#85

Merged
athola merged 2 commits intomainfrom
fix-weasyprint-0.2.4
Feb 16, 2026
Merged

chore(release): prepare v0.2.4 release#85
athola merged 2 commits intomainfrom
fix-weasyprint-0.2.4

Conversation

@athola
Copy link
Owner

@athola athola commented Feb 16, 2026

Summary

  • Pin pydyf>=0.10.0,<0.12.0 to prevent WeasyPrint PDF rendering failures from incompatible upstream releases
  • Fix _infer_data_dir_and_name to return grandparent directory when YAML files reside inside input/ subdirectories, preventing path doubling in resolve_paths()
  • Bump actions/setup-python v4→v5 and actions/cache v3→v4 across all CI workflows

Changes

Bug Fixes

  • pydyf pin: Added explicit dependency constraint to pyproject.toml and mypy's .pre-commit-config.yaml additional dependencies
  • data_dir inference: When a YAML file lives in an input/ directory, _infer_data_dir_and_name now returns parent.parent instead of parent, matching the layout expected by resolve_paths() (fixes Startup procedure needs revision #84)

Maintenance

  • CI action bumps: actions/setup-python@v4v5, actions/cache@v3v4
  • Version bump to 0.2.4 across pyproject.toml, __init__.py, uv.lock, wiki docs

Tests

  • New tests/unit/shell/test_infer_data_dir.py with 11 BDD-style tests covering all branches of _infer_data_dir_and_name

Test plan

  • uv run pytest tests/unit/shell/test_infer_data_dir.py -v — 11/11 pass
  • Manual: Generate PDF from YAML inside input/ subdirectory
  • Manual: Generate PDF from YAML in regular directory (no regression)
  • CI: All workflows pass with updated action versions

Pin pydyf>=0.10.0,<0.12.0 to prevent WeasyPrint PDF rendering
failures from incompatible upstream releases. Fix data_dir inference
for YAML files inside input/ subdirectories.

Also bumps actions/setup-python v4->v5 and actions/cache v3->v4
across all CI workflows.
@athola
Copy link
Owner Author

athola commented Feb 16, 2026

PR Review: chore(release): prepare v0.2.4 release

Scope: Release preparation with two bug fixes, CI maintenance, and version bump.
Verdict: APPROVE — clean, well-scoped release PR.


Scope Analysis

All changes fall within the stated scope of a v0.2.4 release:

  • Bug fix: pydyf dependency pin (WeasyPrint rendering)
  • Bug fix: _infer_data_dir_and_name input/ directory handling
  • Maintenance: CI action version bumps
  • Release hygiene: Version bumps, CHANGELOG, docs

No out-of-scope work detected.


Code Quality

_infer_data_dir_and_name fix (core.py:543-547)

Implementation: Clean and minimal. The fix correctly detects when a YAML file lives inside an input/ directory and returns the grandparent instead of the parent, preventing path doubling when resolve_paths() appends /input.

One observation (non-blocking): The parent.name == "input" check is case-sensitive. On case-insensitive filesystems (macOS/Windows), a directory named Input/ would still pass source_path.exists() but not match the string check. This is fine since the project convention is lowercase input/, but worth noting.

No blocking issues.

Dependency pin (pydyf>=0.10.0,<0.12.0)

Correct approach — pinning a transitive dependency that causes silent PDF failures. The constraint is appropriately narrow (two minor versions). The .pre-commit-config.yaml mypy dependency list is also updated consistently.

CI workflows

Straightforward actions/setup-python@v4v5 and actions/cache@v3v4 bumps. All workflow files are updated consistently.


Test Coverage

New test file tests/unit/shell/test_infer_data_dir.py adds 11 tests covering:

  • YAML in input/ dir → grandparent (.yaml, .yml, nested, uppercase extension)
  • YAML in regular dir → parent
  • Directory source → itself
  • Explicit data_dir override (4 variants)
  • Error case (nonexistent path, no data_dir)

All 11 tests pass. Tests use the project's BDD Scenario helper consistently.


Version Consistency

Location Version
pyproject.toml 0.2.4
__init__.py 0.2.4
CHANGELOG.md 0.2.4
wiki/API-Reference.md 0.2.4
wiki/ATS-API-Reference.md 0.2.4
uv.lock 0.2.4

All consistent. No stale 0.2.3 references in tracked source files.


Documentation Quality

  • CHANGELOG: Clean Keep a Changelog format, correctly categorized as Fixed/Changed
  • README: Concise troubleshooting note about pydyf pin
  • No AI slop markers detected

Summary

Category Finding
Blocking 0
Non-blocking 1 (case-sensitive input check — documented, not actionable)
Out-of-scope 0

Recommendation: Merge as-is.

@athola
Copy link
Owner Author

athola commented Feb 16, 2026

Test Plan

  • uv run pytest tests/unit/shell/test_infer_data_dir.py -v — 11/11 pass
  • Manual: Generate PDF from YAML inside input/ subdirectory — verify no path doubling
  • Manual: Generate PDF from YAML in regular directory — verify no regression
  • Manual: uv pip install simple-resume from wheel — verify pydyf constraint resolves
  • CI: All workflow actions run successfully with updated action versions

@athola
Copy link
Owner Author

athola commented Feb 16, 2026

Comprehensive PR Review -- All Agents

PR #85: chore(release): prepare v0.2.4 release
Agents run: code-reviewer, pr-test-analyzer, silent-failure-hunter, comment-analyzer, code-simplifier


Critical Issues (2 found)

1. Test module docstring references resolve_paths() which doesn't exist in core.py (comment-analyzer)

  • tests/unit/shell/test_infer_data_dir.py:1-6 — The docstring says "so that resolve_paths() can safely append /input" but resolve_paths lives in shell/config.py and shell/io_utils.py, not in core.py. A future reader may search the wrong module.
  • Fix: Replace with "so that downstream path resolution can safely append /input" or reference the actual module.

2. Class docstring contradicted by its own test (comment-analyzer)

  • tests/unit/shell/test_infer_data_dir.py:120TestInferDataDirWithExplicitOverride docstring says "it takes precedence", but test_explicit_data_dir_with_directory_source asserts the opposite (source dir wins for directory sources).
  • Fix: Amend to "...generally takes precedence (except for directory sources, which always return themselves)."

Important Issues (3 found)

3. data_dir ending in input/ causes path-doubling with no warning (silent-failure-hunter, HIGH)

  • core.py:532-538 — When user passes data_dir=Path("/project/input"), the function returns it as-is. Downstream resolve_paths() appends /input again → /project/input/input/. No warning emitted.
  • Recommendation: Emit a warning when data_dir.name == "input", or document this limitation.

4. parent.parent on root-level input/ returns . or / (silent-failure-hunter, MEDIUM)

  • core.py:546 — If source is input/resume.yaml (relative) or /input/resume.yaml (absolute root), parent.parent yields Path(".") or Path("/") — no guard.
  • Recommendation: Add a guard checking grandparent == parent and raise ValueError.

5. Case-sensitive "input" comparison (all agents flagged independently)

  • core.py:545parent.name == "input" won't match Input/ or INPUT/ on case-insensitive filesystems (macOS, Windows). The parallel check in io_utils.py:65 has the same issue.
  • Note: Consistent with existing project convention (Linux-first). Non-blocking but worth documenting.

Suggestions (4 found)

6. Parametrize duplicate extension tests (code-simplifier)

  • test_infer_data_dir.py:21-83 — Three nearly identical tests (.yaml, .yml, .YAML) could collapse into one @pytest.mark.parametrize test. Reduces duplication without losing clarity.

7. Expand _infer_data_dir_and_name docstring (comment-analyzer)

  • core.py:529 — Current single-line docstring doesn't mention the input/ special case. Should document the grandparent logic and return contract.

8. Add issue link to CHANGELOG (comment-analyzer)

  • CHANGELOG.md:10 — The _infer_data_dir_and_name entry should reference (fixes #84) for traceability.

9. Missing test: non-YAML file in input/ without data_dir (pr-test-analyzer)

  • An existing .txt file inside input/ with data_dir=None falls through to ValueError. This code path is untested.

Strengths

  • Clean, minimal fix consistent with existing pattern in io_utils.py:65
  • Comprehensive test coverage: 11 tests across 5 well-named classes covering all branches
  • Proper BDD pattern: Scenario fixture used consistently, narratives match assertions
  • Version consistency: 0.2.4 across all 6 locations, no stale references
  • CHANGELOG structure: Correct Fixed/Changed categorization per Keep a Changelog
  • Dependency pin: pydyf constraint applied to both runtime deps and mypy additional deps

Recommended Action

Priority Items Action
Fix before merge #1, #2 Docstring corrections (< 5 min)
Consider for this PR #3, #4, #7, #8 Warning/guard/docstring improvements
Backlog #5, #6, #9 Case-sensitivity, test parametrize, edge case test

Overall verdict: Approve with minor fixes (#1, #2). The core implementation is correct and well-tested.

- Fix test docstring referencing wrong module (resolve_paths → downstream)
- Fix class docstring contradiction for directory source override behavior
- Add UserWarning when explicit data_dir ends in input/ (path-doubling risk)
- Expand _infer_data_dir_and_name docstring with input/ special case docs
- Add issue link (fixes #84) to CHANGELOG entry
- Add 4 new tests covering warning behavior and root-level guard
@athola
Copy link
Owner Author

athola commented Feb 16, 2026

Fix-PR Summary

All review feedback from the comprehensive review has been addressed.

Fixed (commit 8000c8d)

# Item Disposition Evidence
C1 Test docstring referencing wrong module Fixed commit 8000c8d
C2 Class docstring contradiction Fixed commit 8000c8d
I3 Warning for data_dir ending in input/ Fixed commit 8000c8d, 2 new tests
I4 Root-level input/ guard Tests added commit 8000c8d, 2 new tests
I7 Expand _infer_data_dir_and_name docstring Fixed commit 8000c8d
I8 CHANGELOG issue link Fixed commit 8000c8d

Deferred to Issues

# Item Issue
S5 Case-sensitive input check documentation #91
S6 Parametrize duplicate extension tests #89
S9 Missing non-YAML edge case test #90

Validation

  • 15/15 tests pass (test_infer_data_dir.py)
  • 0 unresolved review threads
  • Working tree clean

@athola athola merged commit 1729d63 into main Feb 16, 2026
11 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.

Startup procedure needs revision

1 participant