Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

LattE: is_package_installed -> feature #25400

Closed
videlec opened this issue May 19, 2018 · 22 comments
Closed

LattE: is_package_installed -> feature #25400

videlec opened this issue May 19, 2018 · 22 comments

Comments

@videlec
Copy link
Contributor

videlec commented May 19, 2018

The function _volume_latte calls is_package_installed which does not exist anymore. As a consequence

sage -t --long src/sage/geometry/polyhedron/base.py
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 4410, in sage.geometry.polyhedron.base.Polyhedron_base._volume_latte
Failed example:
    polytopes.hypercube(3)._volume_latte() #optional - latte_int
Exception raised:
    Traceback (most recent call last):
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 562, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 972, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base.Polyhedron_base._volume_latte[0]>", line 1, in <module>
        polytopes.hypercube(Integer(3))._volume_latte() #optional - latte_int
      File "/opt/sage/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 4436, in _volume_latte
        if is_package_installed('latte_int'):
    NameError: global name 'is_package_installed' is not defined
**********************************************************************

CC: @jplab @mkoeppe @mo271

Component: packages: optional

Author: Vincent Delecroix

Branch/Commit: e54f09e

Reviewer: Julian Rüth

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

@videlec videlec added this to the sage-8.3 milestone May 19, 2018
@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented May 19, 2018

New commits:

7f9f9a825400: feature for Latte
da88e9125400: fix is_package_installed vs feature for LattE

@videlec
Copy link
Contributor Author

videlec commented May 19, 2018

Commit: da88e91

@videlec
Copy link
Contributor Author

videlec commented May 19, 2018

Branch: u/vdelecroix/25400

@videlec
Copy link
Contributor Author

videlec commented May 19, 2018

Author: Vincent Delecroix

@videlec videlec changed the title global name 'is_package_installed' is not defined LattE: is_package_installed -> feature May 19, 2018
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2018

Changed commit from da88e91 to bac80c7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2018

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

75cbfb725400: feature for Latte
bac80c725400: fix is_package_installed vs feature for LattE

@videlec
Copy link
Contributor Author

videlec commented May 19, 2018

comment:6

The function _volume_latte from sage.geometry.polyhedron.base calls is_package_installed which is not imported anymore... (#20382). As a consequence

sage -t --long src/sage/geometry/polyhedron/base.py
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 4410, in sage.geometry.polyhedron.base.Polyhedron_base._volume_latte
Failed example:
    polytopes.hypercube(3)._volume_latte() #optional - latte_int
Exception raised:
    Traceback (most recent call last):
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 562, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 972, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base.Polyhedron_base._volume_latte[0]>", line 1, in <module>
        polytopes.hypercube(Integer(3))._volume_latte() #optional - latte_int
      File "/opt/sage/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py", line 4436, in _volume_latte
        if is_package_installed('latte_int'):
    NameError: global name 'is_package_installed' is not defined
**********************************************************************

Instead of reimporting it, we rather rely on the new feature framework introduced in #20382.

@saraedum
Copy link
Member

Reviewer: Julian Rüth

@saraedum
Copy link
Member

Work Issues: minimal documentation changes, make the patchbot happy

@saraedum
Copy link
Member

comment:7

Looks good. I think you want to drop an "s" and replace "Test whether count and integrate are functionals." with
"Test whether ``count`` and ``integrate`` are functional." Also, I think that our new files should have copyright headers at least that's what the developer guide suggests.

The patchbot run looks weird. Do you understand what's going on?

@videlec
Copy link
Contributor Author

videlec commented May 21, 2018

comment:8

This is a reasonable failure that has to be fixed

sage -t --long --warn-long 80.1 src/sage/interfaces/latte.py
**********************************************************************
File "src/sage/interfaces/latte.py", line 45, in sage.interfaces.latte.count
Failed example:
    from sage.interfaces.latte import count
Exception raised:
    Traceback (most recent call last):
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 562, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 972, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.latte.count[0]>", line 1, in <module>
        from sage.interfaces.latte import count
      File "/opt/sage/local/lib/python2.7/site-packages/sage/interfaces/latte.py", line 18, in <module>
        Latte().require()
      File "/opt/sage/local/lib/python2.7/site-packages/sage/features/__init__.py", line 158, in require
        raise FeatureNotPresentError(self, presence.reason, presence.resolution)
    FeatureNotPresentError: LattE is not available.
    Executable 'count' not found on PATH.
    To install count you can try to run 'sage -i latte_int'.
    Further installation instructions might be available at https://www.math.ucdavis.edu/~latte/software.php.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 28, 2018

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6ddf18a25400: feature for Latte

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 28, 2018

Changed commit from bac80c7 to 6ddf18a

@videlec
Copy link
Contributor Author

videlec commented May 28, 2018

comment:11

rebased on beta3... needs review

@videlec
Copy link
Contributor Author

videlec commented May 28, 2018

Changed work issues from minimal documentation changes, make the patchbot happy to none

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented May 29, 2018

comment:13

There's something about this ticket which seems to make patchbots crash. Whenever my patchbot (fermat) gets around to testing this ticket, it gets as far as applying the patch + building docs, and then it hangs -- the python subprocesses that are spawned to build the various ref manual chapters somehow get stuck + don't terminate.

Any idea what could be causing this? No other currently-open ticket causes this behaviour.

@videlec
Copy link
Contributor Author

videlec commented May 29, 2018

comment:14

I made a check at import time... if it fails it is possible that sphinx hang forever. I will test.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2018

Changed commit from 6ddf18a to e54f09e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2018

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

e54f09e25400: do not check on import

@saraedum
Copy link
Member

saraedum commented Jun 1, 2018

comment:17

feel free to set this to positive review if the patchbot issue is fixed now.

@vbraun
Copy link
Member

vbraun commented Jun 6, 2018

Changed branch from u/vdelecroix/25400 to e54f09e

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

No branches or pull requests

3 participants