-
Notifications
You must be signed in to change notification settings - Fork 36
release 8.0.0a1 to PyPI (DM-3062)
#2387
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
Open
haakonvt
wants to merge
351
commits into
pysdk-release-v8
Choose a base branch
from
v8-change-requests-to-httpx
base: pysdk-release-v8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+49,158
−22,986
Open
Changes from all commits
Commits
Show all changes
351 commits
Select commit
Hold shift + click to select a range
a03370c
Run mypy on tests_integration/test_api/test_agents.py
erlendvollset c3d79db
Run mypy on tests_integration/test_api/test_annotations.py
erlendvollset 8a3d106
Make all tests return None
erlendvollset f8feb6d
Run mypy on tests_integration/test_api/test_data_sets.py
erlendvollset 3507f05
Run mypy on tests_integration/test_api/test_datapoint_subscriptions.py
erlendvollset 0a3a41f
Run mypy on tests_integration/test_api/test_diagrams.py
erlendvollset 10dbfd5
Run mypy on tests_integration/test_api/test_documents.py
erlendvollset 4a8acd3
Fix agent dataclass unit tests
erlendvollset 03dc762
Run mypy on tests_integration/test_api/test_entity_matching.py
erlendvollset 3a81d95
Run mypy on tests_integration/test_api/test_extraction_pipelines.py
erlendvollset 074fc9e
Run mypy on tests_integration/test_api/test_files.py
erlendvollset a13b9e9
Run mypy on tests_integration/test_api/test_functions.py
erlendvollset 92580e4
Run mypy on tests_integration/test_api/test_geospatial.py
erlendvollset 0e668da
Run mypy on tests_integration/test_api/test_iam.py
erlendvollset 12579e4
Run mypy on tests_integration/test_api/test_labels.py
erlendvollset 85e6e40
Run mypy on more integration tests
erlendvollset efb3a03
Run mypy on more relationship integration tests
erlendvollset 2715a0a
Run mypy on all integration tests
erlendvollset 606f70f
Improve contextualization classes and clients
erlendvollset 6b259e3
Run mypy on files unit tests
erlendvollset 227e35d
Run mypy on sequences unit tests
erlendvollset 11fe713
Fix some failing integration tests
erlendvollset f3e56e4
startTime is not required for VisionExtracJob
erlendvollset 352eda1
Run mypy on all files in tests_unit/test_api
erlendvollset 1490119
Run mypy on all test files
erlendvollset 2d44536
Run 'build' workflow on all PRs
erlendvollset 644ae44
Clean up ignore_missing_imports in mypy.ini
erlendvollset ed5e2fc
feat: Change to httpx.AsyncClient
haakonvt 5b955a3
fix: stream methods
haakonvt 5ae0bff
remove all __iter__ methods, update docstrings
haakonvt 491ab34
fix: save one list copy op in datapoints-insert-loop
haakonvt e24a025
rename CogniteClient to AsyncCogniteClient
haakonvt 2366e18
add global BoundedSemaphores for concurrency control
haakonvt 3c75b2d
add AsyncSDKTask for future use in async execute_tasks etc
haakonvt 806b7d0
remove threading-related code from utils/_concurrency.py
haakonvt dab2460
update TasksSummary to work with AsyncSDKTask
haakonvt 2ee2806
add _PyodideEventLoopExecutor for sync support in browser
haakonvt 6359455
add execute_async_tasks and execute_async_tasks_with_fail_fast
haakonvt a6057cc
update _http_client.py, use semaphore and use coroutine factory pattern
haakonvt 69e42da
use semaphore and AsyncSDKTask in _api_client.py
haakonvt 2e6dd12
add overloads to _list_generator in _api_client.py
haakonvt ba96ecc
un-nest get_partition in _api_client.py
haakonvt 1f852f0
make _api_client.py async
haakonvt df71a2c
make _basic_api_client.py async
haakonvt ecda140
make top-level API methods (get/post etc) async on async client
haakonvt 669eca8
add stand-in CogniteClient (not impl)
haakonvt 2f2d5b8
make API async: agents/agents
haakonvt 991cb91
make API async: ai/tools/documents
haakonvt 9cd9506
make API async: annotations
haakonvt acb5a8f
make API async: assets
haakonvt a2829f0
convert AssetsAPI.create_hierarchy to async
haakonvt 202c9eb
make API async: data_modeling/*
haakonvt 05ae764
make API async: data_sets
haakonvt 82df2b7
make API async: datapoints
haakonvt eb8c43d
make API async: datapoints_subscriptions
haakonvt b2af2f1
make API async: diagrams
haakonvt 462e739
make API async: documents + doc. preview
haakonvt 1fac5ad
make API async: entity_matching
haakonvt c9d315a
make API async: events
haakonvt 165e9d4
make API async: extractionpipelines/*
haakonvt a752788
make API async: files
haakonvt 812dc5e
make API async: functions/*
haakonvt b58ea4a
make API async: geospatial
haakonvt e24a7a9
make API async: hosted_extractors/*
haakonvt 6f55364
make API async: iam/*
haakonvt 2178088
make API async: labels
haakonvt 0b00100
make API async: postgres_gateway/*
haakonvt 0785163
make API async: raw/*
haakonvt dc30c14
make API async: relationships
haakonvt 329e923
make API async: sequences + seq. data
haakonvt db824cc
make API async: simulators/*
haakonvt 2ebee44
make API async: synthetic_time_series
haakonvt d2ec4d2
make API async: three_d/*
haakonvt d4b8514
make API async: time_series
haakonvt 220decc
make API async: transformations/*
haakonvt a8efdd3
make API async: units + unit_system
haakonvt 676c64f
make API async: user_profiles
haakonvt bcc37cc
make API async: vision
haakonvt 946fd12
make API async: workflows/*
haakonvt 3028ef4
make async: data_classes/assets
haakonvt d6ae75f
make async: data_classes/contextualization
haakonvt 6332a0e
make async: data_classes/data_modeling/debug
haakonvt 1588356
make async: data_classes/datapoints
haakonvt 75b4e2d
make async: data_classes/files
haakonvt dd4a80e
make async: data_classes/functions
haakonvt 3b07dc0
make async: data_classes/simulators/runs
haakonvt e622b93
make async: data_classes/raw
haakonvt 3eb9261
make async: data_classes/time_series
haakonvt 7c9e438
make async: data_classes/transformations/*
haakonvt a5ba96f
make async: data_classes/sequences
haakonvt a16026b
update scripts/custom_checks/docstrings.py to support AsyncIterators
haakonvt 21cd243
remove function import_as_completed
haakonvt c1a83bf
improve ergonomics of AsyncSDKTask with __getitem__
haakonvt fe54005
drop pytest-asyncio in favor of anyio (used by httpx, so non-optional)
haakonvt 5d425de
remove retrieve_dataframe_in_tz (timezone now support in API)
haakonvt 662f189
change datapoints fetch code to async 😓
haakonvt 5e58f52
fix CogniteNotFoundError missing cluster and project
haakonvt 195c9f3
fix async: CogniteProjectAccessError._attempt_to_get_projects
haakonvt 4bf98e6
update raw rows iter method to async
haakonvt 3a19da1
add AsyncCogniteClient to all examples
haakonvt d590424
make sequences.rows a property and add DeprecationWarning
haakonvt b8b8161
add SyncIterator (to wrap async __call__) to utils/_async_helpers.py
haakonvt 91f7ebc
rename _json.py to _json_extended.py as it conflicts with stdlib _jso…
haakonvt 2c1ace0
minor cleanup of prev. "un-split" APIs:
haakonvt a5655c6
split ExtractionPipelinesAPIs into separate files
haakonvt 2e8f44f
make async: utils/_session.py
haakonvt 9352192
fix imports, raw strings missing 'r' and minor mypy/formatting
haakonvt 381dae5
add overloads to _process_into_chunks in _api_client.py
haakonvt 7b9e74a
refactor settings_forcing_raw_response_loading in _api_client.py
haakonvt 2ee1a6c
refactor settings_forcing_raw_response_loading in DM/instances.py
haakonvt d80df1c
add/fix overloads on RawRowsAPI.__call__
haakonvt cf972dc
use match stmt in InstancesAPI.__call__
haakonvt 938978c
use match stmt in SequencesDataAPI.insert
haakonvt 52d84e8
httpx no longer need pyodide-patching!
haakonvt dce48d7
fix: reintroduce _base_url_with_base_path on API client to handle Org…
haakonvt 2822520
make the SDK work in "normal" jupyter notebooks
haakonvt 4084acb
add run_sync function to _utils/async_helpers.py
haakonvt 13fe85c
delete: cognite/client/beta.py
haakonvt 68fd847
remove deprecated aggregate methods
haakonvt 2c2da3a
remove deprecated filter methods
haakonvt e0a7572
remove deprecated methods in _api/workflows/
haakonvt 6d0d88a
remove support for deprecated argument 'column_external_ids' in _api/…
haakonvt 22cdd0e
fix incorrect _RESOURCE_PATH in _api/sequence_data.py
haakonvt a66e4ec
change agg method to "count" for data sets and files
haakonvt 61f658c
remove CountAggregate
haakonvt 4c477ec
make TemplateGroupsAcl a LegacyCapability
haakonvt 0bf806e
remove deprecated partitions-support on __call__
haakonvt ea4093c
remove legacy_name from time series data classes++
haakonvt 94382fa
remove deprecated DataPointSubscriptionCreate
haakonvt 57b111d
flip expand_properties default to True in to_pandas (data modeling)
haakonvt 76986ff
fix DataModelingInstancesList.get method (remove deprecated 'id' arg)
haakonvt b1615a7
raise in ViewProperty[-Apply] when conn.def. is missing 'connectionType'
haakonvt a933bfd
remove deprecated CogniteObject method load_yaml on Query
haakonvt c9e2a30
queries for datapoints can no longer be passes as dict
haakonvt 2cb32d9
remove deprecated DatapointsArray.__iter__ method
haakonvt 0670609
fix double type annotations in docstring
haakonvt 9b7587f
add decorator factory 'copy_doc_from_async' (doc = docstring)
haakonvt f50cb3e
fix data class helper methods: assets.py
haakonvt 9a97fc4
fix data class helper methods: contextualization.py
haakonvt d5b3857
fix data class helper methods: files.py
haakonvt 922f596
fix data class helper methods: functions.py
haakonvt 42e0203
fix data class helper methods: raw.py
haakonvt 82c84bf
fix data class helper methods: sequences.py
haakonvt fcfab6f
fix data class helper methods: simulators/*
haakonvt 16d22f1
fix data class helper methods: time_series.py
haakonvt 3637b9a
fix data class helper methods: transformations/__init__.py
haakonvt 1732d87
fix data class helper methods: transformations/jobs.py
haakonvt 1d2486c
remove param 'expected_fields' from Datapoints._load
haakonvt ea7e4a3
remove warning in class Transformation on already removed init params
haakonvt b6e5a01
drop 'deprecated' from docs (toctree) after sunsetting TemplatesAPI
haakonvt c350187
update thread-executor tests to async: tests/tests_unit/test_utils/te…
haakonvt a11a50a
add Omitted class to be used as "not given" singleton
haakonvt d4998b8
Update Apply-classes in cdm/v1.py to use OMITTED default
haakonvt 1fc3112
Update Apply-classes in extractor_extensions/v1.py to use OMITTED def…
haakonvt b214e66
Ignore OMITTED values from being dumped in: data_classes/data_modelin…
haakonvt ea7ff0f
Load missing as OMITTED in Typed Apply classes in: data_classes/data_…
haakonvt 0e13e32
use match statement in _serialize_value
haakonvt 39df607
Ingesting no datapoints no longer raises an exception
MortGron 2d8373b
remove alpha/beta client test fixtures/helper fns
haakonvt 712e01c
make test util set_request_limit a fixture
haakonvt ae5c2dc
refactor usage of set_request_limit
haakonvt f6159fe
update test to use tmp_path fixture
haakonvt 7e8d4c8
spellcheck on AsyncCogniteClient
haakonvt ffd2510
Access the response from the exception, not from the local variable
haakonvt 71f92f0
make PrincipalsAPI async
haakonvt 5361a7d
fix: CI checks for pyodide after httpx addition
haakonvt 7bb8e8d
remove arg ignore_allscope_meaning from ACL compare fns (in IAM)
haakonvt a5d7f8c
short-circuit "retrieve_multiple" and similar on [] input
haakonvt 2dd0b9b
make ruff remove empty "if TYPE_CHECKING:" blocks
haakonvt 3e890df
rename ModelFailedException -> CogniteModelFailedError and fix inheri…
haakonvt f73314b
Org APIs use api-layer logic, not http. add CogniteOrganizationError
haakonvt e1eefb7
build request again when retrying in AsyncHTTPClientWithRetry.stream
haakonvt c315dae
remove special pyodide handling in FilesAPI upload *YEY*
haakonvt 09cce0a
only accept pathlib.Path in FilesAPI (keep str support though)
haakonvt 5962d82
fix bug in '_process_file_download' by using 'is_relative_to' instead
haakonvt ba2b94d
add helpers for file handling: utils/_uploading.py
haakonvt 5800e73
fix FilesAPI: httpx AsyncClient doesn't accept regular file handles (…
haakonvt b1b9ad1
make FileMultipartUploadSession work in both sync and async contexts
haakonvt 0c0a3be
add script to convert async apis into sync
haakonvt 410f043
add Mock for async client: AsyncCogniteClientMock
haakonvt 7405d67
properly fix missing AsyncMocks in AsyncCogniteClientMock
haakonvt 78355a2
properly fix spec_set=True in CogniteClientMock
haakonvt 3277849
change monkeypatch client fns to use patch instead of hacking __new__
haakonvt 4ef48d3
update mock tests after refactoring
haakonvt a86bde4
refactor BasicAsyncAPIClient._request to log but re-raise
haakonvt 7c06185
fix: missing payload from on-error-logging/raising
haakonvt 53995ee
run script to create all sync APIs + sync CogniteClient
haakonvt 2fbf43c
update API-conversion script to include sync methods + overloads
haakonvt edacf27
run updated script to update sync APIs
haakonvt 99b0fc3
update conversion script to add basic HTTP methods++ to CogniteClient
haakonvt 3a46ed8
fix tests: tests/tests_unit/* and tests/utils.py
haakonvt fb1d3e8
fix tests: tests/tests_unit/test_api/*
haakonvt 04de0b2
fix tests: tests/tests_unit/test_data_classes/*
haakonvt 74873c1
fix tests: tests/tests_integration/*
haakonvt 80eced6
fix plain wrong code in docstring examples
haakonvt b610070
fix: various imports
haakonvt b8f18d3
run coverage also on test files
haakonvt f40d1e1
refactor: insert_dataframe, infer id type from columns
haakonvt 6b7ae90
Update Sphinx documentation
haakonvt b6ea752
reorgranize DatapointsAPI, split utils and aggregates
haakonvt de5e61a
refactor Synth.DatapointsAPI to not use _extend
haakonvt 126764d
refactor: use MultiIndex in df.columns for dps dataframes
haakonvt 9f778b9
move Geometry from data_classes/_base to /shared.py
haakonvt 993fab5
convert timed_cache to async, add tests
haakonvt d04d0d6
update _select_dps_fetch_strategy to use semaphore bound value
haakonvt 42b6d80
refactor InstancesAPI.subscribe to async
haakonvt 18b319e
update docs on InstancesAPI.subscribe -> local sqlite db
haakonvt ead2d93
Split query and sync classes
audunska f9f3d4e
Filter: Add magic __eq__
audunska 2985088
Turn split sync query classes into dataclasses
audunska 35b4285
Fix tests related to Query-Sync-split
audunska c06b225
Update InstancesAPI.subscribe doc example to use -Sync classes
audunska 838b50b
make BasicAsyncAPIClient picklable
haakonvt be8324c
turn on pickle-client-test and add one for AsyncCogniteClient
haakonvt 89114ec
feat(documents): extend content methods to support external_id and in…
andersfylling 2e28120
avoid 'Task exception was never retrieved' in Datapoints API
haakonvt 67cc841
update set_max_workers -> override_semaphore in tests/utils.py
haakonvt 2c728f2
mypy pass of unit tests (+ minor fixes)
haakonvt 0ee0b78
update to using override_semaphore in tests
haakonvt a50fb4d
update datapoints->dataframe tests after MultiIndex columns change
haakonvt 6a14da1
improve robustness of workflow tests. change trigger to avoid spam
haakonvt 4b304eb
update transformations tests (some used to be async even bef v8)
haakonvt 2201904
do a mypy pass on tests
haakonvt 1a9462d
change scopes arg of OAuthClientCredentials to allow None
haakonvt 5a05f23
final mypy pass on sync APIs
haakonvt 8f8eae6
use response header to evaluate is_auto_retryable (not .json())
haakonvt dc6da5d
always keep time series identifier in dataframe columns
haakonvt e62f312
perf: short circuit in util fn: at_least_one_is_not_none
haakonvt 76b28f4
remove 'Cannot chain result sets...' check in instances/subscribe
haakonvt c853d96
remove no longer needed err handling of 'response.http_version'
haakonvt 7557510
Add dunder str and repr-html to GlobalConfig
haakonvt 7f40b29
remove upper bound on pre-commit. run autoupdate
haakonvt 927b9d0
final mypy pass of fixes
haakonvt d7f38c1
final tests fixups
haakonvt 6ce01de
final pass on sync APIs
haakonvt f82ec1b
bump version to 8.0.0a1
haakonvt 471758a
update MIGRATION_GUIDE.md for v7 -> v8
haakonvt bb7caaa
fix generator return annot to union of iterators
haakonvt 1d9f664
fix generator return annot to union of iterators in sync api
haakonvt 25869f8
prepare codegen (sync api/client) for pre-commit/CI
haakonvt 3adb175
run code-gen on edited files in commit (in pre-commit)
haakonvt d0e2950
verify all codegen files in new CI check (.github/workflows/build.yml)
haakonvt 5c00175
add section on 'Automatic Code Generation' to CONTRIBUTING.md
haakonvt 1ba5b84
drop base_url default in ClientConfig. add cluster as opt
haakonvt 2439447
refactor filters to impl _load on subclasses
haakonvt 52c5956
rename default_for_azure_ad to default_for_entra_id
haakonvt 743e856
allow NodeID in DirectRelationReference.load
haakonvt 695a085
Split the DM container classes into read/write
audunska 4fd6abd
handle UnicodeEncodeError from strict httpx ascii-only header req
haakonvt c760443
clean up AggregatedValue in data_classes/aggregations.py
haakonvt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| [run] | ||
| source=cognite | ||
| source = | ||
| cognite | ||
| tests | ||
| omit = | ||
| cognite/client/_proto/* | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails if the sync client is not up to date right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, the client itself it always checked