ebi-eva-common-pyutils 0.6.3__py3-none-any.whl → 0.6.5__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.
- ebi_eva_common_pyutils/network_utils.py +8 -1
- {ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/METADATA +3 -3
- {ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/RECORD +8 -8
- {ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/WHEEL +1 -1
- ebi_eva_internal_pyutils/mongodb/mongo_database.py +1 -3
- {ebi_eva_common_pyutils-0.6.3.data → ebi_eva_common_pyutils-0.6.5.data}/scripts/archive_directory.py +0 -0
- {ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/LICENSE +0 -0
- {ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
|
|
14
|
+
import time
|
|
15
15
|
|
|
16
16
|
import requests
|
|
17
17
|
import subprocess
|
|
@@ -43,6 +43,13 @@ def forward_remote_port_to_local_port(remote_host: str, remote_port: int, local_
|
|
|
43
43
|
port_forward_command = 'ssh -N -L{0}:localhost:{1} {2}'.format(local_port, remote_port, remote_host)
|
|
44
44
|
logger.info("Forwarding port to local port using command: " + port_forward_command)
|
|
45
45
|
proc = subprocess.Popen(port_forward_command.split(" "))
|
|
46
|
+
time.sleep(5)
|
|
47
|
+
# Ensure that the process is still running
|
|
48
|
+
poll = proc.poll()
|
|
49
|
+
if poll is not None:
|
|
50
|
+
# The process already completed which mean it most likely crashed
|
|
51
|
+
logger.error(f'Port Forwarding {remote_host}:{remote_port} -> {local_port} failed!')
|
|
52
|
+
raise subprocess.CalledProcessError(proc.returncode, proc.args)
|
|
46
53
|
return proc.pid
|
|
47
54
|
|
|
48
55
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.6.
|
|
2
|
+
Name: ebi_eva_common_pyutils
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: EBI EVA - Common Python Utilities
|
|
5
5
|
Home-page: https://github.com/EBIVariation/eva-common-pyutils
|
|
6
6
|
License: Apache
|
|
@@ -19,5 +19,5 @@ Requires-Dist: retry
|
|
|
19
19
|
Provides-Extra: eva-internal
|
|
20
20
|
Requires-Dist: psycopg2-binary ; extra == 'eva-internal'
|
|
21
21
|
Requires-Dist: pymongo ; extra == 'eva-internal'
|
|
22
|
-
Requires-Dist: networkx
|
|
22
|
+
Requires-Dist: networkx <=2.5 ; extra == 'eva-internal'
|
|
23
23
|
|
|
@@ -7,7 +7,7 @@ ebi_eva_common_pyutils/ena_utils.py,sha256=S2MmnWQ_9MJjlkaQY_by1-GGbTyi8SKp8XRcp
|
|
|
7
7
|
ebi_eva_common_pyutils/file_utils.py,sha256=eIlQKSVKkEjMNX7emrDzaQyQdGvQdb64gnfEhb6uYsE,1375
|
|
8
8
|
ebi_eva_common_pyutils/logger.py,sha256=hT20ktN_oGeB_5ofVfd_aGXB6xYOe0Y5b3EVRYCuFb8,5093
|
|
9
9
|
ebi_eva_common_pyutils/ncbi_utils.py,sha256=sh9E_oDhDtliihJ0-FZuDd7paeidW5GfqRr5vBTo2k4,4859
|
|
10
|
-
ebi_eva_common_pyutils/network_utils.py,sha256=
|
|
10
|
+
ebi_eva_common_pyutils/network_utils.py,sha256=iJjs5PPzT1V4CceZnCHOTs711AmpwlDo59wb1XHdTak,2648
|
|
11
11
|
ebi_eva_common_pyutils/assembly/__init__.py,sha256=KSWPwBY5nZj00odxWFntk8Sqg_rw273xH8S5D6Jo-T4,67
|
|
12
12
|
ebi_eva_common_pyutils/assembly/assembly.py,sha256=IEmleROX4ZchPyhINKCuMmET_Ih1Jg4ok-opAKY6Z9A,3142
|
|
13
13
|
ebi_eva_common_pyutils/contig_alias/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -19,7 +19,7 @@ ebi_eva_common_pyutils/taxonomy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
19
19
|
ebi_eva_common_pyutils/taxonomy/taxonomy.py,sha256=p3XV4g3y0hEjyeZ4PwgN7Q3Et9G515ctQkSIo1kdDbU,2259
|
|
20
20
|
ebi_eva_common_pyutils/variation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
ebi_eva_common_pyutils/variation/contig_utils.py,sha256=kMNEW_P2yPnd8Xx1tep19hy5ee7ojxz6ZOO1grTQsRQ,5230
|
|
22
|
-
ebi_eva_common_pyutils-0.6.
|
|
22
|
+
ebi_eva_common_pyutils-0.6.5.data/scripts/archive_directory.py,sha256=0lWJ0ju_AB2ni7lMnJXPFx6U2OdTGbe-WoQs-4BfKOM,4976
|
|
23
23
|
ebi_eva_internal_pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
ebi_eva_internal_pyutils/archive_directory.py,sha256=IxVEfh_gaCiT652k0Q_-58fonRusy1yzXu7BCO8yVLo,4989
|
|
25
25
|
ebi_eva_internal_pyutils/config_utils.py,sha256=EGRC5rsmU_ug7OY9-t1UW1XZXRsauSyZB9xPcBux8ts,7909
|
|
@@ -28,11 +28,11 @@ ebi_eva_internal_pyutils/mongo_utils.py,sha256=YxKHtb5ygDiGLOtEiiAMFCP2ow6FL9Kq0
|
|
|
28
28
|
ebi_eva_internal_pyutils/pg_utils.py,sha256=FUQVwiX_7F2-4sSzoaCVX2me0zAqR8nGIj6NW5d304A,4398
|
|
29
29
|
ebi_eva_internal_pyutils/spring_properties.py,sha256=WjPozWtXbAZGNqlgvY6GHps2KFB1rY9OaTs46obW3pM,15265
|
|
30
30
|
ebi_eva_internal_pyutils/mongodb/__init__.py,sha256=0oyTlkYZCV7udlPl09Zl-sDyE3c97QZMMTEFIa6uYIw,76
|
|
31
|
-
ebi_eva_internal_pyutils/mongodb/mongo_database.py,sha256=
|
|
31
|
+
ebi_eva_internal_pyutils/mongodb/mongo_database.py,sha256=kesaJaaxYFeF_uYZBgL8tbufGKUXll7bXb4WlOS9vKM,9596
|
|
32
32
|
ebi_eva_internal_pyutils/nextflow/__init__.py,sha256=OOiJS8jZOz98q0t77NNog7aI_fFrVxi4kGmiSskuAqM,122
|
|
33
33
|
ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py,sha256=ew623hhK8jmFLQjJwLZbgBmW9RTiJBEULVqHfIUv_dc,10114
|
|
34
|
-
ebi_eva_common_pyutils-0.6.
|
|
35
|
-
ebi_eva_common_pyutils-0.6.
|
|
36
|
-
ebi_eva_common_pyutils-0.6.
|
|
37
|
-
ebi_eva_common_pyutils-0.6.
|
|
38
|
-
ebi_eva_common_pyutils-0.6.
|
|
34
|
+
ebi_eva_common_pyutils-0.6.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
35
|
+
ebi_eva_common_pyutils-0.6.5.dist-info/METADATA,sha256=RLaCUwFMStLAYr29_xwuX0jvNEGTPNmVfEY389lvgNw,822
|
|
36
|
+
ebi_eva_common_pyutils-0.6.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
37
|
+
ebi_eva_common_pyutils-0.6.5.dist-info/top_level.txt,sha256=sXoiqiGU8vlMQpFWDlKrekxhlusk06AhkOH3kSvDT6c,48
|
|
38
|
+
ebi_eva_common_pyutils-0.6.5.dist-info/RECORD,,
|
|
@@ -111,9 +111,7 @@ class MongoDatabase(AppLogger):
|
|
|
111
111
|
shard_collection_command = f'sh.shardCollection(' \
|
|
112
112
|
f'"{self.db_name}.{collection_name}", ' \
|
|
113
113
|
f'{shard_key_repr}, {str(shard_key_uniqueness_flag).lower()})'
|
|
114
|
-
sharding_command = f"
|
|
115
|
-
f"--eval " \
|
|
116
|
-
f"'{shard_collection_command}' "
|
|
114
|
+
sharding_command = f"mongosh --eval '{shard_collection_command}' {self.uri} "
|
|
117
115
|
sharding_command += self._get_optional_secrets_file_stdin()
|
|
118
116
|
run_command_with_output(f"Sharding collection {collection_name} in the database {self.uri_with_db_name} "
|
|
119
117
|
f"with key {shard_key_repr}...", sharding_command,
|
{ebi_eva_common_pyutils-0.6.3.data → ebi_eva_common_pyutils-0.6.5.data}/scripts/archive_directory.py
RENAMED
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.3.dist-info → ebi_eva_common_pyutils-0.6.5.dist-info}/top_level.txt
RENAMED
|
File without changes
|