compas-dev / compas_fab

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

Backend planners now use multi-inherence instead of `__call__` to include the backend functions. #424

Closed yck011522 closed 2 weeks ago

yck011522 commented 1 month ago

This PR changes the way BackendFeature are structured. The previous method of implementing a class with a function and use __call__ to make that class callable is no longer used.

Instead the classes are now treated as a mix-in class for the Planner to mix-in using multiple inheritance. A new BackendFeature class is added and serves as the base class for all the backend feature classes. It contains an interface to the Client which allows their code to make calls to the client.

There is no practical change to the way how users interact with the API.

The main benefit is that the generated documentation has a functional link to the code that implemented that function. The second benefit is that the

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.