Closed orbeckst closed 5 months ago
If you have any questions on how to do any of this, ask @ianmkenney , he has lots of experience!
I made a new release, but I cannot update the binaries on PyPi as there is an issue with my account. It looks like that may take a week or more to resolve, but when I get access I can update PyPi.
Ok... add me (=Oliver.Beckstein
on pypi) as a co-maintainer next time so that at least one person has keys.
Started working on this again, and I ran into an issue when running the tests locally.
Here is the procedure I was following:
Here is the test output:
It appears the tests fail due to an issue with one of SymPy
's dependencies (i.e. mpmath
) where it is installing a pre-release that is broken (see this issue). From the comments it looks like I could try to downgrade mpmath
and re-run the tests, but I think that's bad practice.
There is also the issue regarding 194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
/PEP 517
, I'll have to look into that separately.
Any advice on how to proceed?
You can exclude certain versions in your dependencies or just state compatibility with <= known good version. That’s much better than breaking and safer because at least you know it works. Am 3/7/24 um 22:18 schrieb Nik Awtrey @.***>: Started working on this again, and I ran into an issue when running the tests locally. Here is the procedure I was following:
KDA PyPi Test/Upload Procedure
Link: https://github.com/Becksteinlab/GromacsWrapper/wiki/Preparing-a-release
conda create --name kda_fresh python=3.11 conda activate kda_fresh
python -m pip install -U pip twine
git clone @.***:Becksteinlab/kda.git
cd kda python setup.py install python setup.py test
Here is the test output:
Test output $ python setup.py test C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!! dist.fetch_build_eggs(dist.setup_requires) C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\dist.py:314: InformationOnly: Normalizing 'v0.2.0+4.g533d243' to '0.2.0+4.g533d243' self.metadata.version = self._normalize_version( running pytest C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:193: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!! ir_d = dist.fetch_build_eggs(dist.install_requires) C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!! tr_d = dist.fetch_build_eggs(dist.tests_require or []) C:\Users\nikol\Anaconda3\envs\kda_fresh\Lib\site-packages\setuptools\command\test.py:195: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!! er_d = dist.fetch_build_eggs( running egg_info writing kda.egg-info\PKG-INFO writing dependency_links to kda.egg-info\dependency_links.txt writing requirements to kda.egg-info\requires.txt writing top-level names to kda.egg-info\top_level.txt reading manifest file 'kda.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching 'pycache' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution adding license file 'LICENSE' writing manifest file 'kda.egg-info\SOURCES.txt' running build_ext ============================= test session starts ============================= platform win32 -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0 rootdir: C:\Users\nikol\OneDrive\projects\kinetic_diagram_analysis\packages\kda plugins: cov-4.1.0, xdist-3.5.0, hypothesis-6.98.17 collected 21 items / 1 error
=================================== ERRORS ====================================
_ ERROR collecting kda/tests/test_kda.py __
kda\tests\test_kda.py:13: in
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR kda/tests/test_kda.py - AttributeError: module 'mpmath' has no attribut... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ========================= 1 warning, 1 error in 4.29s =========================
It appears the tests fail due to an issue with one of SymPy's dependencies (i.e. mpmath) where it is installing a pre-release that is broken (see this issue). From the comments it looks like I could try to downgrade mpmath and re-run the tests, but I think that's bad practice. There is also the issue regarding 194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated./PEP 517, I'll have to look into that separately. Any advice on how to proceed?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Uninstalling sympy
and mpmath
and reinstalling with pip install -U sympy mpmath==1.3
(latest non-pre-release version) allowed the tests to run to completion:
============================= test session starts =============================
platform win32 -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
rootdir: C:\Users\nikol\OneDrive\projects\kinetic_diagram_analysis\packages\kda
plugins: cov-4.1.0, xdist-3.5.0, hypothesis-6.98.17
collected 64 items
kda\tests\test_kda.py ........................................... [ 67%]
kda\tests\test_plotting.py ..................... [100%]
======================== 64 passed in 79.35s (0:01:19) ========================
I can pin mpmath
to v1.3.0
as a temporary solution until the pre-release/sympy
issue is sorted out. It looks like the sympy
folks are doing the same thing upstream (see issue).
I'll open an issue regarding the pinning of mpmath
, and another for unpinning when sympy
v1.13
is released. While I'm at it, I'll open another issue regarding the PEP 517
issue.
Small update -- using python setup.py install
seems to be causing most of these issues. If I use the recommended commands via pip
(see link) I don't run into any issues with mpmath
, and the tests run just fine using pytest
:
$ python -m pytest
============================= test session starts =============================
platform win32 -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0
rootdir: C:\Users\nikol\OneDrive\projects\kinetic_diagram_analysis\packages\kda
plugins: hypothesis-6.99.0
collected 64 items
kda\tests\test_kda.py ........................................... [ 67%]
kda\tests\test_plotting.py ..................... [100%]
======================= 64 passed in 104.10s (0:01:44) ========================
I believe this was also the cause of the PEP 517
complaints I was getting. I think as long as the modern commands are working I can just ignore the mpmath
issue and move forward with PyPi
things.
Yes, setup.py install is deprecated anyway. You might be able to just have a pyproject.toml file.Am 3/9/24 um 19:00 schrieb Nik Awtrey @.***>: Small update -- using python setup.py install seems to be causing most of these issues. If I use the recommended commands via pip (see link) I don't run into any issues with mpmath, and the tests run just fine using pytest: $ python -m pytest ============================= test session starts ============================= platform win32 -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0 rootdir: C:\Users\nikol\OneDrive\projects\kinetic_diagram_analysis\packages\kda plugins: hypothesis-6.99.0 collected 64 items
kda\tests\test_kda.py ........................................... [ 67%] kda\tests\test_plotting.py ..................... [100%]
======================= 64 passed in 104.10s (0:01:44) ========================
updated procedure
conda create -n kda_fresh python=3.11 conda activate kda_fresh
python -m pip install -U pip twine build pytest
git clone @.***:Becksteinlab/kda.git cd kda
hypothesis
is not installedpython -m pip install . python -m pip install -U hypothesis pytest
I believe this was also the cause of the PEP 517 complaints I was getting. I think as long as the modern commands are working I can just ignore the mpmath issue and move forward with PyPi things.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
The current version of KDA (v0.3.0
) is now available on PyPi here. Closing this issue.
Hooray 🍾 !
For the paper we should have