Commit Graph

279 Commits

Author SHA1 Message Date
izzy lyseggen 066bc44457 Merge pull request #77 from specklesystems/izzy/datachunk-fix
fix(base): specify full name for datachunk
2021-03-22 17:30:08 +00:00
izzy lyseggen 633267b025 Merge pull request #76 from specklesystems/izzy/test-fix
test: update host to use latest.speckle.dev
2021-03-22 17:28:24 +00:00
izzy lyseggen bd4ae7c5c5 fix(base): specify full name for datachunk
would bork in other connectors with name as just `DataChunk`
2021-03-22 17:28:00 +00:00
izzy lyseggen 501f9b8648 test: update host to use latest.speckle.dev 2021-03-22 15:03:22 +00:00
izzy lyseggen 7d2a03e19d Merge pull request #74 from specklesystems/cristi/server_transport_batching
ServerTransport: object batching and sending from multiple background threads
2021-03-22 14:57:09 +00:00
cristi8 c6c7d1731a ServerTransport: Added object batching and sending from multiple background threads 2021-03-22 14:24:14 +02:00
izzy lyseggen a839073968 Merge pull request #73 from specklesystems/izzy/ops
feat(operations): better (de)serialize functions
2021-03-19 20:04:06 +00:00
izzy lyseggen 883ec6e6ae feat(operations): better (de)serialize functions
allow providing transports to the serialize / deserialize functions
to see detaching and chunking
2021-03-19 15:18:06 +00:00
izzy lyseggen 87002257be Merge pull request #72 from specklesystems/izzy/detached-attrs
feat(base): improve adding chunkables/detachables
2021-03-19 10:26:54 +00:00
izzy lyseggen 1bc0cf04f3 fix(base): grammar (detached -> detachable) 2021-03-19 10:20:17 +00:00
izzy lyseggen d0e2350ab7 feat(base): improve adding chunkables/detachables
adds helper methods on `Base` that can be called in the constructors
to prevent ppl messing this up when defining their own objects
2021-03-19 10:14:42 +00:00
izzy lyseggen 255681a887 Merge pull request #70 from specklesystems/izzy/detached-lists
feat(serialisation): optimisations baBY
2021-03-18 18:47:28 +00:00
izzy lyseggen 614eefc393 fix(serialisation): EMBARASSING BUG
so i'm a bit of a dumbo here.
i didn't realise that doing `.update()` on attr would update the parent
attr as well and extend to all objects every ahhhhhh

you have to do `self.thing = self.thing + blah blah` to just update
the instance attr. the more ya know!

#roastme @cristi8
2021-03-18 18:45:24 +00:00
izzy lyseggen d5b506f298 fix(base): swap getattr_static for getattr
brought serialisation time for a big object
down from 12 seconds to 1.7 seconds!!

ty cristi
2021-03-18 17:05:18 +00:00
izzy lyseggen dcd28b5d79 feat(base): don't return set id on get_id
align with core in that `get_id` _always_ fully serializes to get hash
2021-03-18 16:35:28 +00:00
izzy lyseggen c739594ba8 fix(serializer): add children count on serialize
this was previously done _after_ hashing leading to different hashes
on two same objects due to this one field being different
2021-03-18 16:35:28 +00:00
izzy lyseggen 1d4867fb9b test: add detached list to FakeMesh 2021-03-18 16:35:28 +00:00
izzy lyseggen ec94a42ac6 Merge pull request #69 from specklesystems/izzy/detached-lists
fix(serializer): detached lists
2021-03-18 11:09:47 +00:00
izzy lyseggen 6e64770380 test(serializer): test detachment within lists 2021-03-17 17:38:05 +00:00
izzy lyseggen ef92127ed2 feat(serializer): support detachment within lists
this was a borkage on my part - oops!
2021-03-17 17:37:45 +00:00
izzy lyseggen fb8a40bf76 Merge pull request #67 from specklesystems/izzy/objects
fix(serialiser): import geometry objects
2021-03-01 11:17:22 +00:00
izzy lyseggen 81fab3ec6b fix(serialiser): import geometry objects
default to using our obj for deserialisation
2021-03-01 11:15:51 +00:00
izzy lyseggen 9a0c36c665 Merge pull request #66 from specklesystems/izzy/objects
🧊 Basic Geometry Objects
2021-02-26 18:03:41 +00:00
izzy lyseggen 995526c786 feat(objects): jk i gotchu with dem breps 😉 2021-02-26 18:01:14 +00:00
izzy lyseggen 5a66d912ae test: update to use new geo objects 2021-02-26 16:56:49 +00:00
izzy lyseggen 78abbb18c4 feat(objects): geometry yoooo
all geo except for breps
2021-02-26 16:56:10 +00:00
izzy lyseggen 26abdc952a fix(units): add new none type 2021-02-26 16:28:38 +00:00
izzy lyseggen 9a0207ba09 feat(obj): update point class
remove value attribute
2021-02-24 18:34:40 +00:00
izzy lyseggen 4369f8c5c8 Merge pull request #64 from specklesystems/izzy/props
🥠 feat(base): support serialisation of all properties
2021-02-24 17:15:18 +00:00
izzy lyseggen bc432c2f13 feat(objects): override point type 2021-02-24 17:02:47 +00:00
izzy lyseggen d1d3876902 feat(serializer): traverse properties as well 2021-02-24 17:02:11 +00:00
izzy lyseggen b1b144969b feat(base): include properties in member names 2021-02-24 17:01:32 +00:00
izzy lyseggen 4e3ee488be refactor(operations): small simplification 2021-02-24 16:59:12 +00:00
izzy lyseggen b2e2455b16 Merge pull request #61 from specklesystems/izzy/bug-fixes
🐛 Even more bug fixes!
2021-02-22 18:27:06 +00:00
izzy lyseggen ede286f4c0 fix(serialiser): generalise receiving chunk check 2021-02-22 18:23:30 +00:00
izzy lyseggen 56547a4573 fix(client): register branches methods 2021-02-22 18:23:30 +00:00
izzy lyseggen 13886b9caf Merge pull request #58 from gjedlicska/base_type_registration
Custom Base subclasses are automatically registered for deserialization
2021-02-22 18:22:08 +00:00
Gergő Jedlicska 5342cc4827 fix(recomposition): add dictionary recomposition option
If speckle type is not defined for an object, its recomposition results a python dictionary.
2021-02-22 19:17:09 +01:00
Gergő Jedlicska 6fe338628d test(deserialization): undefined behavior of deserialization
Add failing test to uncover a possible bug in deserialization
2021-02-22 17:04:46 +01:00
Gergő Jedlicska 48883466fb Merge branch 'main' of github.com:specklesystems/speckle-py into base_type_registration 2021-02-22 16:59:22 +01:00
izzy lyseggen 47917d99b0 Merge pull request #60 from specklesystems/izzy/receive-fix
🐛 fix(serialiser): smol bug fixes
2021-02-22 10:53:24 +00:00
izzy lyseggen 7703de0a37 test: unknown type deserialisation 2021-02-22 10:22:02 +00:00
izzy lyseggen 81b96cb6ac fix(serialiser): smol bug fixes
- don't overwrite `speckle_type` when receiving unknown object
- check for empty lists on deserialisation
- explicit none check for ignored vals on serialisation
(was unintentionally ignoring `0`s)
2021-02-22 10:17:09 +00:00
Matteo Cominetti 2334aefb09 docs: updates readme with link to docs 2021-02-19 18:38:51 +00:00
Gergő Jedlicska 800b0018a0 style: ran formatter on codebase 2021-02-17 23:52:14 +01:00
Gergő Jedlicska e6cf22e97a feat(base.py): provide easy subclass type registration for (de)serialization
Implement automatic type register mechanism that stores all speckle Base model subclasses in a type
register for deserialization reuse in transports. This enables the Base to be useful as a base kit
object.

fix #50
2021-02-17 23:51:07 +01:00
izzy lyseggen f5abcec6d0 Merge pull request #53 from CyrilWaechter/patch-1
Add infos and fix to README.md
2021-02-16 15:31:39 +00:00
Cyril Waechter fcd54a0899 Add info to README.md
* Add some import to make origin of objects / module used explicit
* Fix #L118:
```python
In [46]: received_base = client.object.get(hash)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-46-8171539461b3> in <module>
----> 1 received_base = client.object.get(hash)

TypeError: get() missing 1 required positional argument: 'object_id'
```
2021-02-16 15:43:36 +01:00
Gergő Jedlicska adfba846ce Merge branch 'base_type_registration' of github.com:gjedlicska/speckle-py into base_type_registration 2021-02-13 14:48:10 +01:00
Gergő Jedlicska 4933ca4abf feat(base object): enforce unique speckle_type value
It was possible to override the builint types with a duplicate speckle_type, either via a duplicate
class name of an explicit speckle_type definition. It is now checked before registering the new type
in the subclass registry, and a meaningful error is thrown.
2021-02-13 14:46:54 +01:00