django-to-galaxy 0.6.9.2__py3-none-any.whl → 0.6.9.4__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 django-to-galaxy might be problematic. Click here for more details.
- django_to_galaxy/models/invocation.py +10 -4
- django_to_galaxy/version.py +1 -1
- {django_to_galaxy-0.6.9.2.dist-info → django_to_galaxy-0.6.9.4.dist-info}/METADATA +2 -3
- {django_to_galaxy-0.6.9.2.dist-info → django_to_galaxy-0.6.9.4.dist-info}/RECORD +6 -6
- {django_to_galaxy-0.6.9.2.dist-info → django_to_galaxy-0.6.9.4.dist-info}/WHEEL +1 -1
- {django_to_galaxy-0.6.9.2.dist-info → django_to_galaxy-0.6.9.4.dist-info}/LICENSE +0 -0
|
@@ -12,6 +12,7 @@ from django_to_galaxy.utils import enabled_cache
|
|
|
12
12
|
|
|
13
13
|
from django.core.exceptions import ObjectDoesNotExist
|
|
14
14
|
|
|
15
|
+
READY = "ready"
|
|
15
16
|
RUNNING = "running"
|
|
16
17
|
DONE = "done"
|
|
17
18
|
ERROR = "error"
|
|
@@ -74,17 +75,19 @@ class Invocation(models.Model):
|
|
|
74
75
|
"""Get galaxy object using bioblend."""
|
|
75
76
|
return self.workflow.galaxy_owner.obj_gi.invocations.get(self.galaxy_id)
|
|
76
77
|
|
|
77
|
-
def complet_jobs_summary(self, step):
|
|
78
|
+
def complet_jobs_summary(self, step, subworkflow_invocation_state):
|
|
78
79
|
subinv = self.galaxy_invocation.gi.invocations.get(
|
|
79
80
|
step.wrapped["subworkflow_invocation_id"]
|
|
80
81
|
)
|
|
82
|
+
if subinv.state != READY or not subinv.steps:
|
|
83
|
+
subworkflow_invocation_state = subinv.state
|
|
81
84
|
sub_jobs_summary = subinv.step_jobs_summary()
|
|
82
85
|
for job in sub_jobs_summary:
|
|
83
86
|
self.step_jobs_summary.append(job)
|
|
84
87
|
for sub in subinv.steps:
|
|
85
88
|
if "subworkflow_invocation_id" in sub.wrapped:
|
|
86
89
|
if sub.wrapped["subworkflow_invocation_id"]:
|
|
87
|
-
self.complet_jobs_summary(sub)
|
|
90
|
+
self.complet_jobs_summary(sub, subworkflow_invocation_state)
|
|
88
91
|
|
|
89
92
|
@property
|
|
90
93
|
def percentage_done(self) -> float:
|
|
@@ -93,10 +96,13 @@ class Invocation(models.Model):
|
|
|
93
96
|
return 100.0
|
|
94
97
|
self.step_jobs_summary = self.step_jobs_summary()
|
|
95
98
|
|
|
99
|
+
subworkflow_invocation_state = None
|
|
100
|
+
if self.galaxy_invocation.state != READY:
|
|
101
|
+
subworkflow_invocation_state = PAUSED
|
|
96
102
|
for step in self.galaxy_invocation.steps:
|
|
97
103
|
if "subworkflow_invocation_id" in step.wrapped:
|
|
98
104
|
if step.wrapped["subworkflow_invocation_id"]:
|
|
99
|
-
self.complet_jobs_summary(step)
|
|
105
|
+
self.complet_jobs_summary(step, subworkflow_invocation_state)
|
|
100
106
|
|
|
101
107
|
count_states = defaultdict(int)
|
|
102
108
|
for step in self.step_jobs_summary:
|
|
@@ -106,7 +112,7 @@ class Invocation(models.Model):
|
|
|
106
112
|
percentage_done = count_states.get("ok", 0) / len(self.step_jobs_summary)
|
|
107
113
|
except ZeroDivisionError:
|
|
108
114
|
percentage_done = 0
|
|
109
|
-
if percentage_done == 1:
|
|
115
|
+
if percentage_done == 1 and subworkflow_invocation_state is None:
|
|
110
116
|
self.status = DONE
|
|
111
117
|
self.save()
|
|
112
118
|
if "error" in count_states.keys():
|
django_to_galaxy/version.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-to-galaxy
|
|
3
|
-
Version: 0.6.9.
|
|
3
|
+
Version: 0.6.9.4
|
|
4
4
|
Summary: Django extension that eases communication with Galaxy instance to execute workflows.
|
|
5
5
|
Author: Kenzo-Hugo Hillion
|
|
6
6
|
Author-email: hillion.kenzo@posteo.net
|
|
7
|
-
Requires-Python:
|
|
7
|
+
Requires-Python: ==3.11.*
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
11
10
|
Requires-Dist: Django (>=5.1.1,<6.0.0)
|
|
12
11
|
Requires-Dist: Markdown (>=3.3.6,<4.0.0)
|
|
13
12
|
Requires-Dist: bioblend (>=0.16.0,<0.17.0)
|
|
@@ -46,7 +46,7 @@ django_to_galaxy/models/galaxy_instance.py,sha256=931iyrqJxK6YCbkaC6FPdqMRI_hhGQ
|
|
|
46
46
|
django_to_galaxy/models/galaxy_output_file.py,sha256=oAq7HZBk3svG88NagFpkpiB5TQoncbpGFxCCTFoCzyo,1915
|
|
47
47
|
django_to_galaxy/models/galaxy_user.py,sha256=Cz6wmyD3PvltFi2yKEKr2z7YTsxlmnNV8xwA0Gltu_o,3264
|
|
48
48
|
django_to_galaxy/models/history.py,sha256=RF661ULnSMO6wvEutZ-qVDY-9vxu-JcWiGbN7MwdVvI,2635
|
|
49
|
-
django_to_galaxy/models/invocation.py,sha256=
|
|
49
|
+
django_to_galaxy/models/invocation.py,sha256=yPx0wLkVz43bGl9Ct19hZaGOM9ka5HU_RpjaYgrZC3g,8720
|
|
50
50
|
django_to_galaxy/models/workflow.py,sha256=1Ok0TSSIM-LJbaY1Vm19YVg_WwDxznbLDcXI71S_IL8,1891
|
|
51
51
|
django_to_galaxy/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
django_to_galaxy/schemas/dataset.py,sha256=yjwLJGb487VJDXoXGg8fG_TW6TJPeyeGtd9vofU-7HI,396
|
|
@@ -54,8 +54,8 @@ django_to_galaxy/settings.py,sha256=Jn1gznlxhlu57D_cdbAhBQTTN9jq4GIb31czhQQUtJo,
|
|
|
54
54
|
django_to_galaxy/templates/admin/import_workflows.html,sha256=YB101H99EOR8td_DzfNshhJYpXpGD9aJNh8t4mKPgEQ,2389
|
|
55
55
|
django_to_galaxy/urls.py,sha256=ydMl_0qSyz8GSGkWpiSzU3khqj9mPyZacx532JybLHk,106
|
|
56
56
|
django_to_galaxy/utils.py,sha256=gjUzzqfpili66CY7vFyseqHOD9vqWg_2tzWAiTe3pNE,1625
|
|
57
|
-
django_to_galaxy/version.py,sha256=
|
|
58
|
-
django_to_galaxy-0.6.9.
|
|
59
|
-
django_to_galaxy-0.6.9.
|
|
60
|
-
django_to_galaxy-0.6.9.
|
|
61
|
-
django_to_galaxy-0.6.9.
|
|
57
|
+
django_to_galaxy/version.py,sha256=YspVavZCvh-ZZ7Wk2kq7lZ-f16x-8wa-uUPn_gBeCNo,114
|
|
58
|
+
django_to_galaxy-0.6.9.4.dist-info/LICENSE,sha256=Er3Bp2y6Wf31e0s1-Tdu_d6Gd89FtTizmGUJzGQkWvo,34498
|
|
59
|
+
django_to_galaxy-0.6.9.4.dist-info/METADATA,sha256=KNx7KeNPtDFrRkW8mZYGAjLkq7JmDQZhKPBRYnPbmQc,612
|
|
60
|
+
django_to_galaxy-0.6.9.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
61
|
+
django_to_galaxy-0.6.9.4.dist-info/RECORD,,
|
|
File without changes
|