Skip to content

fix files/upload for files using geo_location #1595

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

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

haakonvt
Copy link
Contributor

[7.13.8] - 2024-01-19

Fixed

  • FilesAPI.upload when using geo_location (serialize error).

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.

@haakonvt haakonvt requested review from a team as code owners January 19, 2024 11:33
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Merging #1595 (3279497) into master (8e69b43) will decrease coverage by 0.06%.
The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1595      +/-   ##
==========================================
- Coverage   91.58%   91.52%   -0.06%     
==========================================
  Files         120      120              
  Lines       16830    16833       +3     
==========================================
- Hits        15413    15407       -6     
- Misses       1417     1426       +9     
Files Coverage Δ
cognite/client/_api/raw.py 94.90% <ø> (ø)
cognite/client/_version.py 100.00% <100.00%> (ø)
cognite/client/data_classes/files.py 93.37% <60.00%> (-0.50%) ⬇️

... and 3 files with indirect coverage changes

if geo_location is not None and not isinstance(geo_location, GeoLocation):
raise TypeError("FileMetadata.geo_location should be of type GeoLocation")
if geo_location is not None:
if isinstance(geo_location, dict):
Copy link
Contributor

Choose a reason for hiding this comment

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

How is a dict passed in here? That should not happen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See _api/files.py

@haakonvt haakonvt force-pushed the fix-files-upload-geo-loc branch from c522c64 to 3279497 Compare January 19, 2024 12:21
@haakonvt haakonvt enabled auto-merge (squash) January 19, 2024 12:21
@haakonvt haakonvt merged commit e2d93f2 into master Jan 19, 2024
@haakonvt haakonvt deleted the fix-files-upload-geo-loc branch January 19, 2024 12:25
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