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:  sage9.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: 
Description (last modified by )
Although we have deferred the Arb upgrade to Sage 9.3, on various platforms (e.g. ubuntugroovystandard
, 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
Description:  modified (diff) 

comment:2 Changed 2 years ago by
comment:4 followup: 5 Changed 2 years ago by
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 Changed 2 years ago by
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
Authors:  → Dima Pasechnik 

I'll do a proper fix, with version tags etc
comment:7 Changed 2 years ago by
Branch:  → u/dimpase/doctests/allow_arb218 

Commit:  → 428d87362f02f6330fdafc02f4886ada68bdd31a 
Status:  new → needs_review 
comment:8 Changed 2 years ago by
Commit:  428d87362f02f6330fdafc02f4886ada68bdd31a → e5df37770c6049cfb577f2f5feef48aa30430097 

Branch pushed to git repo; I updated commit sha1. New commits:
e5df377  tag doctests with versions in complex_arb

comment:9 Changed 2 years ago by
Status:  needs_review → needs_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
From the point of view of sageondistros 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
From arb.h
ARB_DLL extern const char * arb_version;
may be it is possible to ask arb itself?
comment:12 followup: 15 Changed 2 years ago by
yes, that's what's I'm doing atm. A bit silly  arb should get on pkgconfig...
comment:13 Changed 2 years ago by
Commit:  e5df37770c6049cfb577f2f5feef48aa30430097 → 816aa2fe29a97c485c99925cacbe720c8b7d17d0 

Branch pushed to git repo; I updated commit sha1. New commits:
816aa2f  get arn version directly from the library

comment:15 Changed 2 years ago by
Reviewers:  → François Bissey 

Status:  needs_review → positive_review 
Replying to dimpase:
yes, that's what's I'm doing atm. A bit silly  arb should get on pkgconfig...
I don't think it is silly. pkgconfig 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
Status:  positive_review → needs_work 

sage t long warnlong 43.6 randomseed=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 warnlong 43.6 randomseed=0 src/sage/doctest/control.py # 1 doctest failed 
comment:17 Changed 2 years ago by
Commit:  816aa2fe29a97c485c99925cacbe720c8b7d17d0 → 464f08a2f3c0307b9618b8eab725cbf68109c39c 

Branch pushed to git repo; I updated commit sha1. New commits:
464f08a  make the test robust

comment:19 Changed 2 years ago by
Branch:  u/dimpase/doctests/allow_arb218 → 464f08a2f3c0307b9618b8eab725cbf68109c39c 

Resolution:  → fixed 
Status:  positive_review → closed 
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 ?)