-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch: update support for fixed queue workflows (#169)
* first implementation * docs * pytest * remove curated workflows CI as it is already deprecated * update dockerfile * accounting for archived pipelines * improve message * message * message * review suggestions * removing extra space
- Loading branch information
Showing
13 changed files
with
117 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Full contents of Dockerfile | ||
|
||
FROM continuumio/miniconda3:23.10.0-1 | ||
FROM continuumio/miniconda3:24.7.1-0 | ||
LABEL name="quay.io/lifebitaiorg/cloudos-cli" \ | ||
description="The cloudos-py docker container" \ | ||
description="The cloudos-cli docker container" \ | ||
maintainer="David Pineyro <[email protected]>" | ||
|
||
# Use the base conda env to not be reliant on conda activate when using pip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.11.0' | ||
__version__ = '2.11.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ dependencies: | |
- requests | ||
- click | ||
- pandas | ||
- numpy==1.26.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Pytest for method Cloudos.is_module""" | ||
import mock | ||
import responses | ||
from responses import matchers | ||
from cloudos.clos import Cloudos | ||
from tests.functions_for_pytest import load_json_file | ||
|
||
INPUT = "tests/test_data/process_workflow_list_initial_request.json" | ||
APIKEY = 'vnoiweur89u2ongs' | ||
CLOUDOS_URL = 'http://cloudos.lifebit.ai' | ||
WORKSPACE_ID = 'lv89ufc838sdig' | ||
|
||
|
||
@mock.patch('cloudos.clos', mock.MagicMock()) | ||
@responses.activate | ||
def test_is_module(): | ||
""" | ||
Test 'is_module' to work as intended | ||
API request is mocked and replicated with json files | ||
""" | ||
json_data = load_json_file(INPUT) | ||
params = {"teamId": WORKSPACE_ID, "apikey": APIKEY} | ||
header = { | ||
"Accept": "application/json, text/plain, */*", | ||
"Content-Type": "application/json;charset=UTF-8" | ||
} | ||
search_str = f"teamId={WORKSPACE_ID}&apikey={APIKEY}" | ||
# mock GET method with the .json | ||
responses.add( | ||
responses.GET, | ||
url=f"{CLOUDOS_URL}/api/v1/workflows?{search_str}", | ||
body=json_data, | ||
headers=header, | ||
match=[matchers.query_param_matcher(params)], | ||
status=200) | ||
# start cloudOS service | ||
clos = Cloudos(apikey=APIKEY, cromwell_token=None, cloudos_url=CLOUDOS_URL) | ||
# get mock response | ||
response = clos.is_module(workspace_id=WORKSPACE_ID, | ||
workflow_name="multiqc") | ||
assert response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
_id,name,archived.status,mainFile,workflowType,repository.name,repository.platform,repository.url,repository.isPrivate | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX | ||
_id,name,isModule,archived.status,mainFile,workflowType,repository.name,repository.platform,repository.url,repository.isPrivate | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX | ||
XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX |