:py:mod:`rhino_health.lib.endpoints.project.project_endpoints` ============================================================== .. py:module:: rhino_health.lib.endpoints.project.project_endpoints Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: rhino_health.lib.endpoints.project.project_endpoints.ProjectEndpoints Functions ~~~~~~~~~ .. autoapisummary:: rhino_health.lib.endpoints.project.project_endpoints.handle_resource_management_response .. py:function:: handle_resource_management_response(response) .. py:class:: ProjectEndpoints(session) Endpoints available to interact with Projects on the Rhino Platform .. rubric:: Notes You should access these endpoints from the RhinoSession object .. !! processed by numpydoc !! .. py:method:: get_project_by_name(name: str) Returns Project dataclass :Parameters: **name: str** Full name for the Project :Returns: project: LTSProject Project dataclass that match the name .. rubric:: Examples >>> session.project.get_project_by_name(my_project_name) Project() .. !! processed by numpydoc !! .. py:method:: search_for_projects_by_name(name: str, name_filter_mode: Optional[rhino_health.lib.endpoints.endpoint.NameFilterMode] = NameFilterMode.CONTAINS) Returns Project dataclasses :Parameters: **name: str** Full or partial name for the Project **name_filter_mode: Optional[NameFilterMode]** Only return results with the specified matching mode :Returns: projects: List[LTSProject] Project dataclasses that match the name .. seealso:: :obj:`rhino_health.lib.endpoints.endpoint.FilterMode` Different modes to filter by .. rubric:: Examples >>> session.project.search_for_projects_by_name(my_project_name) [Project()] .. !! processed by numpydoc !! .. py:method:: get_project_stats(project_uid: str) -> Dict[str, Any] .. py:method:: add_project(project: rhino_health.lib.endpoints.project.project_dataclass.ProjectCreateInput) -> rhino_health.lib.endpoints.project.project_dataclass.LTSProject Adds a new project owned by the currently logged in user. .. warning:: This feature is under development and the interface may change .. !! processed by numpydoc !! .. py:method:: get_datasets(project_uid: str) -> List[rhino_health.lib.endpoints.dataset.dataset_dataclass.LTSDataset] Returns Datasets associated with the project_uid .. !! processed by numpydoc !! .. py:method:: get_dataset_by_name(name, version=VersionMode.LATEST, project_uid=None) -> Optional[rhino_health.lib.endpoints.dataset.dataset_dataclass.LTSDataset] Returns Dataset dataclass .. seealso:: :obj:`rhino_health.lib.endpoints.dataset.dataset_endpoints.get_dataset_by_name` .. .. !! processed by numpydoc !! .. py:method:: search_for_datasets_by_name(name, version=VersionMode.LATEST, project_uid=None, name_filter_mode=None) -> List[rhino_health.lib.endpoints.dataset.dataset_dataclass.LTSDataset] Returns Dataset dataclasses .. seealso:: :obj:`rhino_health.lib.endpoints.dataset.dataset_endpoints.search_for_datasets_by_name` .. .. !! processed by numpydoc !! .. py:method:: get_data_schemas(project_uid: str) -> List[rhino_health.lib.endpoints.data_schema.data_schema_dataclass.DataSchema] Returns Datashemas associated with the project_uid .. !! processed by numpydoc !! .. py:method:: get_data_schema_by_name(name, version=VersionMode.LATEST, project_uid=None) -> rhino_health.lib.endpoints.data_schema.data_schema_dataclass.LTSDataSchema Returns DataSchema dataclass .. seealso:: :obj:`rhino_health.lib.endpoints.data_schema.data_schema_endpoints.get_data_schema_by_name` .. .. !! processed by numpydoc !! .. py:method:: search_for_data_schemas_by_name(name, version=VersionMode.LATEST, project_uid=None, name_filter_mode=None) -> List[rhino_health.lib.endpoints.data_schema.data_schema_dataclass.LTSDataSchema] Returns DataSchema dataclasses .. seealso:: :obj:`rhino_health.lib.endpoints.data_schema.data_schema_endpoints.search_for_data_schemas_by_name` .. .. !! processed by numpydoc !! .. py:method:: get_code_objects(project_uid: str) -> List[rhino_health.lib.endpoints.code_object.code_object_dataclass.CodeObject] Returns CodeObjects associated with the project .. !! processed by numpydoc !! .. py:method:: get_code_object_by_name(name, version=VersionMode.LATEST, project_uid=None) -> Optional[rhino_health.lib.endpoints.code_object.code_object_dataclass.CodeObject] Returns the CodeObject .. seealso:: :obj:`rhino_health.lib.endpoints.code_object.code_object_endpoints.get_code_object_by_name` .. .. !! processed by numpydoc !! .. py:method:: search_for_code_objects_by_name(name, version=VersionMode.LATEST, project_uid=None, name_filter_mode=None) -> List[rhino_health.lib.endpoints.code_object.code_object_dataclass.CodeObject] Returns CodeObject dataclasses .. seealso:: :obj:`rhino_health.lib.endpoints.code_object.code_object_endpoints.search_for_code_objects_by_name` .. .. !! processed by numpydoc !! .. py:method:: get_collaborating_workgroups(project_uid: Union[str, rhino_health.lib.endpoints.project.project_dataclass.Project]) .. py:method:: add_collaborator(project_uid: str, collaborating_workgroup_uid: str) Adds COLLABORATING_WORKGROUP_UID as a collaborator to PROJECT_UID .. warning:: This feature is under development and the interface may change .. !! processed by numpydoc !! .. py:method:: remove_collaborator(project_uid: str, collaborating_workgroup_uid: str) Removes COLLABORATING_WORKGROUP_UID as a collaborator from PROJECT_UID .. warning:: This feature is under development and the interface may change .. !! processed by numpydoc !! .. py:method:: aggregate_dataset_metric(dataset_uids: List[str], metric_configuration: rhino_health.lib.metrics.base_metric.BaseMetric, aggregation_method_override: Optional[Callable] = None) -> rhino_health.lib.metrics.base_metric.MetricResponse Returns the aggregate metric based on the METRIC_CONFIGURATION for a list of datasets. :Parameters: **dataset_uids: List[str]** UIDS for the Datasets to query metrics against **metric_configuration: BaseMetric** Configuration for the metric to be run **aggregation_method_override: Optional[Callable]** A custom function to use to aggregate the results. The method signature should be: method(metric_name: str, metric_results: List[Dict[str, Any]], **kwargs), where the metric_results are each of the Dataset results for the metric, and the method should return a dict with the structure of: {metric_name: }. :Returns: metric_response: MetricResponse A response object containing the result of the query .. seealso:: :obj:`rhino_health.lib.metrics` Dataclasses specifying possible metric configurations to send :obj:`rhino_health.lib.metrics.base_metric.MetricResponse` Response object :obj:`rhino_health.lib.metrics.aggregate_metrics.aggregation_methods` Sample aggregation methods .. !! processed by numpydoc !! .. py:method:: joined_dataset_metric(configuration: rhino_health.lib.metrics.base_metric.JoinableMetric, query_datasets: List[str], filter_datasets: Optional[List[str]] = None) -> rhino_health.lib.metrics.base_metric.MetricResponse Perform a Federated Join Dataset Metric Intersection Joins allow filtering against columns in that are present in the filter dataset and then getting metrics from a separate query dataset which do not contain those columns. Union Joins handles deduplication of results between multiple datasets. :Parameters: **metric_configuration: JoinableMetric** Configuration for the metric to be run **query_datasets: List[str]** UIDS for the dataset(s) to get the query values from. For INTERSECTION mode supports one dataset. For UNION mode supports any number of datasets. **filter_datasets: Optional[List[str]] = None** UIDS for the dataset(s) to perform the join query against. For INTERSECTION mode supports one dataset. For UNION mode this is ignored :Returns: metric_response: MetricResponse A response object containing the result of the query .. !! processed by numpydoc !!