galaxyproject / galaxyproject/galaxy
data.fastq.gz extension not properly stripped by #{input|basename}
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 169
Description
I expect it to strip the entire extension, `.fastq.gz`, but right now (in 17.01 at least) it only strips `.gz`. I'm sure I could cobble up a PR to fix this, but the details of the implementation should be discussed I suppose. Taking the name before the first dot is an obvious but potentially flawed solution (i.e. `my.data.fastq.gz` returns `my`). Hardcoding some compressed extensions and stripping those when `|basename` is used is another option, but a bit hacky. Another approach would be to allow the datatypes config to control how the extension should be stripped, but that's seems like a heavy change.
Contributor guide
Research direction
Start by locating the implementation of the input|basename entry point and any tests covering extension stripping. Compare its behavior for data.fastq.gz and my.data.fastq.gz, then clarify the intended extension rules before choosing an implementation. Done means the selected behavior is documented by tests and the original example no longer strips only .gz.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100