Commit Graph
6470 Commits
Author SHA1 Message Date
mvdbeek 973f6679d6 Merge branch 'release_21.09' into release_22.01 2022-02-11 13:29:04 +01:00
Marius van den Beek 76a8e12d21 Merge pull request #13325 from mvdbeek/remap_fix_sentry
[21.09] Fix resuming job when job has optional data parameters
2022-02-10 11:19:20 +01:00
Marius van den BeekandNicola Soranzo 7c4905251c Get the needed ToolEvaluator.build return value by index
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-02-08 21:35:13 +01:00
mvdbeek 96e76c62d2 Don't record version command as part of command line
Fixes https://github.com/galaxyproject/galaxy/issues/13306
2022-02-08 15:52:06 +01:00
mvdbeek bec9d4b49f Fix resuming job when job has optional data parameters
This fixes
```
ERROR    galaxy.tools.actions:__init__.py:683 Cannot remap rerun dependencies.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 664, in _remap_job_on_rerun
    self.__remap_parameters(job_to_remap, jtid, jtod, out_data)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in __remap_parameters
    input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in <dictcomp>
    input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not
NoneType
```

Optional data inputs or optional selects are stored as `None` (super
inconsistent, since most other parameters are stored as JOSN. We should
create "basic_2.py" using pydantic at one point not too far into the
future ...). This means we can't call `json.loads` on these. Fortunately
this is the only place we do it, and we don't need to consider optional
parameters here anyway.
2022-02-08 15:45:01 +01:00
Nicola Soranzo 00b0846e8f Merge branch 'release_21.05' into release_21.09 2022-02-08 13:29:08 +00:00
mvdbeek 83c0683e86 Restore Metadata size limit
Broke in https://github.com/galaxyproject/galaxy/pull/11902
2022-02-07 15:02:02 +01:00
Marius van den Beek a66a8b6e54 Merge pull request #13299 from mvdbeek/disable_required_metadata_filter_for_now
[22.01] Limit required element validation to safe elements
2022-02-04 09:27:26 +01:00
Marius van den Beek 3b25dd6184 Merge pull request #13268 from bgruening/xref_bioconductor
[22.01] Add bioconductor as valid xref for tools
2022-02-03 18:44:19 +01:00
mvdbeek 370d343670 Limit required element validation to safe elements
There used to be a long-standing bug in setting up the MetadataValidator
if default values were used. We fixed this in
https://github.com/galaxyproject/galaxy/pull/13139/commits/e194ef97e49c4947711ad1d20873ddc0aa686a66,
but that means we're now checking for all non-optional values before
running a tool. We have a ton of non-optional MetadatElement items
in datatypes that should maybe be optional (an indication might be if
`default` and `no_value` are specified and set to the same value ... but
I'm not sure that's a 100% thing). So I think that reviewing this
requires domain knowledge of the datatypes and what elements are really required,
and I'm not sure we can do this in a timely fashion, and not break
something that used to work.

So my suggestion is that we add `check_required_metadata=True`
on datatypes for which we have checked that non-optional metadata
elements are really non-optional. For those metadata elements
for which this is not the case we skip the validation as we would
do prior to
https://github.com/galaxyproject/galaxy/pull/13139/commits/e194ef97e49c4947711ad1d20873ddc0aa686a66.

As an example I have marked  RDS and RData with check_required_metadata
and added a test for check_required_metadata.
2022-02-03 12:58:38 +01:00
John Chilton 671ca0a7fe Implement bioconductor xref on the frontend.
Cleanup xref rendering a bit.
2022-02-02 14:56:07 -05:00
mvdbeek d0fb11c015 Drop OpenID post authentication protocols 2022-02-01 11:04:48 +01:00
mvdbeek 597ee75396 Merge branch 'release_21.09' into dev 2022-01-31 08:57:46 +01:00
Nicola Soranzo 4ffc7e8194 Merge pull request #13251 from mvdbeek/openpbs_support
Add openPBS cli support, rebuild CLI test images
2022-01-29 15:59:05 +00:00
Nicola SoranzoandMarius van den Beek 4b46c898a7 Add comment
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-01-29 13:00:33 +00:00
Dannon ca35dcadb7 Merge pull request #13183 from mvdbeek/workflow_invocation_pagination
Workflow invocation pagination
2022-01-28 17:08:35 -05:00
mvdbeek be43f1d1a7 Use updated test images for CLI runner 2022-01-28 19:55:45 +01:00
mvdbeek 962a945765 Add InvocationIndexPayload model 2022-01-28 19:31:41 +01:00
Matthias Bernt 8f94fbeb61 more linting refactoring
Special LintMessage for XML:

- one adding line and file name and
- one adding XPath

added error and report level class

also added doc string
2022-01-28 17:14:58 +01:00
Matthias Bernt f3ba64e977 refactoring of LintMessage
subclassed XMLLintMessage
2022-01-27 15:35:01 +01:00
Matthias Bernt 9d6bfad255 adapt tool loader test
when loading macros from imported files
the base property of the node is
overwritten.

this adds a xml:base property to the node
which is printed in the test
2022-01-26 20:51:39 +01:00
Matthias Bernt 1d1bae8453 add function to return lint context
this adds functionality to the linter functions to return the lint
context. without breaking previous behavior.

Planemo seems to use

- lint_tool_source (which returned the fail state) and
- lint_tool_source_with (which returned nothing)

For the later a parameter has been added to make the linter silent
and the lint context is now returned.

For the former a variant has been added which returns the lint context.
2022-01-26 20:16:02 +01:00
mvdbeek 28072009d2 Rewrite parameterized pytests to regular test
The .. and  ... and ... and within a lambda gives you
no chance to debug the test without a print statement or
a debugger.

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-01-26 18:27:44 +01:00
Matthias Bernt 19e9ea37fb revert str function for lint messages
such that the original bahavior is unchanged
and add pretty print for use in external apps like planemo
2022-01-26 09:51:39 +01:00
Matthias Bernt 29f3f40296 add file name to linter message
- add fname to LintMessage
- LintContext make lint messages persistent over multiple linter calls
  before the messages were reset before the call of the next linter
  which is "impractical" if we want to use the lintmessages eg in
  planemo
- add test for linting a tool + (internal and external) macros
  to ensure that the fname and line number is correct
- add a simple linter test for yaml and json tools
2022-01-26 09:51:38 +01:00
Matthias Bernt 4e237d84e2 lint for invalid regex in stdio regex 2022-01-26 09:50:58 +01:00
Matthias Bernt 7fcc772a1c small restructuring of linter unit tests 2022-01-26 09:50:56 +01:00
Dannon 2547da5586 Merge pull request #12528 from bernt-matthias/topic/n-col-assert
Various extensions and improvements for asserts
2022-01-25 08:42:05 -05:00
Dannon 5845b3d409 Merge pull request #13230 from mvdbeek/fix_mercurial_new_file
[21.09] Fix adding new files via tarball upload
2022-01-25 08:32:38 -05:00
Simon Bray 381d218180 ensure tool_id/content_id is updated when refactoring workflows 2022-01-24 13:39:27 +01:00
mvdbeek 5c39169a03 Partial unit tests for hgutil.py 2022-01-24 12:28:06 +01:00
mvdbeek f6ce2f6f5a Merge branch 'release_21.09' into dev 2022-01-22 16:35:43 +01:00
mvdbeek f0baddd905 Merge branch 'release_21.09' into dev 2022-01-21 16:38:36 +01:00
mvdbeek 29f8b1807f Handle unique tag name constraints
The idea is to create the tag one by one in a separate session, and
catch any violations.
2022-01-21 14:50:16 +01:00
John Chilton 9f8223d845 Merge pull request #10304 from bernt-matthias/topic/test-sort-order-multiple
Reimplement collection order test, add wrong order, add `expect_test_failure` attribute
2022-01-20 12:31:01 -05:00
Matthias Bernt 79b00df1ac fix rebase errors 2022-01-20 12:07:21 +01:00
Matthias Bernt a86b05e6ac allow byte suffixed for numbers in asserts 2022-01-20 11:39:26 +01:00
Matthias Bernt f3a20a4b68 more specific error message for archive assertions
and

- has_n_elements_with_path add delta, min, max
- negate for all xml assertions (except is_valid)
2022-01-20 11:39:26 +01:00
Matthias Bernt 10ac6c8c8c introduce xml_element assertion
which generalizes all other xml assertions
2022-01-20 11:39:26 +01:00
Matthias Bernt 85f0de0d14 add n, delta, min, max for archive assertions 2022-01-20 11:39:26 +01:00
Matthias Bernt 33ec189dcb fix/complete archive test for sub assertions 2022-01-20 11:39:26 +01:00
Matthias Bernt 57cd7700a2 test archive assert using no test data
but just create mock files on the fly
2022-01-20 11:39:26 +01:00
Matthias Bernt 388c99a704 conditionally execute h5 assertion tetst
if h5py module is available. otherwise package tests are failing
2022-01-20 11:39:26 +01:00
Matthias Bernt 381480775c xml assert: element_text check if path exists 2022-01-20 11:39:26 +01:00
Matthias Bernt d2f484cf43 add tests for hdf5 and archive asserts and some fixes
archive asserts:

- check for absent members directly in the assertion
  - before the _extract... functions returned `None`
    which had no effect if there is no included assertion
    (probably this is also the reason why some of the
     text assertions check for None)
  - so now the assertion can be used without included
    sub-assertions to check for member presence
- fix for non-file members: the behavior for zip and tar
  was different

hdf5 asserts:

- fix assertion text
2022-01-20 11:39:26 +01:00
Matthias Bernt 6a4381cc78 xml assertions: tests, small improvements + xsd reformatting
- added unit tests for all xml assertions
- restructured xsd:
  - grouped general, text, tabular, archive, xml, and h5 assertions
  - full definition of all assertions in xsd
  - allow for "recursion" in xsd for has_archive_member and element_text
- restructured schema doc: instead of the table its now a
  definition list (no more horizontal scrolling in the wide table)
  also here assertions are grouped
2022-01-20 11:39:26 +01:00
Matthias Bernt 77d1f3b45b add delta min max to text, tabular, and size assertions
for tabular and size n/value becomes optional

and remove delta_frac
2022-01-20 11:39:26 +01:00
Matthias Bernt 9c27b6b4e2 add n for assert_has_text_matching and assert_has_line_matching 2022-01-20 11:39:25 +01:00
Matthias Bernt c5f2ac556b fix numbers in assertion test 2022-01-20 11:39:25 +01:00
Matthias Bernt 00948543d4 remove print and fix unit test 2022-01-20 11:39:25 +01:00