Skip to content

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

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

Implemented BHoMObject python class to simplify c#/python interop#354
Tom-Kingstone wants to merge 15 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

Tom-Kingstone commented Aug 24, 2026

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
@jamesramsden-bh

Copy link
Copy Markdown
Contributor

I reviewed by running the unit tests, and spot check in GH too. All good. Versioning check is still outstanding.

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

  • check versioning

There are 89 requests in the queue ahead of you.

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

  • check versioning

There are 196 requests in the queue ahead of you.

@Tom-Kingstone

Copy link
Copy Markdown
Contributor Author

@BHoMBot check required

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

The check versioning has already been run previously and recorded as a successful check. This check has not been run again at this time.

@jamesramsden-bh

jamesramsden-bh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@BHoMBot check unit-tests
@BHoMBot check compliance

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

@jamesramsden-bh to confirm, the following actions are now queued:

  • check unit-tests

There are 100 requests in the queue ahead of you.

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

@jamesramsden-bh to confirm, the following actions are now queued:

  • check unit-tests
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

There are 102 requests in the queue ahead of you.

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci

bhombot-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@jamesramsden-bh jamesramsden-bh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as per previous comment, versioning fix, and retest of run_tests.bat

@jamesramsden-bh

Copy link
Copy Markdown
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci

bhombot-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

@jamesramsden-bh to confirm, the following actions are now queued:

  • check ready-to-merge

There are 156 requests in the queue ahead of you.

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.

2 participants