Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing properties in ViewProperty.as_apply methods #1500

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

doctrino
Copy link
Contributor

@doctrino doctrino commented Nov 12, 2023

Description

  • The .apply() methods on SingleHopConnectionDefinition and MappedProperty were missing properties connection_type and source.
    This is now fixed.

Checklist:

  • 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.
  • Changelog updated in CHANGELOG.md.
  • Version bumped. If triggering a new release is desired, bump the version number in _version.py and pyproject.toml per semantic versioning.

@doctrino doctrino requested review from a team as code owners November 12, 2023 14:31
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

Merging #1500 (457a6d4) into master (6f97b44) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1500      +/-   ##
==========================================
+ Coverage   90.97%   90.99%   +0.01%     
==========================================
  Files         119      119              
  Lines       14410    14410              
==========================================
+ Hits        13110    13112       +2     
+ Misses       1300     1298       -2     
Files Coverage Δ
cognite/client/_version.py 100.00% <100.00%> (ø)
cognite/client/data_classes/data_modeling/views.py 96.21% <ø> (ø)

... and 1 file with indirect coverage changes

@@ -428,6 +429,7 @@ def as_apply(self) -> SingleHopConnectionDefinitionApply:
description=self.description,
edge_source=self.edge_source,
direction=self.direction,
connection_type=self.connection_type,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection_type can just be removed from the constructor of this class. It's implicitly always multiEdgeConnection for this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is more like a class variable?

@doctrino doctrino merged commit 5dba863 into master Nov 13, 2023
7 checks passed
@doctrino doctrino deleted the fix-view-property-as-apply branch November 13, 2023 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants