Commit Graph
143 Commits
Author SHA1 Message Date
Nicola Soranzo 1f223d0dc5 Test hash validation also for upload by path 2024-11-05 15:33:40 +00:00
davelopez 305dd2b181 Add has_deferred_data flag to MockDataset and FakeDatasetAssociation 2024-10-31 11:17:16 +01:00
davelopez b3a70863fc Add test for parsing allow_uri_if_protocol 2024-10-31 11:17:16 +01:00
John Chilton 078ad6114b Fix param models for dynamic options and truevalue/falsevalue 2024-10-22 07:49:37 -04:00
John Chilton 730ea2ee03 Pydantic models for parameter validators. 2024-10-22 07:49:37 -04:00
John Chilton 8c10f36dd2 Refactor Tool._populate for reuse of hook checks. 2024-10-22 07:49:37 -04:00
John Chilton 19784976d8 Fixes and tests for data fetch models. 2024-09-18 10:00:03 -04:00
John Chilton 27dcee1a9f Typing around tool state. 2024-09-03 17:01:19 -04:00
Marius van den Beek 94611cba14 Merge pull request #18626 from jmchilton/tool_execution_typing
Better Typing for Tool Execution Plumbing
2024-08-06 15:28:28 +02:00
Nicola Soranzo bc250177c3 Fixes for errors reported by mypy 1.11.0 in `BaseObjectStore` 2024-08-01 18:24:13 +01:00
John Chilton 3345de12f6 Typing for much of the tool execution and action plumbing. 2024-07-31 20:37:56 -04:00
mvdbeek 864bec4739 Merge branch 'release_24.1' into dev 2024-07-18 09:57:36 +02:00
John Chilton 6dec2f482e Stock tools. 2024-07-15 09:46:13 -04:00
John Chilton 32a968f01c More tool parsing abstractions, for greater reuse outside main app. 2024-07-15 09:46:13 -04:00
mvdbeek a5960ee262 Fix map over calculation for runtime inputs
Fixes https://github.com/galaxyproject/galaxy/issues/18506
2024-07-14 20:53:52 +02:00
Nicola Soranzo 08d42ea24f Merge branch 'release_24.0' into release_24.1 2024-06-19 13:14:15 +01:00
mvdbeek 111d5632ff Run make format 2024-06-19 10:24:55 +02:00
Martin Cech 2891489cad Merge pull request #18389 from mvdbeek/ensure_data_extension_if_no_extension_specified
[24.0] Assign default ``data`` extension on discovered collection output
2024-06-18 17:21:20 +02:00
mvdbeek ed2369f9a0 Merge branch 'release_24.0' into release_24.1 2024-06-18 17:19:55 +02:00
M Bernt 5297fa3137 Apply suggestions from code review 2024-06-18 09:59:33 +02:00
Matthias Bernt a2d1a5d2e6 really allow in-range validator for txt
just enabling the linter
https://github.com/galaxyproject/galaxy/pull/18403 was not sufficient
2024-06-17 14:57:56 +02:00
mvdbeek 6551f31671 Implement default format on collection level 2024-06-13 13:02:51 +02:00
Nicola Soranzo 0629908541 Fix new UP031 errors from ruff 0.4.2 2024-04-29 00:09:38 +01:00
mvdbeek 67436a6156 Merge branch 'release_24.0' into dev 2024-04-17 16:22:04 +02:00
Nicola Soranzo dcb6f061f6 Don't install Galaxy packages in editable mode when testing them
When enabling the `warn_unused_ignores = True` option of mypy, this
was making the `test_galaxy_packages` tests fail with:

```
mypy .
Traceback (most recent call last):
  File "/tmp/gxpkgtestenvu3fgDr/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
  File "/tmp/gxpkgtestenvu3fgDr/lib/python3.10/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
  File "mypy/main.py", line 100, in main
  File "mypy/main.py", line 182, in run_build
  File "mypy/build.py", line 192, in build
  File "mypy/build.py", line 266, in _build
  File "mypy/build.py", line 2942, in dispatch
  File "mypy/build.py", line 3333, in process_graph
  File "mypy/build.py", line 3414, in process_fresh_modules
  File "mypy/build.py", line 2110, in fix_cross_refs
  File "mypy/fixup.py", line 52, in fixup_module
  File "mypy/fixup.py", line 127, in visit_symbol_table
  File "mypy/lookup.py", line 49, in lookup_fully_qualified
AssertionError: Cannot find component 'util' for 'galaxy.util'
make: *** [Makefile:96: mypy] Error 1
```

Moreover, installing packages in editable mode was hiding some issues
with how files from other packages were accessed.
2024-04-16 01:12:57 +01:00
mvdbeek 92dfa466f5 Fix None passed to LengthValidator
It is valid to pass None as a default value to the validator. It should
just return ValueError, which it will do with this change via the inner
validator.

Fixes https://github.com/galaxyproject/galaxy/issues/17961

Ideally we'd add type annotations, but with the current structure and
instantiation order it seems impossible to do this in a meaningful way.

If we refactored the validators to be functions, and validators
functions were registered per parameter type we could have narrow types on the
validator signature.
2024-04-13 16:08:55 +02:00
John Chilton 822f8121f8 Unit test for email error reporting. 2024-04-11 16:14:13 -04:00
mvdbeek 6f2a04321d Merge branch 'release_24.0' into dev 2024-04-04 18:55:04 +02:00
mvdbeek 626baad567 Refactor RuntimeValue utils for re-use
Moving this to tools.parameters.workflow_utils avoids a circular
dependency when importing is_runtime_value in
tools.parameters.dynamic_options.
2024-04-02 19:10:20 +02:00
mvdbeek 55029be8eb Avoid get_initial_value when we have a tool state
It's not guaranteed this will always work, and it's unnecessary if
we have e.g. `ConnectedValue` in a workflow context.
2024-04-02 19:10:20 +02:00
John Davis 78a77d934a Mypy: typing errors, misc. fixes 2024-04-02 10:08:53 -04:00
Nicola Soranzo a2018a5e60 Enable flake8-comprehensions ruff rules
but allow `dict()` calls that make use of keyword arguments (e.g.,
`dict(a=1, b=2)`).
2024-03-09 19:11:20 +00:00
mvdbeek b1aaec0435 Fix TestSelectToolParameter test cases
Without this user is mocked, whuch breaks `user.get_user_data_tables`
2024-02-16 15:53:17 +01:00
mvdbeek 03e2b8a807 Clean up dataset passing 2024-02-16 15:53:17 +01:00
mvdbeek fe05a35606 WIP: Experiment with allowing tool data bundles as job inputs 2024-02-16 15:36:52 +01:00
mvdbeek 35c0fd21cb Merge branch 'release_23.2' into dev 2024-02-16 15:28:57 +01:00
mvdbeek 513ca7494d Drop overly complicated state setter logic
I doubt anyone instinctively know when to use `._state`, `.state`,
`.raw_set_dataset_state` or `.set_dataset_state` and I think that was
part of what led to this bug.
2024-02-15 11:28:37 +01:00
Marius van den Beek ddabba7c2f Merge pull request #17087 from mvdbeek/from_url_option
Add select parameter with options from remote resources
2024-02-14 18:47:40 +01:00
mvdbeek 84604bd2cb Merge branch 'release_23.2' into dev 2024-02-14 18:44:36 +01:00
mvdbeek 9eebb60647 Sandwich IT entry point creating after param_dict building and env var creation 2024-02-13 14:57:12 +01:00
mvdbeek 5aabab9c93 Implement request header and body templating 2024-02-13 14:51:16 +01:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
Nicola Soranzo 81a16d3e92 Skip unit tests that require node when it's not installed 2024-01-15 18:32:05 +00:00
Matthias Bernt e725f421b4 Reload built-in converters on toolbox reload
fixes #16947

also adds a setter to `MockApp` in order to fix the following
which was shown during tests

```
  /home/berntm/projects/galaxy/.venv/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-7 (check)

  Traceback (most recent call last):
    File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
      self.run()
    File "/usr/lib/python3.10/threading.py", line 953, in run
      self._target(*self._args, **self._kwargs)
    File "/home/berntm/projects/galaxy/lib/galaxy/tool_util/toolbox/watcher.py", line 153, in check
      self.reload_callback()
    File "/home/berntm/projects/galaxy/lib/galaxy/app_unittest_utils/toolbox_support.py", line 44, in <lambda>
      app.watchers.tool_config_watcher.reload_callback = lambda: reload_callback(test_case)
    File "/home/berntm/projects/galaxy/lib/galaxy/app_unittest_utils/toolbox_support.py", line 193, in reload_callback
      test_case._toolbox = test_case.app.toolbox = SimplifiedToolBox(test_case)
  AttributeError: can't set attribute 'toolbox'

    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))
```
2023-12-19 11:31:06 +01:00
mvdbeek 0cc9225ca0 Add file_name property on DatasetFilenameWrapper 2023-12-01 19:57:38 +01:00
Yakubov, Sergey b342f4ccb6 rename _sync_cache -> sync_cache 2023-11-17 12:08:28 -05:00
Yakubov, Sergey 898c5c942d optimize object store pull
added sync_cache parameter to the get_filename function that allows
skip pulling to cache when not needed
2023-11-14 11:57:40 -05:00
John Davis f91693dc6e Merge pull request #16783 from SergeyYakubov/get-rid-of-filename-property
Replace file_name property with get_file_name function
2023-11-08 17:19:40 -05:00
Yakubov, Sergey c30a4c06c2 Replace file_name property with get_file_name function 2023-11-08 17:17:14 -05:00
mvdbeek 3ccccc80bc Merge branch 'release_23.1' into dev 2023-10-23 17:42:59 +02:00