Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config options for tool dependency installs #19565

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ utils](https://vue-test-utils.vuejs.org/) to mount individual components in a
test bed and check them for rendered features. Please use jest-based mocking
for isolating test functionality.

### Linting

We use [Prettier](https://prettier.io/) to enforce code style and best
practices. Before submitting a pull request, run the following commands
as appropriate to ensure all the code is properly formatted:

make client-lint
make client-format

### Running the tests

#### At Build-Time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ import { getLocalVue } from "tests/jest/helpers";
import InstallationSettings from "./InstallationSettings";

jest.mock("app");
// Mock the useConfig composable
jest.mock("@/composables/config", () => ({
useConfig: () => ({
config: {
install_tool_dependencies: true,
install_repository_dependencies: true,
install_resolver_dependencies: true,
},
isConfigLoaded: true,
}),
}));

const localVue = getLocalVue();

Expand All @@ -28,5 +39,9 @@ describe("InstallationSettings", () => {
expect(wrapper.find(".title").text()).toBe("Installing 'name'");
expect(wrapper.find(".description").text()).toBe("long_description");
expect(wrapper.find(".revision").text()).toBe("owner rev. changesetRevision");

expect(wrapper.vm.installToolDependencies).toBe(true);
expect(wrapper.vm.installRepositoryDependencies).toBe(true);
expect(wrapper.vm.installResolverDependencies).toBe(true);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
</b-modal>
</template>
<script>
import { useConfig } from "@/composables/config";

export default {
props: {
repo: {
Expand Down Expand Up @@ -77,13 +79,17 @@ export default {
default: false,
},
},
setup() {
const { config, isConfigLoaded } = useConfig(true);
return { config, isConfigLoaded };
},
data() {
return {
modalShow: true,
advancedShow: false,
installToolDependencies: true,
installRepositoryDependencies: true,
installResolverDependencies: true,
installToolDependencies: this.config.install_tool_dependencies,
installRepositoryDependencies: this.config.install_repository_dependencies,
installResolverDependencies: this.config.install_resolver_dependencies,
toolConfig: null,
toolSection: null,
};
Expand Down
47 changes: 47 additions & 0 deletions doc/source/admin/galaxy_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5747,6 +5747,53 @@
:Type: int


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``install_tool_dependencies``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
Install tool dependencies when installing tools from the Tool
Shed. These are the software packages and libraries required for a
tool to function properly. Tool dependencies are typically
specified in the tool's XML configuration using <requirement>
tags. Galaxy can automatically install these dependencies if the
tool_dependency_dir is properly configured in the galaxy.yml file.
This option should be set to false if containerized versions of
tools are used.
:Default: ``true``
:Type: bool


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``install_repository_dependencies``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
Install repository dependencies when installing tools from the
Tool Shed. These are other Tool Shed repositories that the tool
dannon marked this conversation as resolved.
Show resolved Hide resolved
being installed depends on. This is commonly used with tool
suites. Repository dependencies ensure that all necessary
components are installed for the tool (or suite) to work correctly
within the Galaxy environment.
:Default: ``true``
:Type: bool


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``install_resolver_dependencies``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
Install resolver dependencies when installing tools from the Tool
Shed. These are mechanisms used by Galaxy to locate and make
available the required software packages for tools. Galaxy uses
dependency resolvers (e.g., Conda) to determine how to satisfy
tool requirements. This option should be set to false if
containerized versions of tools are used.
:Default: ``true``
:Type: bool


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``enable_failed_jobs_working_directory_cleanup``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
13 changes: 12 additions & 1 deletion doc/source/dev/faq.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
How Do I...
How Do I ...
===========

This section contains a number of smaller topics with links and examples meant
Expand All @@ -25,4 +25,15 @@ We have added a Makefile which will let you do this. You can simply run:
Please see the ``Makefile`` itself for details and other options. There is also a readme at
``client/README.md``.

... rebuild the Galaxy configuration schema?
-------------------------------------------

Galaxy configurations have a schema that is used to validate configuration files. This schema is
defined in ``lib/galaxy/config/schemas/config_schema.yml``. If you make changes to the schema, to rebuild
all sample YAML and RST files run

.. code-block:: bash

make config-rebuild

Then add updated files to your commit.
43 changes: 34 additions & 9 deletions lib/galaxy/config/sample/galaxy.yml.sample
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Galaxy is configured by default to be usable in a single-user development
# environment. To tune the application for a multi-user production
# environment, see the documentation at:
#
#
# https://docs.galaxyproject.org/en/master/admin/production.html
#
#
# Throughout this sample configuration file, except where stated otherwise,
# uncommented values override the default if left unset, whereas commented
# values are set to the default value. Relative paths are relative to the root
# Galaxy directory.
#
#
# Examples of many of these options are explained in more detail in the Galaxy
# Community Hub.
#
#
# https://galaxyproject.org/admin/config
#
#
# Config hackers are encouraged to check there before asking for help.
#
#
# Configuration for Gravity process manager.
# ``uwsgi:`` section will be ignored if Galaxy is started via Gravity commands (e.g ``./run.sh``, ``galaxy`` or ``galaxyctl``).
gravity:
Expand Down Expand Up @@ -189,9 +189,9 @@ gravity:
# Public-facing port of the proxy
# port: 4002

# Routes file to monitor.
# Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. This is ignored if
# ``interactivetools_map is set``.
# Database to monitor.
# Should be set to the same value as ``interactivetools_map`` (or ``interactivetoolsproxy_map``) in the ``galaxy:`` section. This is
# ignored if either ``interactivetools_map`` or ``interactivetoolsproxy_map`` are set.
# sessions: database/interactivetools_map.sqlite

# Include verbose messages in gx-it-proxy
Expand Down Expand Up @@ -3067,6 +3067,31 @@ galaxy:
# affects s3fs file sources.
#file_source_listings_expiry_time: 60

# Install tool dependencies when installing tools from the Tool Shed.
# These are the software packages and libraries required for a tool to
# function properly. Tool dependencies are typically specified in the
# tool's XML configuration using <requirement> tags. Galaxy can
# automatically install these dependencies if the tool_dependency_dir
# is properly configured in the galaxy.yml file. This option should be
# set to false if containerized versions of tools are used.
#install_tool_dependencies: true

# Install repository dependencies when installing tools from the Tool
# Shed. These are other Tool Shed repositories that the tool being
# installed depends on. This is commonly used with tool suites.
# Repository dependencies ensure that all necessary components are
# installed for the tool (or suite) to work correctly within the
# Galaxy environment.
#install_repository_dependencies: true

# Install resolver dependencies when installing tools from the Tool
# Shed. These are mechanisms used by Galaxy to locate and make
# available the required software packages for tools. Galaxy uses
# dependency resolvers (e.g., Conda) to determine how to satisfy tool
# requirements. This option should be set to false if containerized
# versions of tools are used.
#install_resolver_dependencies: true

# Enables the cleanup of failed Galaxy job's working directories. Runs
# in a Celery task.
#enable_failed_jobs_working_directory_cleanup: false
Expand Down
37 changes: 37 additions & 0 deletions lib/galaxy/config/schemas/config_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4241,6 +4241,43 @@ mapping:
queries while browsing a file sources. Longer times will result in fewer requests to file sources but
outdated contents might be displayed to the user. Currently only affects s3fs file sources.

install_tool_dependencies:
type: bool
default: true
required: false
desc: |
Install tool dependencies when installing tools from the Tool Shed.
These are the software packages and libraries required for a tool to
function properly. Tool dependencies are typically specified in the
tool's XML configuration using <requirement> tags. Galaxy can
automatically install these dependencies if the tool_dependency_dir is
properly configured in the galaxy.yml file. This option should be set
to false if containerized versions of tools are used.

install_repository_dependencies:
type: bool
default: true
required: false
desc: |
Install repository dependencies when installing tools from the Tool
Shed. These are other Tool Shed repositories that the tool being
installed depends on. This is commonly used with tool suites.
Repository dependencies ensure that all necessary components are
installed for the tool (or suite) to work correctly within the Galaxy
environment.

install_resolver_dependencies:
type: bool
default: true
required: false
desc: |
Install resolver dependencies when installing tools from the Tool
Shed. These are mechanisms used by Galaxy to locate and make available
the required software packages for tools. Galaxy uses dependency
resolvers (e.g., Conda) to determine how to satisfy tool requirements.
This option should be set to false if containerized versions of tools
are used.

enable_failed_jobs_working_directory_cleanup:
type: bool
default: false
Expand Down
5 changes: 4 additions & 1 deletion lib/galaxy/managers/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def reload_toolbox(self):
# but doesn't have a model like them. It might be better in config.py or a
# totally new area, but I'm leaving it in managers for now for class consistency.
class ConfigSerializer(base.ModelSerializer):
"""Configuration (galaxy.ini) settings viewable by all users"""
"""Configuration (galaxy.yml) settings viewable by all users"""

def __init__(self, app):
super().__init__(app)
Expand Down Expand Up @@ -230,6 +230,9 @@ def _config_is_truthy(item, key, **context):
"help_forum_api_url": _use_config,
"enable_help_forum_tool_panel_integration": _use_config,
"llm_api_configured": lambda item, key, **context: bool(item.openai_api_key),
"install_tool_dependencies": _use_config,
"install_repository_dependencies": _use_config,
"install_resolver_dependencies": _use_config,
}


Expand Down
Loading