Embed dependencies in setup.py - #2017
Merged
Merged
Conversation
Dependencies are now set in setup.py and installed using `pip install '.[docs]'`
mrmundt
requested changes
Jun 17, 2021
| fi | ||
| # Note: pandas 1.0.3 causes gams 29.1.0 import to fail in python 3.8 | ||
| PYTHON_PACKAGES="${PYTHON_REQUIRED_PKGS}" | ||
| EXTRAS=tests |
Contributor
There was a problem hiding this comment.
Alternative way to do this: in the env section, set EXTRAS=test,docs,optional and then for slim, change that. I have no strong opinions, but it's fewer lines.
mrmundt
self-requested a review
June 17, 2021 22:53
mrmundt
approved these changes
Jun 17, 2021
Codecov Report
@@ Coverage Diff @@
## main #2017 +/- ##
==========================================
- Coverage 82.70% 82.69% -0.01%
==========================================
Files 592 592
Lines 73352 73352
==========================================
- Hits 60663 60661 -2
- Misses 12689 12691 +2
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes # N/A
Summary/Motivation:
Pyomo currently has dependencies scattered across the GHA / Jenkins builders,
.readthedocs-requirements.txt, andsetup.py. This PR moves all dependency specification intosetup.py, and updates the GHA and RTD builders to pull dependencies fromsetup.py. As part of the rework,setup.pynow specifies three "extras" targets for managing optional dependencies:testsfor dependencies needed to run the Pyomo unit tests (currently,nose,coverage,parameterized, andpybind11)docsfor dependencies needed to build the RTD documentationoptionalfor packages (available on PyPI) on which Pyomo has an optional dependency.With this, a reasonable approximation of the old
pyomo-extraspackage is:The challenge with this PR is that
condadoes not play well withpiprequirements. The complexity here is to provide a bridge whereby our conda builds can interrogate setup.py to get the list of packages that pip would have otherwise installed (and then conda can install from conda-forge).Changes proposed in this PR:
extras_requirestosetup.pypython setup.py dependenciesto get lists of required and optional dependency packagessetup.py.readthedocs.yamlconfiguration and get documentation requirements frompyomo[docs]Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: