cognitedata / cognite-sdk-scala Goto Github PK
View Code? Open in Web Editor NEWCognite Scala SDK
License: Apache License 2.0
Cognite Scala SDK
License: Apache License 2.0
Add support for reading from these two endpoints
https://docs.cognite.com/api/v1/#operation/get3DNodes
https://docs.cognite.com/api/v1/#operation/get3DNodeAncestors
We should have something similar to https://cognite-docs.readthedocs-hosted.com/projects/cognite-sdk-python/en/latest/cognite.html#upload-a-file-or-directory
We can either make it similar to https://cognite-docs.readthedocs-hosted.com/projects/cognite-sdk-python/en/latest/ or go for something in the style of https://typelevel.org/cats/typeclasses.html
Time series may not have names, and so the name
field should be optional for time series related case classes.
val client = new GenericClient[IO, Nothing]("cdp-spark-datasource")
client.threeDAssetMappings(modelId.toLong, revisionId.toLong).read().unsafeRunSync()
Attempting to read 3D Asset mappings of an existing modelId + revisionId throws a decoding error:
Attempt to decode value on failed cursor: DownField(treeIndex),DownArray,DownField(items)
DecodingFailure(Attempt to decode value on failed cursor, List(DownField(treeIndex), DownArray, DownField(items)))
Some requests have limits, like max 1000 items per delete request on assets. The SDK user shouldn't have to care about those, and we should handle it for them in the SDK itself.
As a simpler alternative we could also throw an exception on the client side if a request that is too large for the API is made, but that's hardly better than just leaving the decision to the API.
PS.
A challenge if we take care of this on the API side is that the return type of delete would then be a sequence of responses, instead of a single response. We may have to add some cats-effect to summarize the response into a single one (either a single success response, or a single failed response).
However, that may be considered a separate issue, and returning a list of responses that is usually not inspected anyway is acceptable.
We should allow users to query aggregates in addition to the raw data points.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (local>cognitedata/renovate-config)
Write some introductory documentation similar to https://cognite-docs.readthedocs-hosted.com/projects/cognite-sdk-python/en/latest/cognite.html#
Timeseries data points support protobuf in v1 (not yet documented, but it's been implemented), and we should be using it.
client.dataPoints.queryAggregatesById(
3385857257491234L,
1509490000001L,
1510358399999L,
"1d",
Seq("min")
).unsafeRunSync()
This will return the count
s from publicdata
. Using count
seems to return nothing. I have not checked other aggregates than min, max, sum and count
Rather it uses the project name returned by the login call. This works fine for api key authorization, but when using a bearer token, it sets the project to root
, which can be confusing.
Not possible to specify limit to dataPoints
-queries.
I can't see any docs on how to install the SDK (is it available through any package management systems)?
It's annoying to have to create Auth and SttpBackend explicitly for the simple use case. Find a way to make the user experience smoother, by providing default values.
It should be possible to override them.
Some, or maybe only Files, of our resource only support creating a single item per request. Currently we handle this with a runtime check on the length of the items passed to create
, but it would be better if we handled this in a separate createOne
method: it would remove the need for the runtime check, and it would allow the method to return the single response without wrapping it in a sequence/array.
Add a CreateOne
trait for this method, which can easily be implemented in terms of create
for resource types that support it (wrapping and unwrapping the single item in a sequence and using create
), and have Files implement that trait directly (but not the Create
trait).
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
org.eclipse.jetty:jetty-server
, org.eclipse.jetty:jetty-servlet
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
Warning
Renovate failed to look up the following dependencies: Could not determine new digest for update (github-tags package uesteibar/reviewer-lottery)
.
Files affected: .github/workflows/lottery.yaml
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
org.typelevel:cats-effect
, org.typelevel:cats-effect-laws
, org.typelevel:cats-effect-testkit
)co.fs2:fs2-core
, co.fs2:fs2-io
)com.softwaremill.sttp.client3:async-http-client-backend-cats
, com.softwaremill.sttp.client3:circe
, com.softwaremill.sttp.client3:core
)org.eclipse.jetty:jetty-server
, org.eclipse.jetty:jetty-servlet
).github/workflows/all-hands.yaml
mr-celo/stale-invite v1.3@4d29c05856f0ce4e45daa096333eecffd633c93b
.github/workflows/lottery.yaml
actions/checkout v3
uesteibar/reviewer-lottery v3.1@c291d74388da1cb583aff994b8be945e8eefbcd5
.github/workflows/scala.yml
actions/checkout v4
coursier/setup-action v1
actions/cache v4
actions/cache v4
actions/checkout v4
coursier/setup-action v1
actions/cache v4
actions/cache v4
actions/checkout v4
coursier/setup-action v1
actions/cache v4
actions/cache v4
codecov/codecov-action v3
actions/checkout v4
coursier/setup-action v1
build.sbt
org.typelevel:typelevel-scalafix 0.2.0
scala 2.13.8
commons-io:commons-io 2.15.0
org.eclipse.jetty:jetty-server 9.4.53.v20231009
org.eclipse.jetty:jetty-servlet 9.4.53.v20231009
org.typelevel:cats-effect 3.3.14
org.typelevel:cats-effect-laws 3.3.14
org.typelevel:cats-effect-testkit 3.3.14
co.fs2:fs2-core 3.3.0
co.fs2:fs2-io 3.3.0
com.google.protobuf:protobuf-java 3.25.1
org.tpolecat:natchez-core 0.3.1
org.scalatest:scalatest 3.2.17
com.softwaremill.sttp.client3:core 3.5.2
com.softwaremill.sttp.client3:circe 3.5.2
com.softwaremill.sttp.client3:async-http-client-backend-cats 3.5.2
io.circe:circe-core 0.14.8
io.circe:circe-generic 0.14.8
io.circe:circe-parser 0.14.8
io.circe:circe-literal 0.14.8
project/build.properties
sbt/sbt 1.9.8
project/plugins.sbt
ch.epfl.scala:sbt-scalafix 0.11.1
com.eed3si9n:sbt-buildinfo 0.11.0
org.xerial.sbt:sbt-sonatype 3.10.0
com.jsuereth:sbt-pgp 1.1.2-1
io.github.davidgregory084:sbt-tpolecat 0.4.4
org.scalameta:sbt-scalafmt 2.5.2
org.scalastyle:scalastyle-sbt-plugin 1.0.0
org.scoverage:sbt-scoverage 2.0.0
au.com.onegeek:sbt-dotenv 2.1.233
org.wartremover:sbt-wartremover 3.0.6
software.purpledragon:sbt-dependency-lock 1.5.0
com.thesamet:sbt-protoc 1.0.6
com.thesamet.scalapb:compilerplugin 0.11.14
.scalafmt.conf
scalafmt 3.5.8
Testing updates is a bit tedious, so we don't always test all different updates available.
They could be automated by using reflection on the update and/or read class to generate updates attempting to set each properties to different valid values (and set to null when allowed), and automatically compare results with expectations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.