Opened 4 years ago

Closed 4 years ago

#27160 closed enhancement (fixed)

py3: fix doctests in hyperbolicity and graph_coloring

Reported by: David Coudert Owned by:
Priority: major Milestone: sage-8.7
Component: graph theory Keywords: py3, graph
Cc: Merged in:
Authors: David Coudert Reviewers: Jean-Florent Raymond
Report Upstream: N/A Work issues:
Branch: c3678ad (Commits, GitHub, GitLab) Commit: c3678ad59f8aa6e372aeeefa6bd363fc49f4218b
Dependencies: Stopgaps:

Status badges

Description (last modified by David Coudert)

  • hyperbolicity: we avoid sorting vertex ids before returning the certificate, and we sort these ids in the doctests.
  • graph_coloring: we sort the output of some doctests

Change History (8)

comment:1 Changed 4 years ago by David Coudert

Branch: u/dcoudert/27160_hyperbolicity_and_graph_coloring
Commit: 4784cc285c52df637154e83ba063bb6ba652ed74
Status: newneeds_review

New commits:

7dd655fhyperbolicity: mark doctest as py2 and py3
4784cc2graph_coloring: mark doctest as py2 and py3

comment:2 Changed 4 years ago by git

Commit: 4784cc285c52df637154e83ba063bb6ba652ed742490bc9b883bb758e405eb4ee81caf4ad3df707b

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

0cccb17trac #27160: Merged with 8.7.beta4
5e58fe7trac #27160: avoid sorting vertex ids when returning certificate
2490bc9trac #27160: avoid tag py2 and py3 in graph_coloring

comment:3 Changed 4 years ago by git

Commit: 2490bc9b883bb758e405eb4ee81caf4ad3df707bc3678ad59f8aa6e372aeeefa6bd363fc49f4218b

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

c3678adtrac #27160: avoid another py2/py3 tag in graph_coloring

comment:4 Changed 4 years ago by David Coudert

Description: modified (diff)

I changed the proposed fixes to avoid # py2 and #py 3 tags.

  • hyperbolicity: it is more robust to avoid sorting vertex ids of the certificate before returning it, and to sort these ids in the doctests
  • graph_coloring: we now sort the output of some doctests

comment:5 Changed 4 years ago by Jean-Florent Raymond

Note that the lines you edited about approximation of hyperbolicity for grids an cycles now go over 80 characters. (also true for other lines of both files, but outside of the aim of this ticket)

Is it a problem? If not I am fine with the patch.

comment:6 Changed 4 years ago by David Coudert

It's not a problem (at least for me).

comment:7 Changed 4 years ago by Jean-Florent Raymond

Reviewers: Jean-Florent Raymond
Status: needs_reviewpositive_review

comment:8 Changed 4 years ago by Volker Braun

Branch: u/dcoudert/27160_hyperbolicity_and_graph_coloringc3678ad59f8aa6e372aeeefa6bd363fc49f4218b
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.