Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
45 changes: 29 additions & 16 deletions planemo/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,16 @@ def config_join(*args):
properties["database_connection"] = _database_connection(database_location, **kwds)
if kwds.get("mulled_containers", False):
properties["mulled_channels"] = kwds.get("conda_ensure_channels", "")
if kwds.get("enable_gxits", True):
properties.update(
dict(
interactivetools_enable="True",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
interactivetools_enable="True",
interactivetools_enable="true",

interactivetools_map="database/interactivetools_map.sqlite",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
interactivetools_map="database/interactivetools_map.sqlite",

i wouldn't specify default values

galaxy_infrastructure_url="http://localhost:8080",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to template this with the actual port

Copy link
Member Author

@pavanvidem pavanvidem Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used the {template_args['port']}

interactivetools_upstream_proxy="False",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
interactivetools_upstream_proxy="False",
interactivetools_upstream_proxy="false",

interactivetools_proxy_host="localhost:4002",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use get_free_port to find a random port on the host

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used and tested locally with get_free_port and it works!

)
)

_handle_kwd_overrides(properties, kwds)

Expand Down Expand Up @@ -488,23 +498,26 @@ def write_galaxy_config(galaxy_root, properties, env, kwds, template_args, confi
env["GRAVITY_STATE_DIR"] = config_join("gravity")
with NamedTemporaryFile(suffix=".sock", delete=True) as nt:
env["SUPERVISORD_SOCKET"] = nt.name
config = {
"galaxy": properties,
"gravity": {
"galaxy_root": galaxy_root,
"gunicorn": {
"bind": f"{kwds.get('host', 'localhost')}:{template_args['port']}",
"preload": False,
},
"gx_it_proxy": {
"enable": False,
},
},
}
if kwds.get("enable_gxits", True):
config["gravity"]["gx_it_proxy"].update({
"enable": True,
"port": "4002",
})
write_file(
env["GALAXY_CONFIG_FILE"],
json.dumps(
{
"galaxy": properties,
"gravity": {
"galaxy_root": galaxy_root,
"gunicorn": {
"bind": f"{kwds.get('host', 'localhost')}:{template_args['port']}",
"preload": False,
},
"gx_it_proxy": {
"enable": False,
},
},
}
),
env["GALAXY_CONFIG_FILE"], json.dumps(config)
)


Expand Down
12 changes: 12 additions & 0 deletions planemo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,7 @@ def galaxy_serve_options():
install_prebuilt_client_option(),
skip_client_build_option(),
shed_install_option(),
enable_interactive_tools(),
)


Expand Down Expand Up @@ -2257,3 +2258,14 @@ def job_config_init_options():
runner_target_option(),
galaxy_version_option(),
)


def enable_interactive_tools():
return planemo_option(
"--enable_gxits",
is_flag=True,
default=False,
help=(
"Configure Galaxy to enable interactive tools."
),
)
Loading