cognitedata / cognitedata/cognite-sdk-python

ThreeDAssetMappingAPI.delete() to accept cognite.client.data_classes.three_d.ThreeDAssetMappingList

Open
#1,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
92
Forks
38
Avg merge
2d 9h
Merged PRs (30d)
42

Description

System information (please complete the following information):

SDK Version:
name = "cognite-sdk-core"
version = "2.56.1"

Describe the solution you'd like

To be able to delete the asset mapping directly as returned from list().

Describe alternatives you've considered

Workaround by converting to a list:

    asset_mappings = client.three_d.asset_mappings.list(model_id=model.id, revision_id=revision.id, limit=1000)
    client.three_d.asset_mappings.delete(model_id=model.id, revision_id=revision.id, asset_mapping=[a for a in asset_mappings])

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ThreeDAssetMappingAPI.delete() and the ThreeDAssetMappingList returned by list(), then compare the current delete input handling with the workaround in the issue. Done means a list result can be passed directly to delete without converting it to a plain list; add or update coverage for that usage if the repository has tests for these entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.