NGPIris 5.2.2.dev2__py3-none-any.whl → 5.2.2.dev4__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.
NGPIris/cli/__init__.py CHANGED
@@ -95,7 +95,6 @@ def upload(context : Context, bucket : str, source : str, destination : str):
95
95
  hcph : HCPHandler = get_HCPHandler(context)
96
96
  hcph.mount_bucket(bucket)
97
97
  destination = add_trailing_slash(destination)
98
- click.echo("CWD: " + str(Path.cwd()))
99
98
  if Path(source).is_dir():
100
99
  source = add_trailing_slash(source)
101
100
  hcph.upload_folder(source, destination)
NGPIris/hcp/hcp.py CHANGED
@@ -148,7 +148,7 @@ class HCPHandler:
148
148
  else:
149
149
  self.transfer_config = TransferConfig(
150
150
  multipart_threshold = 10 * _MB,
151
- max_concurrency = 60,
151
+ max_concurrency = 30,
152
152
  multipart_chunksize = 40 * _MB,
153
153
  use_threads = True
154
154
  )
@@ -284,6 +284,11 @@ class HCPHandler:
284
284
 
285
285
  pages_filtered = pages.search(filter_string)
286
286
  for object in pages_filtered:
287
+ # If there are no objects in the bucket, then `object` will be None,
288
+ # which means that we should break out of the for loop
289
+ if not object:
290
+ break
291
+
287
292
  # Split the object key by "/"
288
293
  split_object = object["Key"].split("/")
289
294
  # Check if the object is within the specified path_key depth
NGPIris/hcp/helpers.py CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- from pathlib import Path
2
+ from os import path as p
3
3
  from typing import Callable, TypeVar, ParamSpec
4
4
 
5
5
  from NGPIris.hcp.exceptions import NoBucketMounted
@@ -23,9 +23,7 @@ def create_access_control_policy(user_ID_permissions : dict[str, str]) -> dict:
23
23
  return access_control_policy
24
24
 
25
25
  def raise_path_error(path : str):
26
- if Path(path).is_mount():
27
- return "Is mounted"
28
- if not Path(path).exists():
26
+ if not p.exists(path):
29
27
  raise FileNotFoundError("\"" + path + "\"" + " does not exist")
30
28
 
31
29
  # Decorator for checking if a bucket is mounted. This is meant to be used by
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: NGPIris
3
- Version: 5.2.2.dev2
3
+ Version: 5.2.2.dev4
4
4
  Author-email: Erik Brink <erik.brink@gu.se>, Isak Sylvin <isak.sylvin@gu.se>
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -1,21 +1,21 @@
1
1
  NGPIris/__init__.py,sha256=eHaeRGl1JQ_hjsazEd4oQCXOkdpSxLIzg-ipYAAaa-s,69
2
- NGPIris/cli/__init__.py,sha256=YVVtVHAaAk8G50A1FF5WUSY0XaW1on9NS9YSHfZIu2g,13120
2
+ NGPIris/cli/__init__.py,sha256=9-l5F92SKx060OcnyO1Ko5vKoEpKGgQ95dU_Plt1Hg8,13078
3
3
  NGPIris/hci/__init__.py,sha256=qZRzN2JZp8uIw46TQiqJHMIkleiVDErSoZ3-v0O_cZU,38
4
4
  NGPIris/hci/exceptions.py,sha256=wUbpUwY8u1QtuSvnzlBuql9LgGsxBl207IGsHkCt-JQ,47
5
5
  NGPIris/hci/hci.py,sha256=-7RBWPGqlINVNsl-GbjuXkcLdIF5cs4cu3OFt2FJi1E,4321
6
6
  NGPIris/hci/helpers.py,sha256=THZt9ItmEsEiuvB1v99orAx1oOMgBdGR62PQyOre5yo,2592
7
7
  NGPIris/hcp/__init__.py,sha256=yMDW3WpxsU89GNcBJ3ApeGHOmWvisfuuAsZxwlKWnpw,38
8
8
  NGPIris/hcp/exceptions.py,sha256=24irbs3JMWaVOM_gf4ByR1hfYPpEP1eXPgHvq77uuqU,361
9
- NGPIris/hcp/hcp.py,sha256=4_uxfGMNTJvabc_VGTxahrZhIpe5YSIM5Kt14Y8Jx1w,26708
10
- NGPIris/hcp/helpers.py,sha256=RV4pSsPTLPdcQ0EWyLZJYt7zMjO669M-ef8QUC-2tVY,1469
9
+ NGPIris/hcp/hcp.py,sha256=ri63QXJS4vAgvHlF2RJkDqigVwhHOfD6l0HIwMCnE6M,26906
10
+ NGPIris/hcp/helpers.py,sha256=SRHX-B6TSDogK7Mz2co7VkzHtZdtMaMeH-_NoDWEDh8,1406
11
11
  NGPIris/hcp/statistics.py,sha256=8VgRC-7hWQOCRWwoKk4NHCtGTdY_4C2iHcAHEXKJ0kM,817
12
12
  NGPIris/parse_credentials/__init__.py,sha256=O9uq_F9uOtuW7giW-t10KV4VmTgfkvgaBEwQU43Sf-w,57
13
13
  NGPIris/parse_credentials/parse_credentials.py,sha256=E1NzQCMvjOa2mGLBkEYshZomNSxfSCkoc_iUhUfpBEM,2106
14
14
  NGPIris/utils/__init__.py,sha256=yPCEc1-_7r01dZ-31EKiA7Jova7ztX7XXuU95IKmKX8,59
15
15
  NGPIris/utils/utils.py,sha256=m9qwLuOoiqVNRy7B4raYNFJkigL_wE--PiWhyhVhHII,248
16
- NGPIris-5.2.2.dev2.dist-info/LICENSE,sha256=ZA2Q9u5AEkH_YoNNDRsz-DBJ6ZuL_foE7RsKFjXd4-c,18093
17
- NGPIris-5.2.2.dev2.dist-info/METADATA,sha256=QQRw9IrTGcojukTqGs730jC_yjP4r14rccN1WTfZF6A,7080
18
- NGPIris-5.2.2.dev2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
19
- NGPIris-5.2.2.dev2.dist-info/entry_points.txt,sha256=t8ADhe3ovPm9tW3XDZq1_vKmfHY98Ei_o6WioJobNzU,117
20
- NGPIris-5.2.2.dev2.dist-info/top_level.txt,sha256=954WCuIJkle_SMtr7MNPapiiLLAFhlKbcz6Bp89-2V0,8
21
- NGPIris-5.2.2.dev2.dist-info/RECORD,,
16
+ NGPIris-5.2.2.dev4.dist-info/LICENSE,sha256=ZA2Q9u5AEkH_YoNNDRsz-DBJ6ZuL_foE7RsKFjXd4-c,18093
17
+ NGPIris-5.2.2.dev4.dist-info/METADATA,sha256=-6E9hejgr2H21T_aAf2lV93j3FIQflg0GAxUYX4o__4,7080
18
+ NGPIris-5.2.2.dev4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
19
+ NGPIris-5.2.2.dev4.dist-info/entry_points.txt,sha256=t8ADhe3ovPm9tW3XDZq1_vKmfHY98Ei_o6WioJobNzU,117
20
+ NGPIris-5.2.2.dev4.dist-info/top_level.txt,sha256=954WCuIJkle_SMtr7MNPapiiLLAFhlKbcz6Bp89-2V0,8
21
+ NGPIris-5.2.2.dev4.dist-info/RECORD,,