Opened 4 years ago

Closed 4 years ago

#25336 closed defect (fixed)

Feature check for bliss is broken

Reported by: jdemeyer Owned by:
Priority: blocker Milestone: sage-8.3
Component: misc Keywords:
Cc: Merged in:
Authors: Vincent Delecroix Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: 77d2470 (Commits, GitHub, GitLab) Commit: 77d24707ffb90d2a33df2d24cee8ffd4391101fe
Dependencies: Stopgaps:

Status badges

Description

See #25332

Change History (6)

comment:1 follow-up: Changed 4 years ago by fbissey

This is strange, I am getting different problems in doctests and sage itself

fbissey@moonloop ~/sandbox/git-fork/sage-8.3.b0 $ ./sage -t --optional=bliss src/sage/features/bliss.py 
Running doctests with ID 2018-05-11-11-27-05-bcb5cc37.
Git branch: develop
Using --optional=bliss
Doctesting 1 file.
sage -t --warn-long 81.0 src/sage/features/bliss.py
**********************************************************************
File "src/sage/features/bliss.py", line 31, in sage.features.bliss.BlissLibrary
Failed example:
    BlissLibrary().require()  # optional: bliss
Exception raised:
    Traceback (most recent call last):
      File "/home/fbissey/sandbox/git-fork/sage-8.3.b0/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 562, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/fbissey/sandbox/git-fork/sage-8.3.b0/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 972, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.features.bliss.BlissLibrary[0]>", line 1, in <module>
        BlissLibrary().require()  # optional: bliss
    NameError: name 'BlissLibrary' is not defined
**********************************************************************
File "src/sage/features/bliss.py", line 53, in sage.features.bliss.Bliss
Failed example:
    Bliss().require()  # optional: bliss
Exception raised:
    Traceback (most recent call last):
      File "/home/fbissey/sandbox/git-fork/sage-8.3.b0/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 562, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/fbissey/sandbox/git-fork/sage-8.3.b0/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 972, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.features.bliss.Bliss[0]>", line 1, in <module>
        Bliss().require()  # optional: bliss
    NameError: name 'Bliss' is not defined
**********************************************************************
2 items had failures:
   1 of   2 in sage.features.bliss.Bliss
   1 of   2 in sage.features.bliss.BlissLibrary
    [2 tests, 2 failures, 0.29 s]
----------------------------------------------------------------------
sage -t --warn-long 81.0 src/sage/features/bliss.py  # 2 doctests failed
----------------------------------------------------------------------
Total time for all tests: 0.3 seconds
    cpu time: 0.3 seconds
    cumulative wall time: 0.3 seconds

But running those failing tests from sage

sage: from sage.features.bliss import BlissLibrary
sage: BlissLibrary().require()
---------------------------------------------------------------------------
FeatureNotPresentError                    Traceback (most recent call last)
<ipython-input-3-0ff2f4e6e422> in <module>()
----> 1 BlissLibrary().require()

/home/fbissey/sandbox/git-fork/sage-8.3.b0/local/lib/python2.7/site-packages/sage/features/__init__.pyc in require(self)
    156         presence = self.is_present()
    157         if not presence:
--> 158             raise FeatureNotPresentError(self, presence.reason, presence.resolution)
    159 
    160     def __repr__(self):

FeatureNotPresentError: Bliss is not available.
Failed to run test code.
To install Bliss you can try to run 'sage -i bliss'.
Further installation instructions might be available at http://www.tcs.hut.fi/Software/bliss/.
sage: from sage.features.bliss import Bliss
sage: Bliss().require()
sage: BlissLibrary()
Feature('Bliss')

I get one failure that is different. Cannot run the cython code. And the other test is actually successful.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 4 years ago by vdelecroix

Replying to fbissey:

This is strange, I am getting different problems in doctests and sage itself

fbissey@moonloop ~/sandbox/git-fork/sage-8.3.b0 $ ./sage -t --optional=bliss src/sage/features/bliss.py 
<SNIP>

This should be tested with sage -t --optional=sage,bliss.

comment:3 Changed 4 years ago by vdelecroix

  • Authors set to Vincent Delecroix
  • Branch set to u/vdelecroix/25336
  • Commit set to 77d24707ffb90d2a33df2d24cee8ffd4391101fe
  • Status changed from new to needs_review

New commits:

77d247025336: fix bliss feature

comment:4 in reply to: ↑ 2 Changed 4 years ago by fbissey

Replying to vdelecroix:

Replying to fbissey:

This is strange, I am getting different problems in doctests and sage itself

fbissey@moonloop ~/sandbox/git-fork/sage-8.3.b0 $ ./sage -t --optional=bliss src/sage/features/bliss.py 
<SNIP>

This should be tested with sage -t --optional=sage,bliss.

I see. A rather stupid requirement, but it can't be helped and it explains why things seem to turn to custard when I try to test optional packages.

I'll be ready to review this stuff in the morning in my time zone.

comment:5 Changed 4 years ago by fbissey

  • Reviewers set to François Bissey
  • Status changed from needs_review to positive_review

Fixes all the problems for me.

comment:6 Changed 4 years ago by vbraun

  • Branch changed from u/vdelecroix/25336 to 77d24707ffb90d2a33df2d24cee8ffd4391101fe
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.