This repository was archived by the owner on Jul 24, 2020. It is now read-only.
Python3 fixes#92
Merged
jmchilton merged 2 commits intogalaxyproject:masterfrom Feb 26, 2018
Merged
Conversation
Fix `planemo lint --conda_requirements`, see the following test
traceback:
```
======================================================================
FAIL: test_lint_dependencies_okay (tests.test_lint.LintTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/galaxyproject/planemo/tests/test_lint.py", line 101, in test_lint_dependencies_okay
self._check_exit_code(lint_cmd)
File "/home/travis/build/galaxyproject/planemo/tests/test_utils.py", line 100, in _check_exit_code
raise AssertionError(message)
nose.proxy.AssertionError: Planemo command [lint --conda_requirements /home/travis/build/galaxyproject/planemo/tests/../project_templates/seqtk_complete/seqtk_seq.xml] resulted in unexpected exit code [-1], expected exit code [0]]. Command output [Linting tool /home/travis/build/galaxyproject/planemo/project_templates/seqtk_complete/seqtk_seq.xml
...
Traceback (most recent call last):
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/testing.py", line 279, in invoke
prog_name=self.get_default_prog_name(cli), **extra)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/travis/build/galaxyproject/planemo/planemo/cli.py", line 177, in handle_blended_options
return f(*args, **kwds)
File "/home/travis/build/galaxyproject/planemo/planemo/commands/cmd_lint.py", line 58, in cli
recursive=kwds["recursive"]
File "/home/travis/build/galaxyproject/planemo/planemo/tool_lint.py", line 31, in lint_tools_on_path
if not lint_tool_source(tool_xml, **lint_args):
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/galaxy/tools/lint.py", line 17, in lint_tool_source
lint_tool_source_with(lint_context, tool_source, extra_modules)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/galaxy/tools/lint.py", line 53, in lint_tool_source_with
lint_context.lint(name, value, tool_source)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/galaxy/tools/lint.py", line 81, in lint
lint_func(lint_target, self)
File "/home/travis/build/galaxyproject/planemo/planemo/linters/conda_requirements.py", line 18, in lint_requirements_in_conda
(best_hit, exact) = best_practice_search(conda_target)
File "/home/travis/build/galaxyproject/planemo/planemo/conda.py", line 155, in best_practice_search
return conda_util.best_search_result(conda_target, conda_context=conda_context, channels_override=BEST_PRACTICE_CHANNELS, offline=offline)
File "/home/travis/build/galaxyproject/planemo/.tox/py34/lib/python3.4/site-packages/galaxy/tools/deps/conda_util.py", line 462, in best_search_result
hits = json.loads(res).get(conda_target.package, [])
File "/usr/lib/python3.4/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
Member
|
Thanks a million, you are awesome! I've published 18.1.0 that includes this to help with galaxyproject/planemo#774. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xref. galaxyproject/planemo#774