cognite-sdk-python
cognite-sdk-python copied to clipboard
Transformation schema for nodes and edges with view centric and model centric
Description
Transformation schema for nodes, edges in both view centric and model centric
_api\transformations\schema.py
- Added condition to check destination.type "nodes" or "edges" or "instances", then set the resource path /transformation/schema/instances.
Because all other resource paths are in the format /transformation/schema/{destination.type}
-
withInstanceSpace
,isConnectionDefinition
,instanceType
are optional -
Examples
- Get the schema for a transformation producing nodes::
- Get the schema for a transformation producing edges::
- Get the schema for a transformation producing instance type data model::
- Get the schema for a transformation producing instance relationship data model::
tests\tests_integration\test_api\test_transformations\test_schema.py
Added test_nodes_with_view(self, cognite_client) test_edges_with_view(self, cognite_client) test_instance_type_data_model(self, cognite_client) test_instance_relationship_data_model(self, cognite_client)
Checklist:
- [x] Tests added/updated.
- [ ] Documentation updated. Documentation is generated from docstrings - these must be updated according to your change. If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
- [x] Changelog updated in CHANGELOG.md.
- [x] Version bumped. If triggering a new release is desired, bump the version number in _version.py and pyproject.toml per semantic versioning.
Codecov Report
Merging #1245 (0541481) into master (491a22a) will decrease coverage by
0.01%
. The diff coverage is100.00%
.
:exclamation: Current head 0541481 differs from pull request most recent head b46eb42. Consider uploading reports for the commit b46eb42 to get more accurate results
@@ Coverage Diff @@
## master #1245 +/- ##
==========================================
- Coverage 90.88% 90.87% -0.01%
==========================================
Files 99 99
Lines 11428 11429 +1
==========================================
Hits 10386 10386
- Misses 1042 1043 +1
Impacted Files | Coverage Δ | |
---|---|---|
cognite/client/_api/transformations/schema.py | 100.00% <100.00%> (ø) |
|
cognite/client/_version.py | 100.00% <100.00%> (ø) |
@audunska This PR cannot merge. Do I need more reviewers?
@SunilVenekarKrishnamoorthy waiting for + one person approval to merge.
@erlendvollset Requested changers has been done. Could you please review the code?
build/test_full
failed due to below error, which is not related to this PR.
]
FAILED tests/tests_integration/test_api/test_data_modeling/test_instances.py::TestInstancesAPI::test_retrieve_nodes_and_edges - AssertionError: assert [NodeId(space...keitel'), ...] == [NodeId(space...keitel'), ...]
At index 58 diff: NodeId(space='erlendtestspace', external_id='test2') != NodeId(space='erlendtestspace', external_id='test')
Full diff:
Closing as stale. Feel free to reopen when you have time to work on this!