rapidata 1.3.0__py3-none-any.whl → 1.3.1__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.

@@ -1,4 +1,10 @@
1
1
  from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
2
+ from enum import StrEnum
3
+
4
+ class TranslationBehaviour(StrEnum):
5
+ BOTH = "both"
6
+ ONLY_ORIGINAL = "only original"
7
+ ONLY_TRANSLATED = "only translated"
2
8
 
3
9
 
4
10
  class FeatureFlags:
@@ -49,16 +55,22 @@ class FeatureFlags:
49
55
  self._flags["alert_on_fast_response"] = str(milliseconds)
50
56
  return self
51
57
 
52
- def disable_translation(self, value: bool = True):
53
- """Disable automatic translation of all texts in the UI.
58
+
59
+ def translation_behaviour(self, behaviour: TranslationBehaviour = TranslationBehaviour.BOTH):
60
+ """Defines what's the behaviour of the translation in the UI.
61
+
62
+ The behaviour can be set to:
63
+ - TranslationBehaviour.BOTH: Show both the original and the translated text.
64
+ - TranslationBehaviour.ONLY_ORIGINAL: Show only the original text.
65
+ - TranslationBehaviour.ONLY_TRANSLATED: Show only the translated text.
54
66
 
55
67
  Args:
56
- value (bool, optional): Whether to disable translation. Defaults to True.
68
+ behaviour (TranslationBehaviour): The translation behaviour. Defaults to TranslationBehaviour.BOTH.
57
69
 
58
70
  Returns:
59
71
  FeatureFlags: The current FeatureFlags instance for method chaining.
60
72
  """
61
- self._flags["disable_translation"] = str(value)
73
+ self._flags["translation_behaviour"] = behaviour
62
74
  return self
63
75
 
64
76
  def free_text_minimum_characters(self, value: int):
@@ -108,4 +120,4 @@ class FeatureFlags:
108
120
  FeatureFlags: The current FeatureFlags instance for method chaining.
109
121
  """
110
122
  self._flags[key] = value
111
- return self
123
+ return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rapidata
3
- Version: 1.3.0
3
+ Version: 1.3.1
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
@@ -323,7 +323,7 @@ rapidata/rapidata_client/dataset/rapidata_validation_set.py,sha256=rSRZQ67-8XjLa
323
323
  rapidata/rapidata_client/dataset/validation_rapid_parts.py,sha256=uzpOZFqQu8bG6vmjcWWUNJPZsRe28OmnyalRE6ry8tk,2317
324
324
  rapidata/rapidata_client/dataset/validation_set_builder.py,sha256=xPZBzNRPausIbYNRVinIhsVGnKSIIuxP5tjKkV4hOyo,7990
325
325
  rapidata/rapidata_client/feature_flags/__init__.py,sha256=IYkcK_bZCl5RfyQFiWjjUdz4y0jipiW9qfeopq4EjQQ,40
326
- rapidata/rapidata_client/feature_flags/feature_flags.py,sha256=hcS9YRzpsPWpZfw-3QwSuf2TaVg-MOHBxY788oNqIW4,3957
326
+ rapidata/rapidata_client/feature_flags/feature_flags.py,sha256=r8imkH_e2NPGjqHMUjLF0qbYHajuu0gMv1z5Ep4Gm3c,4478
327
327
  rapidata/rapidata_client/filter/__init__.py,sha256=F3JsMCbAZWH7SNdgaj98ydTqgCCKXKBhLyt9gQ4x6tQ,301
328
328
  rapidata/rapidata_client/filter/age_filter.py,sha256=hncr1zNM_HrO0fCta8h0LgTCB8Ufv_vI5_cGhMb-xr8,478
329
329
  rapidata/rapidata_client/filter/base_filter.py,sha256=nXraj72cumyQjjYoo4MMpnlE0aWjAIOmGakKf0MNqps,135
@@ -369,7 +369,7 @@ rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5
369
369
  rapidata/service/openapi_service.py,sha256=pGcOCttKZW0PVCSM7Kfehe5loh7CxmmDDbu4UJbamnI,2770
370
370
  rapidata/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
371
371
  rapidata/utils/image_utils.py,sha256=TldO3eJWG8IhfJjm5MfNGO0mEDm1mQTsRoA0HLU1Uxs,404
372
- rapidata-1.3.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
373
- rapidata-1.3.0.dist-info/METADATA,sha256=wFSO1-QAg27tUA9W1zmrbWpoUWcs_HJIKLw1FfHgGrk,1012
374
- rapidata-1.3.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
375
- rapidata-1.3.0.dist-info/RECORD,,
372
+ rapidata-1.3.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
373
+ rapidata-1.3.1.dist-info/METADATA,sha256=1v9m12XMve-YQFq87fyiQ34qGB8L1XtF1OhKKhq9t3k,1012
374
+ rapidata-1.3.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
375
+ rapidata-1.3.1.dist-info/RECORD,,