Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#11745 closed enhancement (fixed)

Some more doctests from the book "Calcul mathématique avec Sage"

Reported by: gconnan Owned by: gconnan
Priority: major Milestone: sage-5.10
Component: doctest coverage Keywords:
Cc: Merged in: sage-5.10.beta0
Authors: Guillaume Connan Reviewers: Paul Zimmermann
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by zimmerma)

The attached patch adds to the Sage testsuite most examples appearing Chapter 9 (EDO, EDP, Recurrence) of the French book Calcul mathématique avec Sage.

Apply trac_11745.patch only.

Attachments (5)

recequadiff.2.py (11.6 KB) - added by gconnan 10 years ago.
recequadiff.py (11.6 KB) - added by gconnan 10 years ago.
recequadiff_doctest.sage (11.8 KB) - added by zimmerma 9 years ago.
recequadiff_doctest.2.sage (11.2 KB) - added by gconnan 9 years ago.
Doctest for solving differential equations and recurrences
trac_11745.patch (12.0 KB) - added by gconnan 9 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 10 years ago by gconnan

  • Owner changed from mvngu to gconnan

Changed 10 years ago by gconnan

Changed 10 years ago by gconnan

comment:2 in reply to: ↑ description Changed 10 years ago by gconnan

  • Description modified (diff)

Replying to gconnan:

The attached patch adds to the Sage testsuite most examples appearing Chapter 9 (EDO, EDP, Recurrence) of the French book Calcul mathématique avec Sage.

All tests pass with sage 4.7.1.

comment:3 Changed 9 years ago by zimmerma

Guillaume, which file is to be applied?

Paul

Changed 9 years ago by zimmerma

comment:4 follow-up: Changed 9 years ago by zimmerma

  • Status changed from new to needs_review

use only the attached file recequadiff_doctest.sage This file has to be put into tests/french_book, probably after changing the name to recequadiff.py. All tests pass with 5.7. I put it as "needs review" so that people can comment.

Paul

PS: I do this for Guillaume who cannot login any more on trac.

comment:5 Changed 9 years ago by zimmerma

  • Type changed from PLEASE CHANGE to enhancement

comment:6 Changed 9 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Additions to Sage should be patches to the Sage library (in devel/sage). See http://sagemath.org/doc/developer/

Changed 9 years ago by gconnan

Doctest for solving differential equations and recurrences

Changed 9 years ago by gconnan

comment:7 Changed 9 years ago by zimmerma

  • Authors set to Guillaume Connan
  • Description modified (diff)

comment:8 Changed 9 years ago by gconnan

  • Status changed from needs_work to needs_review

comment:9 Changed 9 years ago by zimmerma

  • Reviewers set to Paul Zimmermann
  • Status changed from needs_review to positive_review

I give a positive review. In fact it is enough to test the single (attached) file, since it does not change any functionality in Sage, it does only add some more doctests.

Nevertheless I did run all doctests (with Sage 5.7) and they all pass.

Paul

PS: note I am a co-author of the french book. I hope it does not make a problem if I review this ticket. We should soon publish the book on paper, and thus we would like to ensure our examples will still run in future versions of Sage.

comment:10 Changed 9 years ago by jdemeyer

Paul: as I already said to you by e-mail, be sure to run the test with --warn-long and mark any tests taking a long time as # long time.

comment:11 Changed 9 years ago by zimmerma

Jeroen, the --warn-long option does not seem to work with 5.7 nor 5.8:

tarte% ../../../../../sage -t --warn-long recequadiff.py
sage -t --warn-long "devel/sage-11745/sage/tests/french_book/recequadiff.py"


Usage: sage-doctest [same options as sage -t] filenames
         [0.1 s]
 
----------------------------------------------------------------------
The following tests failed:


        sage -t --warn-long "devel/sage-11745/sage/tests/french_book/recequadiff.py"
Total time for all tests: 0.2 seconds

Paul

comment:12 Changed 9 years ago by jdemeyer

True, it was introduced in sage-5.9.beta0.

comment:13 Changed 9 years ago by zimmerma

Anyway on my machine (which is an Intel Core 2) numbertheory.py takes about 15 seconds, polynomes.py about 5 seconds, and recequadiff.py about 13 seconds (without -long). Is that reasonable?

Paul

comment:14 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.9 to sage-5.10

comment:15 in reply to: ↑ 4 Changed 9 years ago by jdemeyer

Replying to zimmerma:

This file has to be put into tests/french_book, probably after changing the name to recequadiff.py.

Let me just mention that there is no requirement from me to rename that file. It would have been fine to keep the name recequadiff_doctest.sage (maybe that's easier for you?)

comment:16 Changed 9 years ago by zimmerma

since the first files in tests/french_book are named xxx.py, for coherence it is better to use similar names.

Paul

comment:17 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.10.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:18 Changed 8 years ago by zimmerma

we have a new patch without the executable bit, and with ... replaced by ....:, should be attach it here or in a new ticket?

Paul

Note: See TracTickets for help on using tickets.