Opened 7 years ago

Closed 7 years ago

#16626 closed defect (fixed)

ellipsis for doctest line numbers

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.3
Component: doctest coverage Keywords:
Cc: ncohen, dimpase Merged in:
Authors: Volker Braun Reviewers: Martin Albrecht, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 5e81606 (Commits, GitHub, GitLab) Commit: 5e816069ca935085490ffbdf2a379cc6148b2197
Dependencies: #16504 Stopgaps:

Status badges

Description (last modified by vbraun)

Warnings (including deprecations) should be of the form

   sage: raise_warning()
   doctest:...: Warning: this is a warning

Note the ellipsis. Putting the actual source line number in there is not cool.

Change History (18)

comment:1 Changed 7 years ago by vbraun

  • Component changed from PLEASE CHANGE to doctest coverage
  • Description modified (diff)
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 7 years ago by vbraun

  • Dependencies set to #16504

Depends on #16504 to avoid conflicts.

comment:3 Changed 7 years ago by vbraun

  • Branch set to u/vbraun/ellipsis_for_doctest_line_numbers

comment:4 Changed 7 years ago by vbraun

  • Authors set to Volker Braun
  • Cc ncohen dimpase added
  • Commit set to 987faab4e638a39feb9ed8235194df2f3d66ab10
  • Status changed from new to needs_review

New commits:

b1f43aftrac #16504: A mandatory 'nonnegative' argument for MixedIntegerLinearProgram.new_variable() until the standard changes
e9ac71dtrac #16504: Tastes and colors ................
d437be4trac #16504: Broken doctest
ebc3316trac #16504: additional doctest for nonnegative=False
e6ff553Cosmetic changes
1903937trac #16504: Updates the tutorial
27a0bcetrac #16504: Merged with beta5
45bc937trac #16504: Broken doctest
987faabEllipsize the source line number in warnings

comment:5 Changed 7 years ago by kcrisman

The dumb question which needs to be asked is whether there is any mechanism here for making sure it doesn't come back. At a minimum, is this in the developer guide? Otherwise there will be more tickets 'fixing' this.

On a different note, what was # doctest: +ELLIPSIS for? Some truly ancient way to mark that the ellipsis should behave as it does now?

comment:6 Changed 7 years ago by vbraun

I'll add a check to the doctest framework.

In plain python you need to turn on ellipsis per doctest, but we made it default.

comment:7 Changed 7 years ago by git

  • Commit changed from 987faab4e638a39feb9ed8235194df2f3d66ab10 to 7361632afef2d83e045f3fedcf6456df6d0cfa99

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

7361632Check doctest output for source line numbers

comment:8 Changed 7 years ago by vbraun

Done, will now raise an error similar to how tabs raise an error.

comment:9 Changed 7 years ago by kcrisman

Should get an opinion from someone who understands the doctest framework better, but this answers all my questions and then some.

comment:10 Changed 7 years ago by malb

  • Reviewers set to Martin Albrecht

Looks okay to me (I ignored all MIP stuff when reading)

comment:11 Changed 7 years ago by dimpase

Volker, could you say what happens with mip.pyx here - it's quite a patch...

comment:12 Changed 7 years ago by dimpase

  • Reviewers changed from Martin Albrecht to Martin Albrecht, Dima Pasechnik

comment:13 Changed 7 years ago by malb

AFAIK it's in there because o the dependency: #16504

comment:14 Changed 7 years ago by dimpase

  • Status changed from needs_review to positive_review

OK, makes sense.

comment:15 Changed 7 years ago by git

  • Commit changed from 7361632afef2d83e045f3fedcf6456df6d0cfa99 to 30f094abc89eedc42e384d44fb9cbf0195c8e436
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. Last 10 new commits:

e7a97eatrac #16553: doc fix + deprecation is_block_design
3c0dd71trac #16553v3: change .points() -> .ground_set()
52b7177trac #16553: merge sage 6.3.beta5
0698433trac #16553: deprecated alias .points() + fix
fb636aatrac #16622: Hypergraph is now an incidence structure
9f70459trac #16622: Changing the terminology
cb60470trac #16622: Broken doc
cd7ba1atrac #16622: More doc fixes
20b3b4atrac #16622: HyperGraphGenerators --> HypergraphGenerators
30f094aMerge #16622

comment:16 Changed 7 years ago by vbraun

  • Status changed from needs_review to positive_review

I merged in #16622 to resolve a merge conflict

comment:17 Changed 7 years ago by git

  • Commit changed from 30f094abc89eedc42e384d44fb9cbf0195c8e436 to 5e816069ca935085490ffbdf2a379cc6148b2197
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

5e81606Fix more source line numbers from #16622

comment:18 Changed 7 years ago by vbraun

  • Branch changed from u/vbraun/ellipsis_for_doctest_line_numbers to 5e816069ca935085490ffbdf2a379cc6148b2197
  • Resolution set to fixed
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.