Opened 2 years ago

Closed 2 years ago

#30486 closed defect (fixed)

Prepare doctests for Arb 2.18

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.2
Component: doctest coverage Keywords:
Cc: Fredrik Johansson, Marc Mezzarobba, Vincent Delecroix, François Bissey, Antonio Rojas, Dima Pasechnik Merged in:
Authors: Dima Pasechnik Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: 464f08a (Commits, GitHub, GitLab) Commit: 464f08a2f3c0307b9618b8eab725cbf68109c39c
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

Although we have deferred the Arb upgrade to Sage 9.3, on various platforms (e.g. ubuntu-groovy-standard, https://github.com/sagemath/sage/runs/1058929422) we are already getting the doctest failures because system Arb is 2.18.

Hence we need to adjust the doctests (see #28623) already in Sage 9.2 - so that they work with both the older and the newer version.

Change History (19)

comment:1 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:2 Changed 2 years ago by Dima Pasechnik

In https://trac.sagemath.org/ticket/28623#comment:25 there are examples of tests that lead to an error on 2.16, while producing a meaningful answer on 2.18, so I don't really think this is easy to consolidate - without making doctests dependent on the arb version (are there facilities for this ?)

comment:3 Changed 2 years ago by Matthias Köppe

On this ticket, we would not add such tests.

comment:4 in reply to:  3 ; Changed 2 years ago by Dima Pasechnik

Replying to mkoeppe:

On this ticket, we would not add such tests.

what else is left - tagging them # random - tbf when arb 2.18 is here ?

comment:5 in reply to:  4 Changed 2 years ago by Matthias Köppe

Replying to dimpase:

tagging them # random - tbf when arb 2.18 is here ?

That's a good way to do this

comment:6 Changed 2 years ago by Dima Pasechnik

Authors: Dima Pasechnik

I'll do a proper fix, with version tags etc

comment:7 Changed 2 years ago by Dima Pasechnik

Branch: u/dimpase/doctests/allow_arb218
Commit: 428d87362f02f6330fdafc02f4886ada68bdd31a
Status: newneeds_review

this are tags for, and tagging of tests in rings/real_arb, allowing both versions to be tested properly.

is this the right way to get arb version that I use?


New commits:

157bd1eoptional tags arb216/18 for arb 2.16 vs 2.18
428d873tag tests with versions in real_arb

comment:8 Changed 2 years ago by git

Commit: 428d87362f02f6330fdafc02f4886ada68bdd31ae5df37770c6049cfb577f2f5feef48aa30430097

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

e5df377tag doctests with versions in complex_arb

comment:9 Changed 2 years ago by Dima Pasechnik

Status: needs_reviewneeds_work

arrgh, the arb version determination is wrong. How does one get the version of the system arb package used?

comment:10 Changed 2 years ago by François Bissey

From the point of view of sage-on-distros the use of something like package_versions or anything else from sage.misc.package is wrong.

The only clear difference between versions seem to be the soname or equivalent of the library. And that information may be be meaningless on some platforms.

comment:11 Changed 2 years ago by François Bissey

From arb.h

ARB_DLL extern const char * arb_version;

may be it is possible to ask arb itself?

comment:12 Changed 2 years ago by Dima Pasechnik

yes, that's what's I'm doing atm. A bit silly - arb should get on pkg-config...

comment:13 Changed 2 years ago by git

Commit: e5df37770c6049cfb577f2f5feef48aa30430097816aa2fe29a97c485c99925cacbe720c8b7d17d0

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

816aa2fget arn version directly from the library

comment:14 Changed 2 years ago by Dima Pasechnik

Status: needs_workneeds_review

OK, fixed now.

comment:15 in reply to:  12 Changed 2 years ago by François Bissey

Reviewers: François Bissey
Status: needs_reviewpositive_review

Replying to dimpase:

yes, that's what's I'm doing atm. A bit silly - arb should get on pkg-config...

I don't think it is silly. pkg-config would be a nice alternative but being able to interrogate the library/program itself about its own version should be a standard feature.

I like the branch, it looks good to me.

comment:16 Changed 2 years ago by Volker Braun

Status: positive_reviewneeds_work
sage -t --long --warn-long 43.6 --random-seed=0 src/sage/doctest/control.py
**********************************************************************
File "src/sage/doctest/control.py", line 778, in sage.doctest.control.DocTestController.expand_files_into_sources
Failed example:
    sorted(DC.sources[0].options.optional)  # abs tol 1
Expected:
    ['guava', 'magma', 'py2']
Got:
    ['arb216', 'guava', 'magma', 'py3']
**********************************************************************
1 item had failures:
   1 of  23 in sage.doctest.control.DocTestController.expand_files_into_sources
    [208 tests, 1 failure, 1.95 s]
----------------------------------------------------------------------
sage -t --long --warn-long 43.6 --random-seed=0 src/sage/doctest/control.py  # 1 doctest failed
----------------------------------------------------------------------

comment:17 Changed 2 years ago by git

Commit: 816aa2fe29a97c485c99925cacbe720c8b7d17d0464f08a2f3c0307b9618b8eab725cbf68109c39c

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

464f08amake the test robust

comment:18 Changed 2 years ago by Dima Pasechnik

Status: needs_workpositive_review

OK, fixed, tested.

comment:19 Changed 2 years ago by Volker Braun

Branch: u/dimpase/doctests/allow_arb218464f08a2f3c0307b9618b8eab725cbf68109c39c
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.