Skip to content
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

Establish conventions for the Pyomo API #3162

Open
whart222 opened this issue Feb 25, 2024 · 1 comment
Open

Establish conventions for the Pyomo API #3162

whart222 opened this issue Feb 25, 2024 · 1 comment

Comments

@whart222
Copy link
Member

Summary

A formal description of the Pyomo API would help manage technical debt for maintenance of Pyomo.

Rationale

I've been thinking a bit about the Pyomo API as I consider strategies to replace kernels with C/C++ extensions. However, I've noted that Pyomo developers pull logic from deep in Pyomo's directory structure. For example, the identify_variables() function isn't included in pyomo.core, but needs to be pulled from pyomo.core.expr.visitor.

A clearer declaration of the Pyomo API would help manage technical debt in Pyomo. This seems timely given the maturation of pyomo.contrib capabilities, which will be treated as stable functionality in future releases.

Description

SciPy has a nice articulation of their API and associated conventions. I recommend that we consider something similar for Pyomo:

https://docs.scipy.org/doc/scipy/reference/

@blnicho
Copy link
Member

blnicho commented Feb 28, 2024

@whart222 we should edit this to add a clear set of classes/methods/functions that we're going to consider the "Pyomo API" and add documentation and API tests for. It doesn't have to be perfect or complete in this issue but I think we need a starting point for what we consider the main API and how we will know when this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment