Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.1] Use select_from_url test data from github, not usegalaxy.org #19352

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/cancelable_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def fetch_url(
method: REQUEST_METHOD = "GET",
):
async with session.request(method=method, url=url, params=params, data=data, headers=headers) as response:
return await response.json()
return await response.json(content_type=None)


async def async_request_with_timeout(
Expand Down
9 changes: 4 additions & 5 deletions test/functional/tools/select_from_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ echo '$url_param_value_header_and_body' > '$param_value_header_and_body'
]]></command>
<inputs>
<param name="url_param_value" type="select">
<options from_url="https://usegalaxy.org/api/genomes">
</options>
<options from_url="https://raw.githubusercontent.com/galaxyproject/galaxy-test-data/refs/heads/master/genomes.json"></options>
</param>
<param name="dynamic_param_filtered_with_validator" type="select">
<!-- tested in test_build_module_filter_dynamic_select -->
<options from_url="https://usegalaxy.org/api/genomes">
<options from_url="https://raw.githubusercontent.com/galaxyproject/galaxy-test-data/refs/heads/master/genomes.json">
<filter type="param_value" ref="url_param_value" column="1" />
</options>
<validator type="no_options" message="Need at least one option here" />
Expand All @@ -24,14 +23,14 @@ echo '$url_param_value_header_and_body' > '$param_value_header_and_body'
</param>
-->
<param name="url_param_value_postprocessed" type="select">
<options from_url="https://usegalaxy.org/api/genomes/dm6">
<options from_url="https://raw.githubusercontent.com/galaxyproject/galaxy-test-data/refs/heads/master/dm6.json">
<postprocess_expression type="ecma5.1"><![CDATA[
$( Object.values(inputs.chrom_info).map((v) => [v.chrom, v.len]) )
]]></postprocess_expression>
</options>
</param>
<param name="invalid_url_param_value_postprocessed" type="select">
<options from_url="https://usegalaxy.or/api/genomes/dm6">
<options from_url="https://usegalaxy.or">
<postprocess_expression type="ecma5.1"><![CDATA[${
if (inputs) {
return Object.values(inputs.chrom_info).map((v) => [v.chrom, v.len])
Expand Down
Loading