Skip to content

Commit

Permalink
[PYG-78] 🥰 Drop equipment example (#367)
Browse files Browse the repository at this point in the history
* refactor: deprecation warning on old query method

* docs: updated docs to no equipment

* tests: seplace equipment tests

* refactor: cleanup equipment sdk

* refactor: deleted equipment unit sdk

* refactor: regen
  • Loading branch information
doctrino authored Nov 16, 2024
1 parent 9169cf2 commit 8ca8c18
Show file tree
Hide file tree
Showing 109 changed files with 717 additions and 9,181 deletions.
6 changes: 6 additions & 0 deletions cognite/pygen/_core/templates/api_class_node.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ class {{ api_class.name }}({% if data_class.is_writable %}NodeAPI{% else %}NodeR
A query API for {{ data_class.doc_list_name}}.

"""
warnings.warn(
"This method is deprecated and will soon be removed. "
"Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = {{ data_class.filter_name }}(
self._view_id,{% for parm in list_method.parameters %}
Expand Down
1,212 changes: 310 additions & 902 deletions docs/usage/edge_properties.ipynb

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_360_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ def __call__(
A query API for Cognite 360 images.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_360_image_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_360_image_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def __call__(
A query API for Cognite 360 image collections.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_360_image_collection_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_360_image_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def __call__(
A query API for Cognite 360 image models.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_360_image_model_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_360_image_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def __call__(
A query API for Cognite 360 image stations.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_360_image_station_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_3_d_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def __call__(
A query API for Cognite 3D models.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_3_d_model_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_3_d_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def __call__(
A query API for Cognite 3D objects.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_3_d_object_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_3_d_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ def __call__(
A query API for Cognite 3D revisions.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_3_d_revision_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_3_d_transformation_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def __call__(
A query API for Cognite 3D transformation nodes.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_3_d_transformation_node_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ def __call__(
A query API for Cognite activities.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_activity_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def __call__(
A query API for Cognite assets.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_asset_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_asset_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def __call__(
A query API for Cognite asset class.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_asset_clas_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_asset_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ def __call__(
A query API for Cognite asset types.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_asset_type_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_cad_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ def __call__(
A query API for Cognite cad models.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_cad_model_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_cad_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def __call__(
A query API for Cognite cad nodes.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_cad_node_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_cad_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def __call__(
A query API for Cognite cad revisions.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_cad_revision_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_cube_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def __call__(
A query API for Cognite cube maps.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_cube_map_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_describable_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def __call__(
A query API for Cognite describable nodes.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_describable_node_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def __call__(
A query API for Cognite equipments.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_equipment_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_equipment_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def __call__(
A query API for Cognite equipment types.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_equipment_type_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def __call__(
A query API for Cognite files.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_file_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_file_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ def __call__(
A query API for Cognite file categories.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_file_category_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_point_cloud_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ def __call__(
A query API for Cognite point cloud models.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_point_cloud_model_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_point_cloud_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ def __call__(
A query API for Cognite point cloud revisions.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_point_cloud_revision_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_point_cloud_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def __call__(
A query API for Cognite point cloud volumes.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_point_cloud_volume_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_schedulable.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ def __call__(
A query API for Cognite schedulables.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_schedulable_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_source_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def __call__(
A query API for Cognite source systems.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_source_system_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_sourceable_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ def __call__(
A query API for Cognite sourceable nodes.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_sourceable_node_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ def __call__(
A query API for Cognite time series.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_time_series_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ def __call__(
A query API for Cognite units.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_unit_filter(
self._view_id,
Expand Down
5 changes: 5 additions & 0 deletions examples/cognite_core/_api/cognite_visualizable.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def __call__(
A query API for Cognite visualizables.
"""
warnings.warn(
"This method is deprecated and will soon be removed. " "Use the .select() method instead.",
UserWarning,
stacklevel=2,
)
has_data = dm.filters.HasData(views=[self._view_id])
filter_ = _create_cognite_visualizable_filter(
self._view_id,
Expand Down
3 changes: 0 additions & 3 deletions examples/equipment_unit/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions examples/equipment_unit/_api/__init__.py

This file was deleted.

Loading

0 comments on commit 8ca8c18

Please sign in to comment.