Skip to content

fix: relative path_in with path_out in a different directory - #60

Merged
paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-path-out-subdir
Nov 5, 2026
Merged

paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-path-out-subdir

Conversation

@paulmueller-agent

Copy link
Copy Markdown
Contributor

A DCNumPipelineJob with a relative path_in and a path_out in a different directory (e.g. path_in="data.rtdc", path_out="sub/out.rtdc") ended in state "error" with

KeyError: "Unable to synchronously open attribute (can't locate attribute: 'experiment:event count')"

raised at assert len(self._data_temp_in) > 0 in DCNumJobRunner.dtin.

Cause: the temporary basin-based input file is created next to the output file, and create_with_basins resolves relative basin paths relative to the file it writes. The relative path_in was stored verbatim as basin path, so it pointed to a non-existent file in the output directory. The file is first created in Background.__init__ (via paths_ref), and DCNumJobRunner.dtin has the same pattern as a fallback.

Fix: use absolute basin paths in both places. The final output file is unaffected; it already stores both relative and absolute paths to the input.

Test: test_basin_relative_path_in_with_path_out_in_other_directory in tests/test_logic_pipeline.py (fails on main with the KeyError above, passes with this change). flake8 is clean and ruff check reports no new findings.

🤖 Generated with Claude Code

The temporary basin-based input file is created next to the output
file, and `create_with_basins` resolves relative basin paths relative
to that file. A relative `path_in` thus pointed to a non-existent
basin and the pipeline failed with a KeyError for
'experiment:event count'. Use absolute basin paths in
`Background.__init__` and `DCNumJobRunner.dtin`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.61%. Comparing base (531d662) to head (752ffc8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   87.61%   87.61%           
=======================================
  Files          63       63           
  Lines        4369     4369           
=======================================
  Hits         3828     3828           
  Misses        541      541           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmueller
paulmueller merged commit 11856ed into DC-analysis:main Nov 5, 2026
8 checks passed
paulmueller-agent pushed a commit to paulmueller-agent/dcnum that referenced this pull request Nov 5, 2026
This works since the fix for relative `path_in` with `path_out` in a
different directory (DC-analysis#60).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants