-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing a "plug-in model" architecture #373
Comments
Sounds great, but I don't know what this means in practice. Can you be more specific about what this would look like? Would it be code or documentation? As of now, contributors write a function that implements their model and conforms to the variable and style rules. Hopefully they (and the reviewers) try to make the API similar to existing functions with similar purposes. Then we have a handful of functions and methods that provide unified interfaces to different kinds of models (e.g. get_solarposition, total_irrad, get_clearsky). Finally, ModelChain provides a unified interface to multiple modeling steps. I am reluctant to ask contributors, particularly new contributors, to go through those library-wide integration steps, though. Note that |
This blog post on entrypoints made me think of your plug in idea. Not sure what this would look like in practice either. https://blog.danallan.com/posts/2019-07-24-use-entrypoints-more/ |
Python 3.7's dynamic module attributes offers a fairly lightweight plugin discovery mechanism: https://realpython.com/python37-new-features/#customization-of-module-attributes I'm trying to absorb the above entrypoints approach to make an informed comparison. |
Issues #227 and #306, in addition to the existing Sandia and DeSoto device performance models, suggest that pvlib could benefit from a "plug-in model architecture" that would establish common API requirements that anyone need follow to plug in their performance models into the greater modeling chain.
I might be able to design something around the device performance models, but I wouldn't be able to do this quickly/easily for the inverter models, etc. I worry that this will be like herding cats, however!
The text was updated successfully, but these errors were encountered: