(outdated) Convert setup.py to pyproject.toml#1663
(outdated) Convert setup.py to pyproject.toml#1663sufikaur wants to merge 35 commits intoIDAES:mainfrom
Conversation
…ressing package doesnt exist error
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1663 +/- ##
==========================================
- Coverage 77.08% 77.06% -0.02%
==========================================
Files 395 395
Lines 62759 62759
Branches 10234 10234
==========================================
- Hits 48377 48366 -11
- Misses 11974 11982 +8
- Partials 2408 2411 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Tagging @mrmundt to take a look at this since she recently did the same conversion for Pyomo |
mrmundt
left a comment
There was a problem hiding this comment.
Some initial thoughts here:
- I would recommend doing something similar to what we have in Pyomo. We made different categories for different types of dependencies, and you all could do the same with the dev dependencies. That way you don't need to have
requirements-dev.txtanymore. (It looks like you started doing this with the optional-dependencies category, so go all the way!!) - If you do that ^^, then the docs will need to be updated: https://github.com/IDAES/idaes-pse/blob/main/docs/tutorials/advanced_install/index.rst
- This is not your doing, but where is the Python version actually defined besides in the classifiers? Are they actually just polite suggestions?
pyproject.toml
Outdated
| "pyomo >= 6.9.3", | ||
| "pint >= 0.24.1", # required to use Pyomo units. Pint 0.24.1 needed for Python 3.9 support | ||
| "networkx", # required to use Pyomo network | ||
| "numpy>=1,<3", # pandas constraint added on 2023-08-30 b/c bug in v2.1 # see IDAES/idaes-pse#1253 |
There was a problem hiding this comment.
This comment I suspect is on the wrong line
There was a problem hiding this comment.
I took this directly from the setup.py file. I think it may be okay?
A1/A2: As per the last dev call, I'll split this into two/ keep it in mind to discuss further.
A3. I don't know if it is defined anywhere! @lbianchi-lbl
There was a problem hiding this comment.
This comment I suspect is on the wrong line
@mrmundt do you mean the comment on L43, i.e. where the numpy dependency is defined? If so, I think you might be right, as the comment refers to pandas. So that comment should be moved to the line where the pandas dependency is defined.
As for the Python version, AFAIK the classifiers are not enforced. From a cursory search (https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires), requires-python seems to be the way to define this in pyproject.toml
There was a problem hiding this comment.
Thanks, Ludovico.
Is there a reason it was not enforced? Happy to add a line being stricter about enforcing python versions.
There was a problem hiding this comment.
Fixed the comment line
| # https://setuptools-scm.readthedocs.io/en/v8.1.0/extending/ | ||
| local_scheme = "node-and-date" | ||
| version_scheme = "only-version" | ||
|
|
There was a problem hiding this comment.
ideas/ver.py is still being used because it is being tested.
As part of this PR, that file should be removed and remove the test associated with it.
Must ensure, that in the top level __init__.py make sure that the attribute version is set correctly using importlib.metadata.version("idaes-pse").
* Bumping the Pyomo tag to check for issues * Bump required versions of pylint, astroid, and black * Reverting update of black version * Changing pylint and astroid versions again * Update expected pylint and astroid versions * Fixing pylint warnings * Revert change to required Pyomo version in setup.py * Tell black to report the changes it wants * Run black
* rescue files from branch * clean up code * cross flow heat exchanger tests and formatting * Add tests for solid oxide cell and TPB * solve test with heat loss terms * run Black * pylint * fix model check and add additonal tests * get rid of warning when using LL collocation * Jinliang's changes * pylint
Fixes
Issue 1655
Summary/Motivation:
Changes proposed in this PR:
setup.pytopyproject.tomlconf.pyLegal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: