ImperialCollegeLondon / virtual_ecosystem

This repository is the home for the codebase for the Virtual Ecosystem project.
https://virtual-ecosystem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Create a single instance of CoreConst #366

Closed davidorme closed 8 months ago

davidorme commented 9 months ago

Is your feature request related to a problem? Please describe.

Off the back of the decisions in #364, we are for the moment sticking with models taking CoreConst and ModelConst objects. We can see how that plays out and have a path in #364 for an alternative approach to a single object.

Given that, we should extend the BaseModel definition so that it includes that CoreConst argument and then create a single instance vr_run to be passed off when models are initiatialised.

Describe alternatives you've considered

Some models may not use the CoreConst - although I'd expect that to get rare as we develop the contents of that class. We could simply stick with the current approach of having models create their own CoreConst instance from Config if they need it.

davidorme commented 8 months ago

Closed by #374 and #375