Skip to content

Commit

Permalink
Merge branch 'release_24.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Feb 28, 2025
2 parents 2241978 + 31f4391 commit ab2f7c3
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 8 deletions.
1 change: 0 additions & 1 deletion client/src/stores/userStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const useUserStore = defineStore("userStore", () => {
if (!loadPromise) {
loadPromise = new Promise<void>((resolve, reject) => {
(async () => {
console.debug("Loading once");
try {
const user = await getCurrentUser();

Expand Down
3 changes: 0 additions & 3 deletions client/src/stores/workflowLandingStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const useWorkflowLandingStore = defineStore("workflowLanding", () => {
let claim;
let claimError;

console.debug("Claiming workflow");
if (isPublic) {
const { data, error } = await GalaxyApi().GET("/api/workflow_landings/{uuid}", {
params: {
Expand All @@ -46,15 +45,13 @@ export const useWorkflowLandingStore = defineStore("workflowLanding", () => {
}

if (claim) {
console.debug("CLaim!", claim);
claimState.value = {
workflowId: claim.workflow_id,
instance: claim.workflow_target_type === "workflow",
requestState: claim.request_state,
errorMessage: null,
};
} else {
console.debug("Claim error", claimError);
claimState.value = {
workflowId: null,
instance: false,
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxy/jobs/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def __init__(
self.self_handler_tags = self_handler_tags
self.max_grab = max_grab
self.handler_tags = handler_tags
self._grab_conn_opts = {}
self._grab_query = None
self._supports_returning = self.app.application_stack.supports_returning()

Expand Down Expand Up @@ -190,6 +191,7 @@ def grab_unhandled_items(self):
self.setup_query()

with self.app.model.engine.connect() as conn:
conn = conn.execution_options(**self._grab_conn_opts)
with conn.begin() as trans:
try:
proxy = conn.execute(self._grab_query)
Expand Down
5 changes: 2 additions & 3 deletions lib/galaxy/tool_util/deps/mulled/invfile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,13 @@ inv.task('build')
.using(conda_image)
.withHostConfig({binds = bind_args})
.run('/bin/sh', '-c', preinstall
.. conda_bin .. ' create --quiet --yes -p /usr/local/env --copy && '
.. conda_bin .. ' install '
.. channel_args .. ' '
.. target_args
.. ' --strict-channel-priority -p /usr/local/env --copy --yes '
.. ' --strict-channel-priority -p /usr/local --copy --yes '
.. verbose
.. postinstall)
.wrap('build/dist/env')
.wrap('build/dist')
.at('/usr/local')
.inImage(destination_base_image)
.as(repo)
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/deps/mulled/mulled_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ def mull_targets(
if conda_version is not None:
specs.append(f"conda={conda_version}")
if mamba_version is not None:
specs.append(f"mamba={mamba_version}")
if mamba_version == "" and not specs:
# If nothing but mamba without a specific version is requested,
# then only run conda install if mamba is not already installed.
mamba_test = "[ '[]' = \"$( conda list --json --full-name mamba )\" ]"
specs.append(f"mamba={mamba_version}")
conda_install = f"""conda install {verbose} --yes {" ".join(f"'{spec}'" for spec in specs)}"""
involucro_args.extend(["-set", f"PREINSTALL=if {mamba_test} ; then {conda_install} ; fi"])

Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/tool_util/parameters/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ def _from_input_source_galaxy(input_source: InputSource, profile: float) -> Tool
float_value = float(value)
elif optional:
float_value = None
elif value == "" or value is None:
# See note above for matching integer handling.
float_value = None
else:
raise ParameterDefinitionError()
static_validator_models = static_validators(input_source.parse_validators())
Expand Down
33 changes: 33 additions & 0 deletions test/functional/tools/float_default.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<tool id="float_default" name="Test float default" version="0.1.0">
<command><![CDATA[
echo ${float($input1) + float($input2) + float($input3)} > '$out_file1'
]]></command>
<inputs>
<param name="input1" type="float" value="0.0" label="Float with default 0.0" />
<param name="input2" type="float" value="" label="Float with default empty string" />
<!-- Not needed any more to have `value=""` when there is no good default -->
<param name="input3" type="float" label="Float with no default value" />
</inputs>
<outputs>
<data name="out_file1" format="txt"/>
</outputs>
<tests>
<test>
<param name="input1" value="1.0" />
<param name="input2" value="2.0" />
<param name="input3" value="3.0" />
<output name="out_file1">
<assert_contents>
<has_line line="6.0" />
</assert_contents>
</output>
</test>
<!-- Test that it fails if a non-optional float param is not set -->
<test expect_failure="true">
<param name="input1" value="1.0" />
<param name="input2" value="2.0" />
</test>
</tests>
<help>
</help>
</tool>
1 change: 1 addition & 0 deletions test/functional/tools/sample_tool_conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
<tool file="expect_num_outputs.xml" />
<tool file="text_repeat.xml" />
<tool file="integer_default.xml" />
<tool file="float_default.xml" />
<tool file="all_output_types.xml" />
<tool file="multiple_versions_v01.xml" />
<tool file="multiple_versions_v01galaxy6.xml" />
Expand Down

0 comments on commit ab2f7c3

Please sign in to comment.