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

Using remote test data feature. Configurable conda channels. #54

Merged
merged 5 commits into from
Mar 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile_galaxy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.9

COPY . /source

# RUN pip install git+https://github.com/oda-hub/nb2workflow@master#egg=nb2workflow[galaxy]
RUN pip install git+https://github.com/oda-hub/nb2workflow@master#egg=nb2workflow[galaxy]
RUN pip install /source[galaxy] && rm -r /source

# Add Tini
Expand Down
28 changes: 19 additions & 9 deletions odabot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import click
from dynaconf import Dynaconf
from dynaconf.vendor.box import BoxList

logger = logging.getLogger()

Expand Down Expand Up @@ -684,6 +685,11 @@ def make_galaxy_tools(obj, dry_run, loop, force, pattern):
git_name = obj['settings'].get('nb2galaxy.git_identity.name', 'ODA bot')
git_email = obj['settings'].get('nb2galaxy.git_identity.email', '[email protected]')
git_credentials = obj['settings'].get('nb2galaxy.git_credentials', os.path.join(os.environ.get('HOME', '/'), '.git-credentials'))
available_channels = obj['settings'].get('nb2galaxy.conda_channels', ['conda-forge'])
if isinstance(available_channels, BoxList):
available_channels = available_channels.to_list()
elif isinstance(available_channels, str):
available_channels = available_channels.split(',')

repo_cache_dir = os.path.abspath(repo_cache_dir)
state_storage = os.path.abspath(state_storage)
Expand Down Expand Up @@ -834,16 +840,20 @@ def repo_file_path_if_available(filename):
outd = os.path.join(tools_repo_dir, 'tools', project['path'])
shutil.rmtree(outd, ignore_errors=True)

repo_files_baseurl = f"{project['web_url']}/-/raw/{last_commit['id']}/"

to_galaxy(input_path=wf_repo_dir,
toolname=tool_name,
out_dir=outd,
tool_version=new_version,
tool_id=tool_id,
requirements_file=req_file,
conda_environment_file=env_file,
citations_bibfile=bib_file,
help_file=help_file
)
toolname=tool_name,
out_dir=outd,
tool_version=new_version,
tool_id=tool_id,
requirements_file=req_file,
conda_environment_file=env_file,
citations_bibfile=bib_file,
help_file=help_file,
available_channels=available_channels,
test_data_baseurl=repo_files_baseurl
)

# creating shed file
if os.path.isfile(os.path.join(wf_repo_dir, '.shed.yml')):
Expand Down
Loading