Skip to content

fix existing output directory issue#45

Merged
omgol411 merged 2 commits intoisblab:mainfrom
omgol411:main
Apr 13, 2026
Merged

fix existing output directory issue#45
omgol411 merged 2 commits intoisblab:mainfrom
omgol411:main

Conversation

@omgol411
Copy link
Copy Markdown
Contributor

@omgol411 omgol411 commented Apr 13, 2026

Addressing #38

  • output_dir overrides args.output in run_prism. If the former is None (default value), args.output is used
  • os.makedirs(output_dir, exist_ok=True) handles existing output directory correctly.

Summary by CodeRabbit

  • Bug Fixes
    • Improved output directory handling to ensure all output files (bead spread results, annotations, and precision data) are consistently written to the specified location.

omgol411 and others added 2 commits April 13, 2026 11:35
- `output_dir` overrides `args.output` in `run_prism`. If the former is `None` (default value), `args.output` is used
@omgol411 omgol411 self-assigned this Apr 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

📝 Walkthrough

Walkthrough

The run_prism function refactors its output directory resolution logic. Instead of conditional checks on args.output, the function now unconditionally resolves output_dir when not provided and creates the directory explicitly, replacing all downstream references from args.output to the consistent output_dir variable.

Changes

Cohort / File(s) Summary
Output Directory Resolution
src/main.py
Refactored output directory handling: removed conditional logic that depended on os.path.exists(args.output), consolidated into explicit output_dir assignment and unconditional directory creation. All file write operations now consistently use the computed output_dir instead of args.output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through cleaner paths,
Where output folders bloom anew—
No conditions, just direct creation,
Consistency in every write,
A tidy warren, pure and bright! 🐰✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix existing output directory issue' directly relates to the changeset, which refactors output directory handling in run_prism to fix how output_dir is resolved and used.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@omgol411 omgol411 merged commit ad5d08e into isblab:main Apr 13, 2026
2 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