pysodafair 0.1.66__py3-none-any.whl → 0.1.67__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.
@@ -3460,10 +3460,7 @@ def validate_dataset_structure(soda, resume):
3460
3460
  connect_pennsieve_client(accountname)
3461
3461
  except Exception as e:
3462
3462
  main_curate_status = "Done"
3463
- if isinstance(e, AttributeError):
3464
- raise Exception("The Pennsieve Agent cannot access datasets but needs to in order to work. Please try again. If the issue persists, please contact the SODA team. The SODA team will contact Pennsieve to help resolve this issue.")
3465
- else:
3466
- raise PennsieveAccountInvalid("Please select a valid Pennsieve account.")
3463
+ raise e
3467
3464
 
3468
3465
  if uploading_to_existing_ps_dataset(soda):
3469
3466
  # check that the Pennsieve dataset is valid
@@ -4,7 +4,8 @@
4
4
  "properties": {
5
5
  "metadata_version": {
6
6
  "type": "string",
7
- "description": "The version of the metadata schema used."
7
+ "description": "The version of the metadata schema used.",
8
+ "enum": ["3.0.0", "3.0.1", "3.0.2"]
8
9
  },
9
10
  "type": {
10
11
  "type": "string",
@@ -17,6 +17,14 @@ class PennsieveAgentError(Exception):
17
17
  def __str__(self):
18
18
  return self.error_message
19
19
 
20
+
21
+ class PennsieveAgentRPCError(Exception):
22
+ def __init__(self, error_message):
23
+ self.error_message = error_message
24
+
25
+ def __str__(self):
26
+ return self.error_message
27
+
20
28
  class FailedToFetchPennsieveDatasets(Exception):
21
29
  def __init__(self, error_message):
22
30
  self.error_message = error_message
@@ -120,7 +128,7 @@ class PennsieveDatasetNameInvalid(Exception):
120
128
  class PennsieveAccountInvalid(Exception):
121
129
  def __init__(self, account_name):
122
130
  self.account_name = account_name
123
- self.error_message = f"The Pennsieve account name {self.account_name} is invalid."
131
+ self.error_message = f"The Pennsieve account name {self.account_name} is invalid. Please try again. If the issue persists, please contact the SODA team."
124
132
 
125
133
  def __str__(self):
126
134
  return self.error_message
@@ -1,5 +1,5 @@
1
1
  from pennsieve2.pennsieve import Pennsieve
2
- from .exceptions import PennsieveAgentError
2
+ from .exceptions import PennsieveAgentError, PennsieveAgentRPCError, PennsieveAccountInvalid
3
3
 
4
4
  def connect_pennsieve_client(account_name):
5
5
  """
@@ -8,4 +8,13 @@ def connect_pennsieve_client(account_name):
8
8
  try:
9
9
  return Pennsieve(profile_name=account_name)
10
10
  except Exception as e:
11
- raise PennsieveAgentError(f"Could not connect to the Pennsieve agent: {e}")
11
+ if "End of TCP stream" in str(e):
12
+ raise PennsieveAgentRPCError(f"Could not connect to the Pennsieve Agent error coming from the Agent. This can likely be resolved by retrying. If the issue persists, please contact the SODA team and they will reach out to Pennsieve to help resolve this.") from e
13
+ elif isinstance(e, AttributeError):
14
+ raise Exception("The Pennsieve Agent cannot access datasets but needs to in order to work. Please try again. If the issue persists, please contact the SODA team. The SODA team will contact Pennsieve to help resolve this issue.") from e
15
+ elif "Profile not found" in str(e):
16
+ raise PennsieveAccountInvalid(account_name) from e
17
+ elif "Error connecting to server" in str(e):
18
+ raise PennsieveAgentError(f"Could not connect to the Pennsieve agent: {e}") from e
19
+ else:
20
+ raise PennsieveAgentError("An unknown error occurred when trying to connect to the Pennsieve Agent. If this issue persists, please contact the SODA team.") from e
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysodafair
3
- Version: 0.1.66
3
+ Version: 0.1.67
4
4
  Summary: Pysoda package for Fairdataihub tools
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ pysoda/core/__init__.py,sha256=bXnu4fYemJ915xId8nwh-Gy2IUEvVuoS9Hk3CXyJp8U,235
4
4
  pysoda/core/dataset_generation/__init__.py,sha256=tisLmJeXLeAINXf7BdNZGi2i9vQwImWGa_S5FNwQFbs,299
5
5
  pysoda/core/dataset_generation/manifestSession/__init__.py,sha256=kqkTAFEhluyQJ9mmMhYQTh1tgowBeJdH-Q9s5ifGkSE,51
6
6
  pysoda/core/dataset_generation/manifestSession/manifest_session.py,sha256=TML_KOJ-1REohqSaHCZNFJrbDR1UDQ9sFcithJRx9t8,4669
7
- pysoda/core/dataset_generation/upload.py,sha256=lnU6od0LtJOjuzNj-VX2HzOp66xUBr1V6nXtpJjkdIg,172804
7
+ pysoda/core/dataset_generation/upload.py,sha256=_VTG-hgnXnvFoMKw4vJZGxgCr4mvaI9VinLeKmCJd2o,172425
8
8
  pysoda/core/dataset_importing/__init__.py,sha256=NbWs4HAqqydFLACFoVwl6g457dkYvjiZKx9NzB9wFxE,114
9
9
  pysoda/core/dataset_importing/import_dataset.py,sha256=cx8qCQmR_BKdC2G-jzqE4dWg2JhkOS3jM8kpjLIsObk,29487
10
10
  pysoda/core/metadata/__init__.py,sha256=Tkx6vdEQEPwAHmVSc9GfdbDZUkvuAqEgHJOxRDeX5vE,821
@@ -50,7 +50,7 @@ pysoda/core/upload_manifests/__init__.py,sha256=SOiyflYmZDtkLwWpeu7flyn3J2SAj9WL
50
50
  pysoda/core/upload_manifests/upload_manifests.py,sha256=Hd2XSXYieG-EMcPTLSYXvdtraipp1XBSo5cGpZR-vbA,1223
51
51
  pysoda/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  pysoda/schema/code_description.json,sha256=FJOyJBC2TKjTTdtew3B4wdq_WIrti-r2F-M6t5OVNB0,17854
53
- pysoda/schema/dataset_description.json,sha256=U725xGDmy4oeJe0IOFcJc7a0oA5pAbpsRVQsjhPEj1k,10069
53
+ pysoda/schema/dataset_description.json,sha256=Dj7udV-OFdBTRqec2xCHFf52f2NolQAVR1TjmUd9Tk0,10112
54
54
  pysoda/schema/manifest.json,sha256=dClcVIR3IlesjWC9peLAnyuIECwNDHfbIFmCsj9l2Wk,3006
55
55
  pysoda/schema/performances.json,sha256=TJw7ERC6eMR-9cImOg7xoEVRyOR4xViJqZO8U2X2OXo,1254
56
56
  pysoda/schema/resources.json,sha256=9-rwCTX523V5XaKmXLTUGzackOl7tk-qijbbBDoeuhY,1232
@@ -62,16 +62,16 @@ pysoda/schema/submission_schema.json,sha256=b0FfBP_fDFxU8vT1mDAThbUyYMJA7PJ1S6lO
62
62
  pysoda/utils/__init__.py,sha256=cdrc-Ueb7djdA9rPl5FR3nsinCxfOB9lbOhicNCbeCY,1243
63
63
  pysoda/utils/authentication.py,sha256=Ed6xXaCSyi23qGz_LkdDB-Cjum5G5az_tMhSWKBGVSY,11943
64
64
  pysoda/utils/config.py,sha256=8UC0j89ihuMnPCwl9bTVUupC9Kg_39ly9Hju5W4OmWo,2471
65
- pysoda/utils/exceptions.py,sha256=H4_bvp-Zq4e-_GHQ5n3wxg4cH12iVgJZEw8tz8jRGfw,4812
65
+ pysoda/utils/exceptions.py,sha256=FXc6gaBhDwoRoxibAMXB2kWqhlSgjR0a5fB3ouCMWW8,5070
66
66
  pysoda/utils/logger.py,sha256=fxqJoqxe_wdVTq7IXN5QsWSC-z7mSfsLaJsKU9-UhqA,211
67
67
  pysoda/utils/metadata_utils.py,sha256=nCQc24biSsrpnXbjXiZEtISWkfBS-CV00sv5MMydoww,1804
68
- pysoda/utils/pennsieveAgentUtils.py,sha256=Un0qnVQm1DNg3u5l7PZI-X61sNaJtSmDlcXP_lRbv8Q,422
68
+ pysoda/utils/pennsieveAgentUtils.py,sha256=yoHYBl2EXmLA0Ty-zrYG8LYhofnR8II9OkcE2c6EGqE,1439
69
69
  pysoda/utils/pennsieveUtils.py,sha256=B_L2NicOR3eQin0sd7TsRLWNDSxhSxyGgUJCGoWBVkM,4622
70
70
  pysoda/utils/profile.py,sha256=di4D_IE1rGSfHl0-SRVjrJK2bCdedW4ugp0W-j1HarQ,937
71
71
  pysoda/utils/schema_validation.py,sha256=3w3FRPyn4P3xMhITzItk-jYte8TTlNrgCWmY-s05x9Y,4438
72
72
  pysoda/utils/time_utils.py,sha256=g5848bivtzWj6TDoWo6CcohF-THxShETP4qTyHTjBWw,131
73
73
  pysoda/utils/upload_utils.py,sha256=-BCvfXsJSFqnwEZVCFQX1PLfkdeW0gyGLjLGW6Uxdf8,4607
74
- pysodafair-0.1.66.dist-info/METADATA,sha256=CFPeQYRgKDKEjoreN1iv9vV28KcV8Xbbdsp26H99AeI,7011
75
- pysodafair-0.1.66.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
76
- pysodafair-0.1.66.dist-info/licenses/LICENSE,sha256=Jlt0uGnx87qPRGXPQHsBkg_S7MOsYS2E9Rh1zy47bfw,1082
77
- pysodafair-0.1.66.dist-info/RECORD,,
74
+ pysodafair-0.1.67.dist-info/METADATA,sha256=U4XpLWpZ8EDOIgmr7JXVgEgJaeYYQFVDv8vmYhLD-9U,7011
75
+ pysodafair-0.1.67.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
76
+ pysodafair-0.1.67.dist-info/licenses/LICENSE,sha256=Jlt0uGnx87qPRGXPQHsBkg_S7MOsYS2E9Rh1zy47bfw,1082
77
+ pysodafair-0.1.67.dist-info/RECORD,,