Skip to content

[output] Support paths and file handles in scene-list writers - #570

Merged
Breakthrough merged 4 commits into
Breakthrough:mainfrom
MuhammadBilalKhan267:feature/567-output-decorator
Sep 12, 2026
Merged

Breakthrough merged 4 commits into
Breakthrough:mainfrom
MuhammadBilalKhan267:feature/567-output-decorator

Conversation

@MuhammadBilalKhan267

Copy link
Copy Markdown
Contributor

Closes #567.

  • Add a shared decorator for opening and closing output paths.
  • Support str, Path, and open text files for EDL, FCPXML, FCP7 XML, and OTIO output.
  • Preserve CSV newline handling.
  • Add tests and update API documentation and changelog.

Tests: 382 passed, 2 skipped.

@Breakthrough Breakthrough left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting started with this one, there's a lot of moving parts here.

Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py
Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py Outdated
Comment thread scenedetect/output/__init__.py Outdated
Comment thread tests/test_output.py Outdated

@Breakthrough Breakthrough left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving and merging as-is but please see the last comment I added for follow up.

Thanks for the PR!

Comment thread scenedetect/output/__init__.py
@Breakthrough
Breakthrough merged commit 56ab41b into Breakthrough:main Sep 12, 2026
27 checks passed
Comment thread scenedetect/output/__init__.py
Breakthrough added a commit that referenced this pull request Sep 21, 2026
Follow-up to #570.

Adds focused coverage for `_open_output_file` to ensure failed output
generation does not create the destination file.

Also documents that the decorator replaces filesystem paths with
writable text streams before invoking each writer.

Tests: 390 passed, 2 skipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Decorator Pattern for Consistent Output Handling

2 participants