Commit Graph

156 Commits

Author SHA1 Message Date
Claire Kuang 878edf7c8f Merge branch 'dev' into claire/cnx-849 2024-12-03 22:18:24 +00:00
Claire Kuang ab0ff7b792 removes unnecessary classes 2024-12-03 22:13:46 +00:00
Claire Kuang b5999e3361 adds properties field to DataObject 2024-12-03 19:48:24 +00:00
Adam Hathcock d904c68c10 Nullable fixes - nullability on Base (#184)
* Remove operator overloading and Equals/GetHashCode which caused problems

* properly have nullability annotations on Base

* redeux known nullables

* fmt

* more nullability

* fmt

* remove point equality operator

* Revert "Remove operator overloading and Equals/GetHashCode which caused problems"

This reverts commit 6b5d3f1462.

* Revert "remove point equality operator"

This reverts commit 9b14330147.

* revert nullable accounts

* fix build issues
2024-12-03 13:01:33 +00:00
Adam Hathcock daec64cf8e Remove the Base cache because it's not practically useful (#183) 2024-12-03 12:48:18 +00:00
Adam Hathcock 1844386235 Better options for serializer (#180)
* refactor options to use on factories, add dummies

* format

* reduce lists to yield return

* get primitives first to avoid to string

* fmt

* add cache base option
2024-11-29 15:43:10 +00:00
Adam Hathcock 05f90eae5c Use frozen collections (#178)
* add detail to exceptions

* Detachable nested objects work

* fmt

* Use frozen collections

* fix tests and formatting
2024-11-29 15:25:29 +00:00
Adam Hathcock 7bbc568022 Make ISqLiteJsonCacheManager and use it for new serialization and account manager (#179)
* Introduce ISqLiteJsonCacheManager with factory for cache manager and other uses

* AccountManager uses new sqlite

* format

* add extension
2024-11-27 12:14:16 +00:00
Adam Hathcock 7a1edbbf99 Fix externals refs again (#177)
* add detail to exceptions

* Detachable nested objects work

* fmt
2024-11-26 09:47:44 +00:00
Claire Kuang 08dd45cc32 Update Interfaces.cs 2024-11-22 12:28:14 +00:00
Claire Kuang d4173c1449 adds civil and tekla objects 2024-11-22 10:21:06 +00:00
Adam Hathcock 2477423ba7 some tests adjusted 2024-11-22 09:12:10 +00:00
Claire Kuang 71ec9a6d11 rescopes data object classes 2024-11-21 17:53:37 +00:00
Claire Kuang 140b39f605 adds data object classes 2024-11-21 16:47:34 +00:00
Claire Kuang 1a0522cef3 removes unused revit classes 2024-11-20 18:26:38 +00:00
Adam Hathcock b343d9bd0d add Id and Json types (#165)
* Can debug dependencies

* Different exceptions

* Uses root id only after we found it to signal the end

* DataChunks are created later and need to be accounted for

* format

* use app ids in tests and references

* check sqlite cache after serialize

* use dummy to go through channels to end

* fmt

* Extend channel lib to batch by size

* fmt

* build fix

* adjust limits

* FIx sending

* Optimize reference generation

* more

* remove tolist

* rework closures to be constant and serializer only deals with current....references bases are cached

* fix chunk creation

* another bug fix

* clean up with factories

* add deserializer factory

* Needed to reference interface

* add Id and Json types

* Fix tests

* remove optional

* add another missing id write

* fix merge

* Fix new code
2024-11-20 09:51:10 +00:00
Adam Hathcock e32ec52071 Add closures for external references (#175)
* allow external references and fix closures

* format
2024-11-20 08:28:33 +00:00
Adam Hathcock 2bbe2a8b93 allow external references and fix closures (#174)
* allow external references and fix closures

* fix comment
2024-11-19 14:22:20 +00:00
Adam Hathcock 604e141468 Update CSharpier with better new usage (#172) 2024-11-19 14:10:30 +00:00
Jedd Morgan 39dcc5da0b Refactor MaybeThrowGraphqlException to throw AggregateException with all GraphQL errors (#169)
* first pass

* Updated tests

* Removed path from message
2024-11-19 13:22:52 +00:00
Jedd Morgan af35edf0a2 Breaking API changes for comments API (#173)
* Fixed breaking change to comments api

* fixed stuff

* oops
2024-11-19 12:15:17 +00:00
Jedd Morgan fbc7400524 Changed http handler to not throw on non-successful results (#170)
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-11-19 10:55:27 +00:00
Jedd Morgan 105395e9fb Enforced msbuild warnings (#166)
* Enforced msbuild warnings

* removed inline suppression

* fix
2024-11-18 10:20:00 +00:00
Adam Hathcock 715bb7274a Batch by size, Closures and Detached items are computed differently (#164)
* Can debug dependencies

* Different exceptions

* Uses root id only after we found it to signal the end

* DataChunks are created later and need to be accounted for

* format

* use app ids in tests and references

* check sqlite cache after serialize

* use dummy to go through channels to end

* fmt

* Extend channel lib to batch by size

* fmt

* build fix

* adjust limits

* FIx sending

* Optimize reference generation

* more

* remove tolist

* rework closures to be constant and serializer only deals with current....references bases are cached

* fix chunk creation

* another bug fix

* clean up with factories

* add deserializer factory

* Needed to reference interface

* move around streamId

* some clean up

* Use StringBuilder pool on serialization to reduce memory pressure

* remove extra

* remove extra clears

* Fix a flaw in batchsize

* use default complete

* format

* loader should use 1 writer that is batched

* remove redundant ref gen

* Fix graphql commands by adding project id
2024-11-12 14:25:49 +00:00
Adam Hathcock 43445bc4ff Add SQLite transport2 (#162)
* Add SQLiteTransport2

* cleanup
2024-11-07 10:00:43 +00:00
Adam Hathcock 3bff2d5d57 Use Reference generator (#161)
* Optimize reference generation

* more

* use reference generator

* move

* remove using
2024-11-07 09:48:52 +00:00
Adam Hathcock 0240e3b49e Send Channel fixes (#155)
* Can debug dependencies

* Different exceptions

* Uses root id only after we found it to signal the end

* DataChunks are created later and need to be accounted for

* format

* use app ids in tests and references

* check sqlite cache after serialize

* use dummy to go through channels to end

* fmt

* fix tests and add more send events
2024-11-06 11:53:21 +00:00
Jedd Morgan d65993389b Obsolete warnings (#156) 2024-11-06 11:29:40 +00:00
Adam Hathcock 4cc78c4bc9 Serialize using a Channel (#146)
* Use a stack channel for deserialization

* multi-threaded

* add object dictionary pool

* more pooling

* adjust sqlite transport

* format

* Optimize IsPropNameValid

* object loader first pass

* save test

* add cache pre check

* save better deserialize

* mostly works

* uses tasks but slower at end

* rework to make more sense

* add check to avoid multi-deserialize

* modify max parallelism

* async enqueuing of tasks

* switch to more asyncenumerable

* fmt

* fmt

* cleanup sqlite

* make ServerObjectManager

* revert change

* add ability to skip cache check

* cache json to know what is loaded

* testing

* clean up usage

* clean up and added new op

* Fix exception handling

* fixing progress

* remove codejam

* Hides ObjectPool dependency

* fmt

* Use the 1.0 BCL async to try to be more compatible

* rename to dependencies

* Move Polly to internal dependencies

* format

* remove more old references

* remove stackchannel

* fixes for registration

* remove console writeline

* add cache check shortcut for root object

* start refactoring send

* recevie2 benchmark

* add test for deserialize new

* use channels for sending

* test and fixes

* Use same asyncinterfaces as Dynamo.  Merge fixes

* clean up

* fix download object progress

* put back from bad merge

* intermediate commit: separating get child function from serializer

* send didn't error

* add channels

* Use net48, netstandard2.1 and net8

* remove collection special case

* have to make a tree of tasks even though it may serialize things twice

* pre-id changing during serialize

* need AsyncInterfaces for net48 :(

* options changes

* revert to netstandard2.0 and net8.0

* fix totals

* revert httpcontext changes

* format

* clean up

* active tasks works when accounting for id not being stable

* add id tests

* more fixes

* works

* format

* Convert to BaseItem and use single SQLite checks to avoid locks

* use locks and batch sqlite operations

* hook up and handle null ids

* remove unused parameter

* remove progress from serializer itself

* invert has objects call

* readd object references

* format

* fix tests

* remove active tasks check

* bug fix for json cache

* remove locks from sqlite

* General Send test

* add childclosures

* redo extract all to be enumerable

* group tests in projects

* caching json does matter

* cache checking should be managed by channels

* format

* Merge pull request #152 from specklesystems/new-json-test

Uses a new objects test in Revit for serialization tests

* add skip

* add new roundtrip test

* fix finish

* clean up tests

* check happens in serialize...don't do it twice

* better progress reporting

* fix progress reporting

* only use detached properties when children gathering

* move detached tests

* add detached tests

* fix merge

* Fix progress change

* fix more tests

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-11-05 09:56:54 +00:00
Claire Kuang 8a148b892f refactor(objects): removes unused classes and constructors (#151)
* removes unused classes and gh schema constructors

* additional cleanup of backwards compatibility (v2)

* Update Arc.cs

* updates unit tests

* re-adds bbox to box

* updates tests

* pr fixes for backwards compatibility

* Uses a new objects test in Revit for serialization tests

* format

* updates revit model curve class to inherit from curve geometry, and adds deprecated v2 classes

* fixes transform unit tests

* fixes deprecated speckle type

* removes unnecessary new revit curve classes

---------

Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Alan Rynne <alan@rynne.es>
2024-11-04 17:05:16 +00:00
Jedd Morgan fba0c46ed8 Added explicit nullability to GqlModels (#144)
* Added explicit nullability to GqlModels

* data and alignment

* ModelsWithVersions

* Models

* active user

* Invites and active user fixes

* Invite changes

* Subscriptions

* Fixed subscription tests

* corrected nullability of projectinput

* removed unused mutation responses

* format

---------

Co-authored-by: Alan Rynne <alan@rynne.es>
2024-11-04 16:52:15 +00:00
Adam Hathcock 27d3028880 Revert to SQlite 7.0.5 to exactly match V2's usage (#153)
* Revert to SQlite 7.0.5 to exactly match V2's usage

* update comment to be exact
2024-10-31 14:58:52 +00:00
Alan Rynne 93b3c37584 fix: Change SpecklePathProvider from internal to public (#150) 2024-10-28 13:04:34 +01:00
Adam Hathcock f5a8d1a738 Add cache download channels (#149)
* Use a stack channel for deserialization

* multi-threaded

* add object dictionary pool

* more pooling

* adjust sqlite transport

* format

* Optimize IsPropNameValid

* object loader first pass

* save test

* add cache pre check

* save better deserialize

* mostly works

* uses tasks but slower at end

* rework to make more sense

* add check to avoid multi-deserialize

* modify max parallelism

* async enqueuing of tasks

* switch to more asyncenumerable

* fmt

* fmt

* cleanup sqlite

* make ServerObjectManager

* revert change

* add ability to skip cache check

* cache json to know what is loaded

* testing

* clean up usage

* clean up and added new op

* Fix exception handling

* fixing progress

* remove codejam

* Hides ObjectPool dependency

* fmt

* Use the 1.0 BCL async to try to be more compatible

* rename to dependencies

* Move Polly to internal dependencies

* format

* remove more old references

* remove stackchannel

* fixes for registration

* remove console writeline

* add cache check shortcut for root object

* recevie2 benchmark

* add test for deserialize new

* Use same asyncinterfaces as Dynamo.  Merge fixes

* clean up

* fix download object progress

* add channels

* Use net48, netstandard2.1 and net8

* need AsyncInterfaces for net48 :(

* options changes

* revert to netstandard2.0 and net8.0

* fix totals

* revert httpcontext changes

* format

* add active tasks collection

* format

* remove more changes and remove unused method

* remove more comment changes

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-10-25 14:28:33 +01:00
Adam Hathcock e10cc38ca7 Give new dependencies lib ability to publish (#148) 2024-10-24 13:53:10 +00:00
Adam Hathcock b6d2d01068 Tasks hide new dependencies (#145)
* Use a stack channel for deserialization

* multi-threaded

* add object dictionary pool

* more pooling

* adjust sqlite transport

* format

* Optimize IsPropNameValid

* object loader first pass

* save test

* add cache pre check

* save better deserialize

* mostly works

* uses tasks but slower at end

* rework to make more sense

* add check to avoid multi-deserialize

* modify max parallelism

* async enqueuing of tasks

* switch to more asyncenumerable

* fmt

* fmt

* cleanup sqlite

* make ServerObjectManager

* revert change

* add ability to skip cache check

* cache json to know what is loaded

* testing

* clean up usage

* clean up and added new op

* Fix exception handling

* fixing progress

* remove codejam

* Hides ObjectPool dependency

* fmt

* Use the 1.0 BCL async to try to be more compatible

* rename to dependencies

* Move Polly to internal dependencies

* format

* remove more old references

* remove stackchannel

* fixes for registration

* remove console writeline

* add cache check shortcut for root object

* recevie2 benchmark

* add test for deserialize new

* Use same asyncinterfaces as Dynamo.  Merge fixes

* clean up

* fix download object progress

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-10-24 15:23:16 +02:00
Adam Hathcock cca8828565 Using Tasks for Deserialization (#143)
* Use a stack channel for deserialization

* multi-threaded

* add object dictionary pool

* more pooling

* adjust sqlite transport

* format

* Optimize IsPropNameValid

* object loader first pass

* save test

* add cache pre check

* save better deserialize

* mostly works

* uses tasks but slower at end

* rework to make more sense

* add check to avoid multi-deserialize

* modify max parallelism

* async enqueuing of tasks

* switch to more asyncenumerable

* fmt

* fmt

* cleanup sqlite

* make ServerObjectManager

* revert change

* add ability to skip cache check

* cache json to know what is loaded

* testing

* clean up usage

* clean up and added new op

* Fix exception handling

* fixing progress

* remove codejam

* remove stackchannel

* remove console writeline

* add cache check shortcut for root object

* recevie2 benchmark

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-10-22 14:14:39 +01:00
Adam Hathcock 3c783b3cac retry result can be null so handle it better (#142)
Co-authored-by: Alan Rynne <alan@rynne.es>
2024-10-17 09:38:09 +00:00
Jedd Morgan 8f8be7482a Added workspace id to v3 sdk (#134)
* Added workspace id to v3 sdk

* use init setter
2024-10-15 12:57:15 +01:00
Adam Hathcock 3b859ba398 Add headers to outgoing http requests for Open Telemetry (#141)
* Add otel headers to outgoing http client requests

* format
2024-10-14 10:40:29 +01:00
Adam Hathcock 4c52072e0a Optimize IsPropNameValid (#140)
* Optimize IsPropNameValid

* compare char to char
2024-10-11 09:44:45 +00:00
Dimitrie Stefanescu 1241589d18 Adds new classes for raw encoded objects (Brep, Extrusion and Subd) (#139)
* feat: adds wip classes for brep/subd/extrusion-x

* Get rid of dub code on ExtrusionX SubDX BrepX

* fix: Run format

* chore: formatting

* chore: more formatting

help dis annoying

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Alan Rynne <alan@speckle.systems>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-10-10 09:26:55 +00:00
Adam Hathcock 1a9d28e660 add metrics to sdk (#133)
* add metrics to sdk

* metrics for sends and receives

* format
2024-10-10 10:32:52 +02:00
Adam Hathcock e14913b8c3 Fix deserialization progress reporting (#137)
* Fix progress reporting for deserialization, remove children known count

* fix tests
2024-10-09 11:57:48 +01:00
Alan Rynne 0d7805d060 feat: Added new speckle exceptions and split into single files (#136)
* feat: Added new speckle exceptions and split into single files

* fix: Run format
2024-10-07 17:14:59 +02:00
Adam Hathcock 14359333b4 Nuget Updates (#132)
* update test packages

* update csharpier
2024-10-07 12:48:00 +02:00
Adam Hathcock 75d88c5f39 Use IProgress instead of custom type (#131)
* Use IProgress instead of custom type

* Format

* ProgressArgs are a readonly struct

* fix tests
2024-10-02 10:50:49 +01:00
Adam Hathcock 9a3eddf6d5 use array defaults (#129) 2024-09-27 11:00:21 +01:00
Jedd Morgan f541525a80 Regex experimentation (#128) 2024-09-26 13:58:48 +01:00
Adam Hathcock c2d0e1d0d4 use await instead of .Result 2024-09-26 08:13:58 +01:00