Skip to content

howto update pyomo

Ludovico Bianchi edited this page Mar 28, 2023 · 3 revisions

How to update the version of Pyomo required by IDAES

For development (as opposed to for a release)

Step 1: create a tag in the IDAES/pyomo fork

The naming scheme (not enforced) for the tag is X.Y.Z.idaes.YYYY.MM.DD, where X, Y, Z are the major, minor, and patch versions of Pyomo.

Step 2: update the pyomo requirement in setup.py

Open setup.py and locate the install_requires keyword argument in the call to the setup() function. Locate the line starting with pyomo and change it so that it looks like:

# contents of setup.py
setup(
    ...
    install_requires=[
        ...
        "pyomo @ https://github.com/IDAES/pyomo/archive/X.Y.Z.idaes.YYYY.MM.DD.zip",
        ...
    ],
...
)

IMPORTANT Remember to run black . before committing to ensure that setup.py is formatted correctly.

IMPORTANT Using a URL in a requirement specification is supported just fine by pip, but explicitly not allowed by PyPI. All URLs in dependencies specified in setup.py MUST be removed before cutting a release, otherwise the twine upload ... step will fail.

Clone this wiki locally