|
5 | 5 | from collections import defaultdict
|
6 | 6 | from enum import Enum
|
7 | 7 | from typing import Any, Optional, Union, cast
|
8 |
| -from warnings import warn |
9 | 8 |
|
10 | 9 | from gooddata_sdk.client import GoodDataApiClient
|
11 | 10 | from gooddata_sdk.compute.model.attribute import Attribute
|
@@ -661,7 +660,7 @@ def get_metadata(self, id_obj: IdObjType) -> Optional[Any]:
|
661 | 660 |
|
662 | 661 | def get_labels_and_formats(self) -> tuple[dict[str, str], dict[str, str]]:
|
663 | 662 | """
|
664 |
| - Extracts labels and custom measure formats from the insight. |
| 663 | + Extracts labels and custom measure formats from the visualization. |
665 | 664 |
|
666 | 665 | :return: tuple of labels dict ({"label_id":"Label"}) and formats dict ({"measure_id":"#,##0.00"})
|
667 | 666 | """
|
@@ -759,105 +758,3 @@ def get_visualization(self, workspace_id: str, visualization_id: str) -> Visuali
|
759 | 758 | side_loads = SideLoads(vis_obj.included)
|
760 | 759 |
|
761 | 760 | return Visualization(vis_obj.data, side_loads)
|
762 |
| - |
763 |
| - def get_insights(self, workspace_id: str) -> list[Visualization]: |
764 |
| - warn( |
765 |
| - "This method is deprecated and it will be removed in v1.20.0 release. " |
766 |
| - "Please use 'get_visualizations' method instead.", |
767 |
| - DeprecationWarning, |
768 |
| - stacklevel=2, |
769 |
| - ) |
770 |
| - return self.get_visualizations(workspace_id) |
771 |
| - |
772 |
| - def get_insight(self, workspace_id: str, insight_id: str) -> Visualization: |
773 |
| - warn( |
774 |
| - "This method is deprecated and it will be removed in v1.20.0 release. " |
775 |
| - "Please use 'get_visualization' method instead.", |
776 |
| - DeprecationWarning, |
777 |
| - stacklevel=2, |
778 |
| - ) |
779 |
| - return self.get_visualization(workspace_id, insight_id) |
780 |
| - |
781 |
| - |
782 |
| -# Note: the classes below are going to be deprecated |
783 |
| - |
784 |
| - |
785 |
| -class InsightMetric(VisualizationMetric): |
786 |
| - def __init__(self, metric: dict[str, Any]) -> None: |
787 |
| - warn( |
788 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
789 |
| - "Please use 'VisualizationMetric' class instead.", |
790 |
| - DeprecationWarning, |
791 |
| - stacklevel=2, |
792 |
| - ) |
793 |
| - super().__init__(metric) |
794 |
| - |
795 |
| - |
796 |
| -class InsightAttribute(VisualizationAttribute): |
797 |
| - def __init__(self, attribute: dict[str, Any]) -> None: |
798 |
| - warn( |
799 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
800 |
| - "Please use 'VisualizationAttribute' class instead.", |
801 |
| - DeprecationWarning, |
802 |
| - stacklevel=2, |
803 |
| - ) |
804 |
| - super().__init__(attribute) |
805 |
| - |
806 |
| - |
807 |
| -class InsightTotal(VisualizationTotal): |
808 |
| - def __init__(self, total: dict[str, Any]) -> None: |
809 |
| - warn( |
810 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
811 |
| - "Please use 'VisualizationTotal' class instead.", |
812 |
| - DeprecationWarning, |
813 |
| - stacklevel=2, |
814 |
| - ) |
815 |
| - super().__init__(total) |
816 |
| - |
817 |
| - |
818 |
| -class InsightFilter(VisualizationFilter): |
819 |
| - def __init__(self, f: dict[str, Any]) -> None: |
820 |
| - warn( |
821 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
822 |
| - "Please use 'VisualizationFilter' class instead.", |
823 |
| - DeprecationWarning, |
824 |
| - stacklevel=2, |
825 |
| - ) |
826 |
| - super().__init__(f) |
827 |
| - |
828 |
| - |
829 |
| -class InsightBucket(VisualizationBucket): |
830 |
| - def __init__(self, bucket: dict[str, Any]) -> None: |
831 |
| - warn( |
832 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
833 |
| - "Please use 'VisualizationBucket' class instead.", |
834 |
| - DeprecationWarning, |
835 |
| - stacklevel=2, |
836 |
| - ) |
837 |
| - super().__init__(bucket) |
838 |
| - |
839 |
| - |
840 |
| -class Insight(Visualization): |
841 |
| - def __init__( |
842 |
| - self, |
843 |
| - from_vis_obj: dict[str, Any], |
844 |
| - side_loads: Optional[SideLoads] = None, |
845 |
| - ) -> None: |
846 |
| - warn( |
847 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
848 |
| - "Please use 'Visualization' class instead.", |
849 |
| - DeprecationWarning, |
850 |
| - stacklevel=2, |
851 |
| - ) |
852 |
| - super().__init__(from_vis_obj, side_loads) |
853 |
| - |
854 |
| - |
855 |
| -class InsightService(VisualizationService): |
856 |
| - def __init__(self, api_client: GoodDataApiClient) -> None: |
857 |
| - warn( |
858 |
| - "This class is deprecated and it will be removed in v1.20.0 release. " |
859 |
| - "Please use 'VisualizationService' class instead.", |
860 |
| - DeprecationWarning, |
861 |
| - stacklevel=2, |
862 |
| - ) |
863 |
| - super().__init__(api_client) |
0 commit comments