Commit Graph
1671 Commits
Author SHA1 Message Date
Michael R. Crusoe 67273472b5 more type hints 2026-04-15 15:16:36 +02:00
mvdbeek cd4f4686a8 Merge branch 'release_26.0' into dev 2026-04-07 10:04:43 +02:00
Marius van den Beek f820d570be Fail job gracefully when output name exceeds 255 character DB limit
When discovered dataset designations are very long (e.g., taxonomic names),
the job output association name (__new_primary_file_{name}|{designation}__)
can exceed the VARCHAR(255) column limit, causing StringDataRightTruncation
which corrupts the SQLAlchemy session and triggers PendingRollbackError.

Add name length validation in Job.add_output_dataset and related methods
that raises ValueError before the DB INSERT. Catch the error in both the
normal and extended metadata code paths to fail the job with a clear error
message instead of crashing the transaction session.

Fixes https://github.com/galaxyproject/galaxy/issues/22045
2026-04-03 11:26:38 +02:00
mvdbeek 827bb957d4 Merge branch 'release_26.0' into dev 2026-04-02 19:10:27 +02:00
Marius van den Beek 7a6e4c969f Merge pull request #22280 from jmchilton/optional_text_validators_26_0
[26.0]  Fix validation of certain classes of text validators in tools.
2026-03-31 20:16:14 +02:00
mvdbeek a9b55cc369 Add optional dataset collection mode to harmonize tool
When input2 is not provided, the tool produces:
- output1: a copy of input1 (all elements preserved)
- output2: same structure/identifiers as input1 but with
  expression.json null datasets

This enables workflows to use the harmonize tool with optional
inputs, producing null-filled collections that can be filtered
downstream with the Filter Null tool.

Bumps tool version to 1.1.0 and preserves 1.0.0 XML as backup.
Closes https://github.com/galaxyproject/galaxy/issues/22080
2026-03-31 15:08:01 +02:00
Delphine-L 9cac96ae4c Add bwa_index format 2026-03-30 15:58:40 -04:00
Marius van den Beek d97a0fc814 Merge pull request #21643 from arash77/add-credentials-tests
Add support for test credentials in tools
2026-03-27 18:35:43 +01:00
John ChiltonandClaude Opus 4.6 a557064111 Fix optional text default_value handling across input formats
strictify() and _fill_default_for() in convert.py ignored
parameter.default_value for optional text params, hardcoding None
for absent values. Additionally both used `or` which swallowed
empty string defaults due to Python falsiness.

This caused inconsistent behavior for absent params on tools with
value="" across input formats:

| Input | optional (no default) | optional value="" | optional value="" + regex |
|-------|----------------------|-------------------|--------------------------|
| {}    | None                 | ""                | ""                        |
| None  | None                 | None              | None                      |
| ""    | ""                   | ""                | ""                        |
| valid | value                | value             | value                     |
| bad   | value                | value             | fails                     |

All rows now consistent across legacy, 21.01, and request formats.

Test tools added:
- gx_text_optional_with_empty_default (optional text, value="", no validator)
- gx_text_optional_with_empty_default_regex_validation (the wild case)
- gx_text_optional_regex_validation updated to have no default

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:32:38 -04:00
John ChiltonandClaude Opus 4.6 ecb803ddae Skip pydantic validators for optional text params with None/empty values
Optional text params with regex (or other) validators would reject
None/"" in request format even though the runtime correctly skips
validation for empty optional params. Add optional flag to validator
chain so None/"" short-circuit before reaching static validators.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:32:37 -04:00
John ChiltonandClaude Opus 4.6 dccab49baa Add cat1 (catWrapper) to test tool conf for workflow editor tests
Symlink tools/filters/catWrapper.xml into test/functional/tools/for_workflows/
and register it in sample_tool_conf.xml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:47:00 -04:00
Aysam Guerler e5e064f3ef Merge pull request #22157 from jmchilton/tool_form_harness
Add test suite for running tool tests via Playwright using the tool form
2026-03-20 10:22:24 +03:00
John Chilton ad7b1e49d0 Merge pull request #22070 from jmchilton/agent_testing
Replace mocked agent tests with static YAML backend for deterministic API/E2E testing
2026-03-19 08:03:33 -04:00
John ChiltonandClaude Opus 4.6 2a0f9155be Add GalaxyWizard E2E Selenium tests, fix detect_errors stderr redirect
Add data-description attributes to GalaxyWizard.vue and DatasetError.vue
for test selectors. Add navigation helpers and Selenium test exercising
the inline error analysis widget with the static agent backend.

Fix broken stderr redirect in detect_errors.xml (>2& → >&2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:54:16 -04:00
John ChiltonandClaude Opus 4.6 32f49d0f6c Add tool form E2E test harness driven by XML test definitions
Reuses existing tool <tests> blocks to drive execution through the
browser tool form, then verifies outputs with verify() infrastructure.

Harness infrastructure (navigates_galaxy.py):
- run_tool_test() orchestrates: fetch test def via galaxy_interactor,
  stage data via stage_inputs(), fill form, execute, verify
- Data staging uses stage_inputs() from populators (not bespoke upload),
  supporting files, collections, binary data, and ftype passthrough
- Collection staging converts TestCollectionDef dicts to CWL-like job
  entries; supports paired, list, and list:paired (nested) types
- Job-based output tracking: snapshots pre-execution jobs, finds new job
  after form submit, fetches outputs by dataset ID via job API
- Output collection verification: checks collection_type, element count,
  and verifies each element's content; supports nested sub-collections
- Two-pass input filling: shallow params first (conditionals), then
  deferred params, data params, collection params last
- Type detection via smart components: drilldown, checkbox_select,
  boolean, color, select, text
- Multi-data support: detect FormSelection wrapper, clear auto-selected
  tags before setting desired value
- Smart component selectors in navigation.yml for param type detection
  and interaction (parameter_checkbox_input, parameter_color_input,
  parameter_text_input, parameter_drilldown_option, etc.)

Test data:
- Add test cases to gx_data.xml and gx_repeat_boolean.xml
- Fix output name in gx_repeat_data.xml (out_file1 -> output)

Test suite (test_tool_form_harness.py) — 30 tests:
- Scalar params: int, float, text, select, boolean, color
- Composite params: conditional (select + boolean), section, repeat,
  drilldown, multi-select checkboxes, data column, multi-data
- Data: single file, optional absent, multi-output, multi-repeats
- Collections: paired, list, list:paired input; paired and list:paired
  output verification; mixed collection+data; optional absent collection
- Integration: simple_constructs, implicit_default_conds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 21:56:32 -04:00
mvdbeek 118f934499 Merge branch 'release_26.0' into dev 2026-03-17 16:05:21 +01:00
Arash 8571240ccb Refactor TestFrameworkTools to include ConfiguresDatabaseVault for credential testing 2026-03-16 11:53:01 +01:00
Arash 72cd9d4eeb Add credential integration test tool and configuration 2026-03-16 11:52:56 +01:00
John ChiltonandClaude Opus 4.6 3470d29a86 Model hidden_data params as optional data in tool meta-models.
Map hidden_data to DataParameterModel(optional=True) in factory,
treat hidden_data as data in test definition parser for file uploads,
add gx_hidden_data test tool and parameter specs (anchored to
gx_data_optional).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 19:47:01 -04:00
mvdbeek 1a87ed4552 Merge branch 'release_25.1' into release_26.0 2026-03-11 10:13:21 +01:00
Marius van den Beek 3da9708d24 Merge pull request #22020 from mvdbeek/schema-building-changes
Enrich tool parameter JSON Schema with Galaxy metadata via model methods
2026-03-11 09:30:51 +01:00
mvdbeek eb6d68df2a Add API tests for schema details 2026-03-10 17:11:58 +01:00
John Chilton fa4540eefe Merge pull request #22007 from jmchilton/bool_fix
Fix ToolExpressionOutput.to_model() for boolean type.
2026-03-10 09:00:19 -04:00
John ChiltonandClaude Opus 4.6 df96907cf1 Fix ToolExpressionOutput.to_model() for boolean type.
to_model() checked "bool" but production expression tools (pick_value,
param_value_from_file) declare type="boolean". Fix to_model() to match
canonical "boolean" and fix lone test tool using non-canonical "bool".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:57:22 -04:00
mvdbeek 9b03fe65f0 Merge branch 'release_26.0' into dev 2026-03-09 17:27:59 +01:00
mvdbeek 51684040d8 Merge branch 'release_25.1' into release_26.0 2026-03-09 17:24:35 +01:00
John ChiltonandClaude Opus 4.6 8981856d36 Fix ToolExpressionOutput.to_model() for boolean type.
to_model() checked "bool" but production expression tools (pick_value,
param_value_from_file) declare type="boolean". Fix to_model() to match
canonical "boolean" and fix lone test tool using non-canonical "bool".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:54:39 -04:00
Michael R. Crusoe 7f40e45a7f Switch to only MIT license 2026-03-06 19:05:20 +01:00
mvdbeek aead68b0a1 Fix NoReplacement handling in workflow callback_helper
When an optional text parameter is omitted from a workflow invocation and
connected to an expression tool, the callback_helper in visit_input_values
could fail to replace unresolved inputs with the tool parameter default.

Two issues contributed to this:

1. NoReplacement doesn't implement __eq__, so when the callback returns a
   different NoReplacement instance than the module-level NO_REPLACEMENT
   singleton, the equality comparison fails and the raw NoReplacement
   object gets stored as the input value.

2. The replace_optional_connections path needs to guard replacements with
   is_runtime_value(value) to avoid clobbering valid tool-state values
   for unconnected parameters (like select parameters with defaults).

Fix both by switching all NoReplacement comparisons to isinstance()
checks and restoring the is_runtime_value guard. Add a framework workflow
test that connects an optional text parameter to an expression tool
converting text→boolean, then uses the boolean as a when condition.
2026-03-06 17:23:32 +01:00
mvdbeek 73ee2ba9ce Merge branch 'release_26.0' into dev 2026-03-04 16:42:49 +01:00
Claude fa4c9bd4ac Add trailing slash to dataset display URL and playwright test
Fix HTML datasets with extra files returning 404 errors when previewed.
Without a trailing slash on the display URL, the browser resolves
relative paths (e.g., image.jpg) against /datasets/{id}/ instead of
/datasets/{id}/display/, causing sub-resources to fail loading.

Adds a playwright test that verifies the trailing slash is present in
the iframe src and that extra files are accessible via relative paths.

https://claude.ai/code/session_01AvNoEjTngF3u59NJvSmPrg
2026-03-04 14:35:49 +01:00
John Chilton 05b93c04f7 Merge pull request #21927 from jmchilton/timelimit
Allow tools to specify timelimits.
2026-03-01 21:17:41 -05:00
Nicola Soranzo ce7c321691 Merge pull request #16970 from mr-c/galaxy_mit_license
Switch to only MIT license
2026-02-25 10:52:33 +00:00
John ChiltonandClaude Opus 4.6 df4272f175 Add timelimit resource requirement type for Galaxy XML/YAML tools.
Add timelimit to ResourceType literal, XSD schema, Pydantic model,
and cwl_to_galaxy mapping. Update test fixtures and assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:59:33 -05:00
Ahmed Awan 7004522c38 Merge remote-tracking branch 'upstream/release_26.0' into merge_26.0_into_dev_feb 2026-02-24 15:07:26 -06:00
Nicola Soranzo 720fae9afd Merge branch 'release_25.1' into release_26.0 2026-02-24 13:12:42 +00:00
Michael R. Crusoe 4d6519ae77 Switch to only MIT license 2026-02-23 14:35:30 +01:00
John ChiltonandClaude Opus 4.6 4f30b3efd5 Add any-collection-type YAML tool with comprehensive job_runtime specs.
New gx_data_collection_any_y tool accepts any collection type (no
collection_type constraint). Specs cover list, paired, list:paired,
and record in job_runtime_valid. Fix parameter_tool_source to handle
_y suffix convention matching functional_test_tool_source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:58:17 -05:00
John ChiltonandClaude Opus 4.6 7285d3bf87 Normalize YAML tool naming scheme in test tools.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:58:17 -05:00
John ChiltonandClaude Opus 4.6 30b167c7ed Comma-separated collection type specs, deeper E2E tests.
- Add gx_data_collection_list_paired_or_list_list and
  gx_data_collection_list_or_list_paired tool definitions + specs
- Add job_runtime valid/invalid specs for comma-separated type unions
- Add E2E test for list:list:paired, record:paired dynamic models
- Tighten nested collection assertions to use dynamic model types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:58:17 -05:00
John ChiltonandClaude Opus 4.6 7493fed862 Add 8 collection type functional tool definitions.
Tool YAMLs + sample_tool_conf.xml entries for record, sample_sheet,
paired_or_unpaired, list:paired, list:list, list:list:paired,
list_or_record, paired_or_pou.

Rebase note: squash into 419f415dbf (Add cross-type discrimination tests).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:58:17 -05:00
John ChiltonandClaude Opus 4.5 3f3a656535 Harden collection runtime models with discriminated unions.
Use Pydantic discriminated unions to enforce that collection_type
matches element structure:
- Add Literal types to simple models (list, paired, record, etc.)
- Add DataCollectionSampleSheetRuntime as separate model
- Split DataCollectionNestedRuntime into NestedList and NestedRecord
- Add collection_runtime_discriminator() for routing validation
- Create CollectionRuntimeDiscriminated tagged union
- Add structure mismatch tests (list with object elements, etc.)
- Add gx_data_collection_list_or_paired test tool

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:58:17 -05:00
John ChiltonandClaude Opus 4.5 1ac44a260c Wire job_runtime validation into parameter specification tests.
Add validate_job_runtime to validation layer and test runner. Add
job_runtime_valid/invalid specs for data, data_multiple, data_collection,
and typed collection (list/paired) params. New gx_data_collection_paired
test tool for paired collection_type coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:58:16 -05:00
John ChiltonandClaude Opus 4.5 3a08805237 Implement collection input runtimeify for YAML tools.
Removes NotImplementedError for DataCollectionParameterModel in
runtimeify() by implementing full collection-to-runtime conversion.
Collections produce normalized representations with class, name,
collection_type, tags, and elements. List-like types (list,
sample_sheet) get array elements; record-like types (paired,
paired_or_unpaired, record) get object elements.

Adds DataCollectionElementInternalJson subtype of DataInternalJson
for stronger typing of files within collections (adds
element_identifier, columns fields).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:58:16 -05:00
John Chilton f8decd4785 WIP: allow collection inputs to YAML tools. 2026-02-12 15:58:16 -05:00
John Chilton 8d84e3dd11 YAML test for collection WIP. 2026-02-12 15:58:16 -05:00
John Chilton 85d5d17321 claude infrastructure for managing test tools. 2026-02-12 15:58:16 -05:00
John Chilton 8276031c43 Failing gx_boolean_user.yml tool to develop against. 2026-02-12 15:58:16 -05:00
John Chilton 1bb986cdb1 Add a function tests for multiple selects from user tools. 2026-02-12 15:58:16 -05:00
John Chilton cc89081927 Modeling and validation of YAML tool test cases. 2026-02-12 10:50:13 -05:00