compas-dev / compas_fab

Robotic fabrication package for the COMPAS Framework.
https://compas.dev/compas_fab/
MIT License
108 stars 32 forks source link

Changed classes to inherete from compas.Data #387

Closed yck011522 closed 7 months ago

yck011522 commented 9 months ago

Some of the classes in compas_fab is still based on (object) instead of (Data)

I have selected some of the classes that should support serialization and upgrade them. Upgrading them should be backward compatible. However, it may affect user classes inherited from these classes. This RP does not cover all the classes yet (e.g. classes in backends, reachability map, ghpython and some more). Let me know if you think I should extend to cover all classes.

@gonzalocasas Should I add test files for this?

What type of change is this?

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

gonzalocasas commented 9 months ago

Should I add test files for this?

yes please! they don't need to be super elaborate, but testing the serialization and deserialization on all these classes with some basic data would help ensure they behave properly all the time

yck011522 commented 9 months ago

I have revised the list of affected classes:

The following class is skipped as it maybe redesigned in near future

yck011522 commented 8 months ago

ping @gonzalocasas

yck011522 commented 8 months ago

ping @gonzalocasas

gonzalocasas commented 8 months ago

Cool, thanks for the updates! On my side, I think this is ready to go!