Apply combiner to an input_filepath_list of length 1
- Dominant language
- Python
- Stars
- 540
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
Trying to combine a single file (which basically doesn't alter it unless the combiner applies transformations too):
`cbn.build([filename], outfile, 'concatenate')`
Raises an error: `ValueError: input_filepath_list must have at least 2 files.`
But there are scenarios where this is useful, for example in my case I need to concatenate a file to itself _if_ the file is shorter than a certain value, but otherwise leave it unchanged. The number of concatenattions N is determined at runtime, so ideally I'd like to call build() like this:
`cbn.build([filename] * N, outfile, 'concatenate')`
So that if N=1 it basically leaves the file unchanged. This can of course be achieved using an if statement to determine whether I need to use the combiner or not, but it's much clunkier.
@rabitt Is there a particular reason why the combiner can't be called with an `input_filepath_list` list of length 1?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the build() entry point used in the issue and inspect where input_filepath_list is rejected for length one. Confirm the expected behavior for a single input with the concatenate combiner, then add coverage showing that build([filename], outfile, 'concatenate') completes without the current ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100