pybioos 0.0.11__py3-none-any.whl → 0.0.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pybioos might be problematic. Click here for more details.
- bioos/__about__.py +1 -1
- bioos/bw_import.py +53 -36
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/METADATA +1 -1
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/RECORD +8 -8
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/LICENSE +0 -0
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/WHEEL +0 -0
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/entry_points.txt +0 -0
- {pybioos-0.0.11.dist-info → pybioos-0.0.13.dist-info}/top_level.txt +0 -0
bioos/__about__.py
CHANGED
bioos/bw_import.py
CHANGED
|
@@ -58,6 +58,15 @@ def bioos_workflow_import():
|
|
|
58
58
|
'--main_path',
|
|
59
59
|
help='Main workflow file path (required for git repository)',
|
|
60
60
|
default='')
|
|
61
|
+
parser.add_argument(
|
|
62
|
+
'--monitor',
|
|
63
|
+
action='store_true',
|
|
64
|
+
help='Monitor the workflow validation status until completion')
|
|
65
|
+
parser.add_argument(
|
|
66
|
+
'--monitor_interval',
|
|
67
|
+
type=int,
|
|
68
|
+
default=60,
|
|
69
|
+
help='Time interval in seconds for checking workflow status')
|
|
61
70
|
|
|
62
71
|
args = parser.parse_args()
|
|
63
72
|
logger = get_logger()
|
|
@@ -91,46 +100,54 @@ def bioos_workflow_import():
|
|
|
91
100
|
f"Successfully uploaded workflow: {result}, validating..., please wait..."
|
|
92
101
|
)
|
|
93
102
|
|
|
94
|
-
#
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
103
|
+
# 如果设置了monitor参数,则监控工作流状态
|
|
104
|
+
if args.monitor:
|
|
105
|
+
max_retries = 10 # 最大重试次数
|
|
106
|
+
retry_count = 0
|
|
107
|
+
|
|
108
|
+
while retry_count < max_retries:
|
|
109
|
+
df = workflow_resource.list()
|
|
110
|
+
workflow_info = df[df.Name == args.workflow_name]
|
|
111
|
+
|
|
112
|
+
if len(workflow_info) == 1:
|
|
113
|
+
status = workflow_info.iloc[0]["Status"]["Phase"]
|
|
114
|
+
|
|
115
|
+
if status == "Succeeded":
|
|
116
|
+
logger.info(
|
|
117
|
+
f"Workflow {args.workflow_name} validated successfully"
|
|
118
|
+
)
|
|
119
|
+
sys.exit(0)
|
|
120
|
+
elif status == "Failed":
|
|
121
|
+
logger.error(
|
|
122
|
+
f"Workflow {args.workflow_name} validation failed"
|
|
123
|
+
)
|
|
124
|
+
sys.exit(1)
|
|
125
|
+
elif status == "Importing":
|
|
126
|
+
logger.info(
|
|
127
|
+
f"Workflow {args.workflow_name} is still validating, please wait..."
|
|
128
|
+
)
|
|
129
|
+
time.sleep(args.monitor_interval)
|
|
130
|
+
retry_count += 1
|
|
131
|
+
else:
|
|
132
|
+
logger.error(
|
|
133
|
+
f"Workflow {args.workflow_name} has unknown status: {status}"
|
|
134
|
+
)
|
|
135
|
+
sys.exit(1)
|
|
120
136
|
else:
|
|
121
137
|
logger.error(
|
|
122
|
-
f"Workflow {args.workflow_name}
|
|
138
|
+
f"Workflow {args.workflow_name} not found after import"
|
|
123
139
|
)
|
|
124
140
|
sys.exit(1)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
141
|
+
|
|
142
|
+
logger.error(
|
|
143
|
+
f"Workflow validation timeout after {max_retries} retries")
|
|
144
|
+
sys.exit(1)
|
|
145
|
+
else:
|
|
146
|
+
# 如果没有设置monitor参数,直接退出
|
|
147
|
+
logger.info(
|
|
148
|
+
f"Workflow {args.workflow_name} submitted successfully, {result}"
|
|
149
|
+
)
|
|
150
|
+
sys.exit(0)
|
|
134
151
|
|
|
135
152
|
except Exception as e:
|
|
136
153
|
logger.error(f"Failed to import workflow: {str(e)}")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
bioos/__about__.py,sha256=
|
|
1
|
+
bioos/__about__.py,sha256=qoWnBZVGtNFcDVMbr_1oumQPR0jCeSSHSMfjBEQKgTw,57
|
|
2
2
|
bioos/__init__.py,sha256=4GZKi13lDTD25YBkGakhZyEQZWTER_OWQMNPoH_UM2c,22
|
|
3
3
|
bioos/bioos.py,sha256=fHzOb1l5wYxw6NVYYZDiFcgk4V28BAgWEc3ev12reWs,2409
|
|
4
4
|
bioos/bioos_workflow.py,sha256=LbKxK7Otzj9apJciI3jg_cfh92x9aZGlUyN5ZRAdZeU,14127
|
|
5
|
-
bioos/bw_import.py,sha256=
|
|
5
|
+
bioos/bw_import.py,sha256=BGH_sxAWMKNebPRUB89iMFRBHA52c7txaq7l1AkLmuU,5659
|
|
6
6
|
bioos/config.py,sha256=CvFabYqV1BkFWO8fnr5vBf6xNtNzA8hAEVeEIbvAOm8,4307
|
|
7
7
|
bioos/errors.py,sha256=Lzz2rkjDOTR2X9CnVkmsmqeOgmNqbi46WAxnC6LEGm0,2459
|
|
8
8
|
bioos/log.py,sha256=twiCvf5IgJB7uvzANwBluSlztJN8ZrxbGZUBGlZ0vps,3204
|
|
@@ -31,9 +31,9 @@ bioos/tests/workspaces.py,sha256=LuuRrTs2XqfE5mGQyJNl9RBtuMb4NZHBJFoO8HMZVYQ,522
|
|
|
31
31
|
bioos/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
bioos/utils/common_tools.py,sha256=fgMoE_-qZjgfQtUj_pmCTyYDtbJasyfH4Gm3VQsbgBQ,1651
|
|
33
33
|
bioos/utils/workflows.py,sha256=zRbwTUigoM5V5LFOgzQPm3kwxt5Ogz95OFfefJc6Fjo,133
|
|
34
|
-
pybioos-0.0.
|
|
35
|
-
pybioos-0.0.
|
|
36
|
-
pybioos-0.0.
|
|
37
|
-
pybioos-0.0.
|
|
38
|
-
pybioos-0.0.
|
|
39
|
-
pybioos-0.0.
|
|
34
|
+
pybioos-0.0.13.dist-info/LICENSE,sha256=cPkGXsgfPgEhIns7Lt3Avxx0Uy-VbdsoP8jvNGuj3cE,1063
|
|
35
|
+
pybioos-0.0.13.dist-info/METADATA,sha256=-jL5IDsWxBmicw6QXvkWFzGAxIZ4fKh-bnS6lMsAunk,830
|
|
36
|
+
pybioos-0.0.13.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92
|
|
37
|
+
pybioos-0.0.13.dist-info/entry_points.txt,sha256=G8eh4umiCimlV9nNNeyA3vqLyG3jfUj8uVNrgvAuhAM,110
|
|
38
|
+
pybioos-0.0.13.dist-info/top_level.txt,sha256=llpzydkKVDSaWZgz3bsTUsQmhoQpc_JcRJg2-H-5a2U,6
|
|
39
|
+
pybioos-0.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|