[Sage] #14882: Inexplicably long-time doctest in sage/combinat/backtrack.py

0 views
Skip to first unread message

Sage

unread,
Jul 12, 2013, 9:40:36 AM7/12/13
to sage...@googlegroups.com
#14882: Inexplicably long-time doctest in sage/combinat/backtrack.py
-----------------------------+----------------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: new
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Keywords: combinat, backtrack
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-----------------------------+----------------------------------------------
It's in the docstring of ``PositiveIntegerSemigroup``:

{{{
EXAMPLES::

sage: from sage.combinat.backtrack import PositiveIntegerSemigroup
sage: PP = PositiveIntegerSemigroup()
sage: PP.category()
Join of Category of infinite enumerated sets and Category of
commutative additive semigroups and Category of monoids and Category of
facade sets
sage: PP.cardinality()
+Infinity
sage: PP.one()
1
sage: PP.an_element()
1
sage: some_elements = list(PP.some_elements()); some_elements
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100]

TESTS::

sage: from sage.combinat.backtrack import PositiveIntegerSemigroup
sage: PP = PositiveIntegerSemigroup()
sage: TestSuite(PP).run(elements=some_elements)
}}}

This TestSuite call takes 1.44 min on my machine, and this persists even
if I replace the ``some_elements`` list (with length 100) by a list of
length 2 or even an empty list. I don't see what there is that can be
tested so long about positive integers...

The attached patch doesn't solve the underlying problem, but just
#longtimes the computation so that it does not lame me down when I want to
doctest sage.combinat. I would love to help, but I don't know enough about
test suites.

The patch also fixes some spelling.

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, and MATLAB

Sage

unread,
Jul 12, 2013, 9:41:33 AM7/12/13
to sage...@googlegroups.com
#14882: Inexplicably long-time doctest in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_info
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Changes (by darij):

* status: new => needs_info


Old description:

New description:

--

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:1>

Sage

unread,
Jul 12, 2013, 10:16:04 AM7/12/13
to sage...@googlegroups.com
#14882: Inexplicably long-time doctest in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_info
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------

Comment (by darij):

I'm just seeing this is fixed by Travis in #14772. Thanks, Travis!

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:2>

Sage

unread,
Jul 12, 2013, 10:22:36 AM7/12/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Changes (by darij):

* status: needs_info => needs_review


Old description:

New description:

*UPDATE:* The doctest issue has been solved by Travis in #14772; my
(updated) patch now just fixes the typos.

---------------------------------------------------------------------------------------

--

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:3>

Sage

unread,
Jul 12, 2013, 10:25:07 AM7/12/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Description changed by darij:

Old description:

> *UPDATE:* The doctest issue has been solved by Travis in #14772; my
> (updated) patch now just fixes the typos.
>
> ---------------------------------------------------------------------------------------
>
New description:

**UPDATE:** The doctest issue has been solved by Travis in #14772; my
(updated) patch now just fixes the typos.

* Apply: [trac_14882-backtrack_longtime-dg-v2.patch]

---------------------------------------------------------------------------------------

**Old description:** It's in the docstring of

--

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:4>

Sage

unread,
Jul 12, 2013, 10:27:18 AM7/12/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: 14772 | Stopgaps:
---------------------------------------+------------------------------------
Changes (by darij):

* dependencies: => 14772


--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:5>

Sage

unread,
Jul 12, 2013, 11:58:09 AM7/12/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #14772 | Stopgaps:
---------------------------------------+------------------------------------
Changes (by darij):

* dependencies: 14772 => #14772


--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:6>

Sage

unread,
Jul 13, 2013, 6:58:27 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-duplicate/invalid/wontfix
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: | Merged in:
Dependencies: #14772 | Stopgaps:
---------------------------------------+------------------------------------
Changes (by tscrim):

* reviewer: => Travis Scrimshaw
* milestone: sage-5.12 => sage-duplicate/invalid/wontfix


Comment:

Duplicate since I noticed this and fixed it in #14772?

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:7>

Sage

unread,
Jul 13, 2013, 6:59:50 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: | Merged in:
Dependencies: #14772 | Stopgaps:
---------------------------------------+------------------------------------
Changes (by darij):

* milestone: sage-duplicate/invalid/wontfix => sage-5.12


Comment:

No, this is just the typos now ("breath-first", "pickable" for
"picklable"), not your change.

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:8>

Sage

unread,
Jul 13, 2013, 7:36:27 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Darij Grinberg | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Changes (by {'newvalue': u'Darij Grinberg', 'oldvalue': ''}):

* dependencies: #14772 =>
* author: => Darij Grinberg


Comment:

Okay, so there's no dependency (I checked this). However there should not
be periods '.' after the input's since they are not complete sentences.
Also since we're bring the doc more up to spec, how about converting them
to the conventions formatting of:
{{{
- ``arg`` -- a description of the arg
}}}

Thanks,[[BR]]
Travis

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:9>

Sage

unread,
Jul 13, 2013, 7:57:21 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Darij Grinberg | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Description changed by darij:

Old description:

> **UPDATE:** The doctest issue has been solved by Travis in #14772; my
> (updated) patch now just fixes the typos.
>
> * Apply: [trac_14882-backtrack_longtime-dg-v2.patch]
>
> ---------------------------------------------------------------------------------------
>
> **Old description:** It's in the docstring of
New description:

**UPDATE:** The doctest issue has been solved by Travis in #14772; my
(updated) patch now just fixes the typos.

* Apply: [attachment:trac_14882-spelling_in_backtrack-dg.patch]

---------------------------------------------------------------------------------------

**Old description:** It's in the docstring of

--

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:10>

Sage

unread,
Jul 13, 2013, 7:57:42 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Darij Grinberg | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------

Comment (by darij):

Fair point; fixed.

for the patchbot:

apply trac_14882-spelling_in_backtrack-dg.patch

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:11>

Sage

unread,
Jul 13, 2013, 8:02:06 AM7/13/13
to sage...@googlegroups.com
#14882: Typos [was: Inexplicably long-time doctest] in sage/combinat/backtrack.py
---------------------------------------+------------------------------------
Reporter: darij | Owner: sage-combinat
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-5.12
Component: combinatorics | Resolution:
Keywords: combinat, backtrack | Work issues:
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Darij Grinberg | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Changes (by tscrim):

* status: needs_review => positive_review


Comment:

Looks good to me now. Thanks Darij.

--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14882#comment:12>

Reply all
Reply to author
Forward
0 new messages