Skip to content

Commit

Permalink
snakemake: adapt env validation to fallback image
Browse files Browse the repository at this point in the history
closes reanahub/reana-workflow-engine-snakemake#13

installation: bump shared modules
  • Loading branch information
mvidalgarcia committed Sep 22, 2021
1 parent 6a89e49 commit 40fc775
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion reana_client/validation/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@

import requests

from reana_commons.config import WORKFLOW_RUNTIME_USER_GID, WORKFLOW_RUNTIME_USER_UID
from reana_commons.config import (
REANA_DEFAULT_SNAKEMAKE_ENV_IMAGE,
WORKFLOW_RUNTIME_USER_GID,
WORKFLOW_RUNTIME_USER_UID,
)


from reana_client.errors import EnvironmentValidationError
from reana_client.config import (
Expand Down Expand Up @@ -476,5 +481,13 @@ def validate_environment(self):
"""Validate environments in REANA Snakemake workflow."""
for step in self.workflow_steps:
image = step["environment"]
if not image:
self.messages.append(
{
"type": "warning",
"message": f"Environment image not specified, using {REANA_DEFAULT_SNAKEMAKE_ENV_IMAGE}.",
}
)
image = REANA_DEFAULT_SNAKEMAKE_ENV_IMAGE
kubernetes_uid = step.get("kubernetes_uid")
self._validate_environment_image(image, kubernetes_uid=kubernetes_uid)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"cwltool==3.1.20210628163208",
"jsonpointer>=2.0",
"PyYAML>=5.1",
"reana-commons[yadage,snakemake]>=0.8.0a25,<0.9.0",
"reana-commons[yadage,snakemake]>=0.8.0a27,<0.9.0",
"tablib>=0.12.1,<0.13",
"werkzeug>=0.14.1",
]
Expand Down

0 comments on commit 40fc775

Please sign in to comment.