Skip to content

Implemented BHoMObject python class to simplify c#/python interop - #354

Open
Tom-Kingstone wants to merge 13 commits into
developfrom
Python_Toolkit-#220-BHoMObject
Open

Implemented BHoMObject python class to simplify c#/python interop#354
Tom-Kingstone wants to merge 13 commits into
developfrom
Python_Toolkit-#220-BHoMObject

Conversation

@Tom-Kingstone

Copy link
Copy Markdown
Contributor

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

  • Use new BHoMObject implementation 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 EnergyMaterial class), and this will probably break dataset unit tests if this toolkit has them set up for those classes.

@Tom-Kingstone Tom-Kingstone self-assigned this Aug 24, 2026
@Tom-Kingstone Tom-Kingstone added size:L Measured in days type:feature New capability or enhancement labels Aug 24, 2026
@Tom-Kingstone

Copy link
Copy Markdown
Contributor Author

@BHoMBot check versioning

@bhombot-ci

bhombot-ci Bot commented Aug 24, 2026

Copy link
Copy Markdown

@Tom-Kingstone to confirm, the following actions are now queued:

  • check versioning

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L Measured in days type:feature New capability or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant