BaseAppConfiguration.root is now an absolute path, and so is
BaseAppConfiguration.data_dir, so the result of
`resolve_path(kwargs.get("tool_dependency_dir", "dependencies"), self.data_dir)`
is not "none" as it used to be, but `"<galaxy_data_dir>/none"` and so
the fallback will not be used.
This can be fixed by setting the default target dir to `dependencies`
and join it to self.data_dir, which defaults to `galaxy_root/database`
on classic installations.
Fixes the issues in https://github.com/galaxyproject/galaxy/pull/8195#issuecomment-513246346
This is a temporary solution. Ideally, this should be generated using
the same logic that is used for generating the links on the left menu
panel. And no page reloads, of course.
This replaces a previous (now closed) PR:
https://github.com/galaxyproject/galaxy/pull/8279
A few changes:
- tests for code in galaxy/tool_util moved under test/unit/tool_util
- common parts (used in both tools and tool_util) factored out into
unittest_utils/sample_data.py
- symlink to sample_data.py in test/unit/tool_util/ is needed to make
the tool_util package tests run. This is not an ideal solution, but it
avoids duplication of the sample data used by tests in tools/ and
tool_util/.
`PIP_PROGRESS_BAR` environment variable is used by `pip` to set the value
for the `--progress-bar` option. It seems that specifying it also only the
command line does not override it in some configurations, e.g. on TravisCI
Linux builds of BioBlend, see e.g.
https://travis-ci.org/galaxyproject/bioblend/jobs/558857557
The cause of this is related to pulling tool_util out of tools:
https://github.com/galaxyproject/galaxy/pull/8279
The solution here is a temporary hack (add helper module, util.py, to
tests/, then make tests a package).
A better solution will be to separate test/unit/tools into tools/ and
tool_util/ - I intend to take care of it soon.
Factor out __environ context manager into helper class (and rename).
Move context manager tests into separate test module. Improve tests.
Refactor context manager:
- Change default arg to None
- Simplify: I don't think we need to keep track of new keys;
environ.clear() + environ.update(old_environ) should be sufficient.
We significantly reduce complexity at the minor cost of a little more
space.
- Instead of wrapping in a try/except block, just check if key exists
before deleting.
Modify test_tool_deps to use the new context manager.