Implemented BHoMObject python class to simplify c#/python interop - #354
Implemented BHoMObject python class to simplify c#/python interop#354Tom-Kingstone wants to merge 15 commits into
Conversation
Wind has been tested and works as expected, but external comfort module has not been tested, need to also write tests for BHoMObject and check that existing unit tests still pass.
…ps with BHoM in grasshopper/excel (mainly testing with utci plot commands)
… the LBTBHoMJSONDecoder
…ulation/external comfort commands
|
@BHoMBot check versioning |
|
@Tom-Kingstone to confirm, the following actions are now queued:
There are 611 requests in the queue ahead of you. |
…nvironment name to find the path to run_wrapped in case the environment is in an unexpected location
|
I reviewed by running the unit tests, and spot check in GH too. All good. Versioning check is still outstanding. |
|
@Tom-Kingstone to confirm, the following actions are now queued:
There are 89 requests in the queue ahead of you. |
|
@Tom-Kingstone to confirm, the following actions are now queued:
There are 196 requests in the queue ahead of you. |
|
@BHoMBot check required |
|
@Tom-Kingstone to confirm, the following actions are now queued:
|
|
The check |
|
@jamesramsden-bh to confirm, the following actions are now queued:
There are 100 requests in the queue ahead of you. |
|
@jamesramsden-bh to confirm, the following actions are now queued:
There are 102 requests in the queue ahead of you. |
|
The check |
|
The check |
jamesramsden-bh
left a comment
There was a problem hiding this comment.
Approving as per previous comment, versioning fix, and retest of run_tests.bat
|
@BHoMBot check ready-to-merge |
|
@jamesramsden-bh to confirm, the following actions are now queued:
There are 156 requests in the queue ahead of you. |
|
@jamesramsden-bh to confirm, the following actions are now queued:
There are 292 requests in the queue ahead of you. |
NOTE: Depends on BHoM/Python_Toolkit#233
Issues addressed by this PR
BHoM/Python_Toolkit#220
Using BHoMObject implementation in python_toolkit, apply this to the bhom/wrapped methods to make them simpler and reduce boilerplate in these methods (This PR does add back in a bit of boilerplate where classes have been made subclasses of BHoMObject e.g. SimulationResult, but in total a lot of mess has been removed and this makes things simpler for developers to add bhom/wrapped methods so they can be called from c#).
This also allows BHoM JSON serialisation for most of the classes defined in this toolkit to improve interop between the two languages as they will use the same(ish) serialiser.
Test files
All python unit tests should pass except the ABC model test (as that requires the ABC API to be working which is usually not the case 🙃). If any other unit tests fail please comment the full stack trace from the test (you might have to scroll up on the pytest cmd window).
Also run the end of milestone test procedure as that should be unchanged.
Changelog
BHoMObjectimplementation from python_toolkit to simplify c#/python interop for all bhom/wrapped methods and adapter execute commands.Additional comments
I suspect there will be versioning complaints from CI (I had to change the Name property in duplicate ladybug oM classes to be Identifier i.e. the
EnergyMaterialclass), and this will probably break dataset unit tests if this toolkit has them set up for those classes.