rapidata 2.20.1__py3-none-any.whl → 2.21.0__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 rapidata might be problematic. Click here for more details.

@@ -45,13 +45,14 @@ class RapidataOrder:
45
45
  self.__campaign_id: str = ""
46
46
  self.__pipeline_id: str = ""
47
47
  self._max_retries = 10
48
- self._retry_delay = 2
48
+ self._retry_delay = 2
49
+ self.order_details_page = f"https://app.{self.__openapi_service.environment}/order/detail/{self.order_id}"
49
50
 
50
51
  def run(self, print_link: bool = True) -> "RapidataOrder":
51
52
  """Runs the order to start collecting responses."""
52
53
  self.__openapi_service.order_api.order_submit_post(self.order_id)
53
54
  if print_link:
54
- print(f"Order '{self.name}' is now viewable under: https://app.{self.__openapi_service.environment}/order/detail/{self.order_id}")
55
+ print(f"Order '{self.name}' is now viewable under: {self.order_details_page}")
55
56
  return self
56
57
 
57
58
  def pause(self) -> None:
@@ -159,6 +160,18 @@ class RapidataOrder:
159
160
  except (ApiException, json.JSONDecodeError) as e:
160
161
  raise Exception(f"Failed to get order results: {str(e)}") from e
161
162
 
163
+ def view(self) -> None:
164
+ """
165
+ Opens the order details page in the browser.
166
+
167
+ Raises:
168
+ Exception: If the order is not in processing state.
169
+ """
170
+ could_open_browser = webbrowser.open(self.order_details_page)
171
+ if not could_open_browser:
172
+ encoded_url = urllib.parse.quote(self.order_details_page, safe="%/:=&?~#+!$,;'@()*[]")
173
+ print(Fore.RED + f'Please open this URL in your browser: "{encoded_url}"' + Fore.RESET)
174
+
162
175
  def preview(self) -> None:
163
176
  """
164
177
  Opens a preview of the order in the browser.
@@ -1,5 +1,5 @@
1
1
  from typing import Sequence, Optional
2
- from urllib3._collections import HTTPHeaderDict
2
+ from urllib3._collections import HTTPHeaderDict # type: ignore[import]
3
3
 
4
4
  from rapidata.service.openapi_service import OpenAPIService
5
5
  from rapidata.rapidata_client.assets.data_type_enum import RapidataDataTypes
@@ -11,7 +11,7 @@ from rapidata.api_client.models.root_filter import RootFilter
11
11
  from rapidata.api_client.models.filter import Filter
12
12
  from rapidata.api_client.models.sort_criterion import SortCriterion
13
13
  from rapidata.api_client.exceptions import BadRequestException
14
- from urllib3._collections import HTTPHeaderDict
14
+ from urllib3._collections import HTTPHeaderDict # type: ignore[import]
15
15
 
16
16
  from rapidata.rapidata_client.validation.rapids.box import Box
17
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rapidata
3
- Version: 2.20.1
3
+ Version: 2.21.0
4
4
  Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
5
5
  License: Apache-2.0
6
6
  Author: Rapidata AG
@@ -447,8 +447,8 @@ rapidata/rapidata_client/metadata/_select_words_metadata.py,sha256=-MK5yQDi_G3BK
447
447
  rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
448
448
  rapidata/rapidata_client/order/_rapidata_dataset.py,sha256=KyEDb4NvlY4uzN3GjiX331VSGOq_I6FhvTnyKrpo4Sg,19400
449
449
  rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=De-gNvOnuXHz6QaRdNpr0_3zOkIEKu8hgtZkatzxZQ4,13155
450
- rapidata/rapidata_client/order/rapidata_order.py,sha256=cz1bXkoS7y_MuJDmjdXao7nbCFd8UF4bb5SHZtOYDjI,10483
451
- rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=HQzZAnwKnwWl2wLcZPqxQRnth1xWhVoGNkMkzzYbjqA,30615
450
+ rapidata/rapidata_client/order/rapidata_order.py,sha256=6Ak0fz0W_NUeRWz3gSTcirNTNbgEgMgruhwwEQ0BY4I,11050
451
+ rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=2HUo6d1z1qUw2PiETHlzh9fmBsCGNDPUPxVc_Udq4i8,30638
452
452
  rapidata/rapidata_client/order/rapidata_results.py,sha256=0y8EOiqUV7XuwpRJyV53mfo-ddRV1cUPdWexbPEVOHM,8044
453
453
  rapidata/rapidata_client/rapidata_client.py,sha256=fcWlmmNCZahK40Ox4aY153tEihIpwkUxYTuiypKF2SY,2857
454
454
  rapidata/rapidata_client/referee/__init__.py,sha256=q0Hv9nmfEpyChejtyMLT8hWKL0vTTf_UgUXPYNJ-H6M,153
@@ -483,7 +483,7 @@ rapidata/rapidata_client/validation/rapids/__init__.py,sha256=WU5PPwtTJlte6U90MD
483
483
  rapidata/rapidata_client/validation/rapids/box.py,sha256=t3_Kn6doKXdnJdtbwefXnYKPiTKHneJl9E2inkDSqL8,589
484
484
  rapidata/rapidata_client/validation/rapids/rapids.py,sha256=uCKnoSn1RykNHgTFbrvCFlfzU8lF42cff-2I-Pd48w0,4620
485
485
  rapidata/rapidata_client/validation/rapids/rapids_manager.py,sha256=F00lPYBUx5fTPRw50iZuobtdbjFo6ZHevPMk101JdaY,14271
486
- rapidata/rapidata_client/validation/validation_set_manager.py,sha256=Ecm17xf4SFsKdWAGNPdjecuAqsEJ27cHPdns7f8GXhs,26699
486
+ rapidata/rapidata_client/validation/validation_set_manager.py,sha256=GCFDyruCz6EIN67cc2fwRjzirUoGfs3KLTIg7n6wXbI,26722
487
487
  rapidata/rapidata_client/workflow/__init__.py,sha256=7nXcY91xkxjHudBc9H0fP35eBBtgwHGWTQKbb-M4h7Y,477
488
488
  rapidata/rapidata_client/workflow/_base_workflow.py,sha256=XyIZFKS_RxAuwIHS848S3AyLEHqd07oTD_5jm2oUbsw,762
489
489
  rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=9bT54wxVJgxC-zLk6MVNbseFpzYrvFPjt7DHvxqYfnk,1736
@@ -499,7 +499,7 @@ rapidata/service/__init__.py,sha256=s9bS1AJZaWIhLtJX_ZA40_CK39rAAkwdAmymTMbeWl4,
499
499
  rapidata/service/credential_manager.py,sha256=3x-Fb6tyqmgtpjI1MSOtXWW_SkzTK8Lo7I0SSL2YD7E,8602
500
500
  rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5AnfY14BW8,877
501
501
  rapidata/service/openapi_service.py,sha256=ORFPfHlb41zOUP5nDjYWZwO-ZcqNF_Mw2r71RitFtS0,4042
502
- rapidata-2.20.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
503
- rapidata-2.20.1.dist-info/METADATA,sha256=-eWN7hSrtPgvjivBBYA_Im74jCqlDFLjhzNdzgUPh3I,1227
504
- rapidata-2.20.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
505
- rapidata-2.20.1.dist-info/RECORD,,
502
+ rapidata-2.21.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
503
+ rapidata-2.21.0.dist-info/METADATA,sha256=VklHTpX5p8OoZj2yGlj12XiQLcSTAPgY5Z0CPp9kOZM,1227
504
+ rapidata-2.21.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
505
+ rapidata-2.21.0.dist-info/RECORD,,