Drops the lines before the first '>' header (the ';' comment block) and
copies everything from that header on byte for byte, so tools with fasta
inputs, and the fasta converters (fai, len, tabular, ...), receive a
file htslib and Biopython can read. Exits with an error if the input has
no '>' header.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A tar with a zip end-of-central-directory record near its end passes
zipfile.is_zipfile, and get_fileobj_raw then blows up in ZipFile() with
BadZipFile instead of handing back the file as-is. Since FilePrefix goes
through get_fileobj_raw, that takes sniffing down with it. See #24488.
The runtime representation and test staging of directory datasets apply
to every directory datatype, not only Zarr. Word their descriptions that
way and test them with a plain directory dataset.
YAML tools received every data input as class: File with path pointing at
the primary file, which is an empty placeholder for directory datatypes
such as zarr, so they could not read them at all.
Emit class: Directory for Directory datatypes, with path set to the
(rewritten) extra files folder, where their content now always sits. A
deferred dataset that is passed on as a URI carries it in location and
has no path. $(inputs.x.path) then works the same for a file and a zarr
store. Tool tests can also stage a class: Directory input now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Zarr store could sit in a single wrapper folder under extra_files_path,
for example after unpacking an archive, and the store_root metadata told
readers where to look. Tools, previews and visualizations all had to
resolve that extra level.
Add a groom_directory_content hook to Directory datatypes. ZarrDirectory
uses it to move a wrapped store up to the root of extra_files_path. Fetch
calls it after staging a directory, and metadata setting calls it before
set_meta, so tool and converter outputs get the same layout. With the
store always at the root, store_root is no longer needed: set_meta,
previews and sniffing read the root directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests stop at the rule builder, so name them for the mapping, not an import.
Both callers pass dataDescription, so drop its unused default. Fix H3K4me27
to H3K27me3 in workbook_example_4.tsv.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Galaxy infers the rule builder mapping from a workbook's column headers -
which spellings it recognises, and how two URL columns per row become paired
elements. Unit tests cover the server's header parsing and the client's
forBuilder, but no browser test drove the wizard's workbook upload through to
the rule builder. Upload each example workbook and assert the mapping the
rule builder opens with.
Extracts set_file_input: the Playwright/Selenium split for attaching a file was
copied three times in upload_activity_helpers. Adds rule_builder_show_and_get_source,
the read side of rule_builder_set_source, collapsing the copy in test_uploads.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Remove skip_if_github_down decorators from 20 tests across 9 files by
serving test data from the local mock HTTP server. Enhances the mock
server with file_path support, HEAD requests, and HTTP range requests
(206 Partial Content). For unit tests that run data_fetch.main()
directly, writes a file_sources.json with 127.0.0.0/24 in the
fetch_url_allowlist so the local server passes URI validation.
Fix `pysam.index()` calls which now use samtools 1.16 where
`samtools index input output` doesn't work any more if `output` is the path
of an already existing file, but `samtools index -o output input` works
fine.
Also:
- Pre-create the (empty) index file for mock test datasets as a unit test
reproducer of the above issue.
- Fix `test_cram` unit test that wasn't checking the return value of
`CRAM.set_index_file()`, which was in fact returning False because
`test-data/2.cram` was not sorted (updated now).
Somewhere between file/libmagic 5.36 and 5.39, the output of `file` on a
`.csi` file changed, breaking the ``metadata_bcf`` framework test with
the following error:
```
if found_exceptions:
> raise JobOutputsError(found_exceptions, job_stdio)
E galaxy.tool_util.verify.interactor.JobOutputsError: Output output_of_input_metadata: different than expected, difference (using contains):
E ( /tmp/tmpu1a3dgjcbcf_index_metadata_test.txt v. /tmp/tmpkt78tzggbcf_index_metadata_test.txt )
E Failed to find 'gzip compressed data, extra field' in history data. (lines_diff=0):
lib/galaxy/tool_util/verify/interactor.py:1222: JobOutputsError
```
So add a requirement for the latest `file` version and update the test
accordingly.