Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update symengine, symengine_py to 0.8.1; drop dependency on nose #32603

Closed
mkoeppe opened this issue Sep 30, 2021 · 32 comments
Closed

Update symengine, symengine_py to 0.8.1; drop dependency on nose #32603

mkoeppe opened this issue Sep 30, 2021 · 32 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 30, 2021

Update symengine, symengine_py to 0.8.1; drop dependency on nose

Upstream report for Sage objects: symengine/symengine.py#373

Upstream: Fixed upstream, but not in a stable release.

CC: @isuruf @sagetrac-tmonteil

Component: packages: optional

Author: Matthias Koeppe, Isuru Fernando

Branch/Commit: 6dd3e5b

Reviewer: Thierry Monteil, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/32603

@mkoeppe mkoeppe added this to the sage-9.5 milestone Sep 30, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 1, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 1, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 1, 2021

Commit: f929448

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 1, 2021

comment:2

The pytest does not go through for me, but it's possible that my installation is messed up

[symengine_py-0.8.1] Running the test suite for symengine_py-0.8.1...
[symengine_py-0.8.1] ============================= test session starts ==============================
[symengine_py-0.8.1] platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/bin/python3
[symengine_py-0.8.1] cachedir: .pytest_cache
[symengine_py-0.8.1] rootdir: /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/var/tmp/sage/build/symengine_py-0.8.1/src
[symengine_py-0.8.1] collecting ... collected 0 items / 23 errors
[symengine_py-0.8.1] 
[symengine_py-0.8.1] ==================================== ERRORS ====================================
[symengine_py-0.8.1] ________________ ERROR collecting symengine/tests/test_arit.py _________________
[symengine_py-0.8.1] ImportError while importing test module '/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/var/tmp/sage/build/symengine_py-0.8.1/src/symengine/tests/test_arit.py'.
[symengine_py-0.8.1] Hint: make sure your test modules/packages have valid Python names.
[symengine_py-0.8.1] Traceback:
[symengine_py-0.8.1] /usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:127: in import_module
[symengine_py-0.8.1]     return _bootstrap._gcd_import(name[level:], package, level)
[symengine_py-0.8.1] symengine/__init__.py:12: in <module>
[symengine_py-0.8.1]     import symengine.lib.symengine_wrapper as wrapper
[symengine_py-0.8.1] E   ModuleNotFoundError: No module named 'symengine.lib.symengine_wrapper'
[symengine_py-0.8.1] _________________ ERROR collecting symengine/tests/test_cse.py _________________

New commits:

b3fcbd8build/pkgs/symengine[_py]: Update to 0.8.1
c4faa5fbuild/pkgs/symengine/patches/1749.patch: Remove
f929448build/pkgs/symengine_py: Switch from nose to pytest

@mkoeppe mkoeppe changed the title Update symengine, symengine_py; drop dependency on nose Update symengine, symengine_py to 0.8.1; drop dependency on nose Oct 1, 2021
@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 1, 2021

comment:4

I can reproduce the error.

@isuruf
Copy link
Member

isuruf commented Oct 1, 2021

New commits:

fc0e37cfix symengine_py tests

@isuruf
Copy link
Member

isuruf commented Oct 1, 2021

@isuruf
Copy link
Member

isuruf commented Oct 1, 2021

Changed author from Matthias Koeppe to Matthias Koeppe, Isuru Fernando

@isuruf
Copy link
Member

isuruf commented Oct 1, 2021

Changed commit from f929448 to fc0e37c

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 1, 2021

Reviewer: Thierry Monteil

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 1, 2021

comment:6

It does not work for me, see the attached log.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 1, 2021

Attachment: symengine_py-0.8.1.log

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Changed commit from fc0e37c to 1b2bdbb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

1b2bdbbFix getting string representation of sage objects

@sagetrac-tmonteil

This comment has been minimized.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 2, 2021

comment:9

Still some problem, see the attached log.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 2, 2021

Upstream: Reported upstream. No feedback yet.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 2, 2021

comment:10

Attachment: symengine_py-0.8.1.2.log

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Changed commit from 1b2bdbb to 6dd3e5b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

6dd3e5bupdate version for a rebuild

@isuruf
Copy link
Member

isuruf commented Oct 2, 2021

comment:12

I think the issue was that symengine_py was not rebuilt. I've bumped the version to trigger a rebuild

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Oct 2, 2021

comment:14

The issue persists. The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

So, changing package version may not fix the issue. In spkg-check.in, we should ask the testing framework to test files in $SAGE_ROOT/local/var/tmp/sage/build/symengine_py-0.8.1/src/symengine/tests not in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/

By the way, looking at symengine.py-0.8.1/bin/test_travis.sh (in the tarball), it seems that tests from pytest and tests from test_python.py are not the same (both are run one after the other), so we should perhaps test both.

@isuruf
Copy link
Member

isuruf commented Oct 2, 2021

comment:15

By the way, looking at symengine.py-0.8.1/bin/test_travis.sh (in the tarball), it seems that tests from pytest and tests from test_python.py are not the same (both are run one after the other), so we should perhaps test both.

Not really. They check that the tests run fine on inplace builds and on installed symengine.
Since sage is not doing inplace builds, it doesn't matter.

Thanks for the info. I'll try to fix this.

@isuruf
Copy link
Member

isuruf commented Oct 2, 2021

comment:16

The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

At this point where is symengine_py installed to?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 2, 2021

comment:17

Replying to @sagetrac-tmonteil:

The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

That's not true. Take a look at build/bin/sage-spkg: spkg-check is run after the staged installation has been copied to the final installation directory.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 2, 2021

comment:18

(Also note that since #32361, Python packages are not actually staged using SAGE_DESTDIR any more. We just build and then install a wheel. This happens before running spkg-check.)

@isuruf
Copy link
Member

isuruf commented Oct 3, 2021

comment:19

I'm confused as to how the issue mentioned by @sagetrac-tmonteil happens then.

@isuruf
Copy link
Member

isuruf commented Oct 3, 2021

Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 3, 2021

comment:21

In #32595 I am currently running portability testing on GH Actions, including this ticket. We'll see if these tests can reproduce the issue.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 4, 2021

comment:22

This has run successfully on https://github.com/mkoeppe/sage/actions/runs/1298853742; so I am setting this to positive review

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 4, 2021

Changed reviewer from Thierry Monteil to Thierry Monteil, Matthias Koeppe

@vbraun
Copy link
Member

vbraun commented Oct 13, 2021

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants