Opened 5 months ago

Closed 4 months ago

#27160 closed enhancement (fixed)

py3: fix doctests in hyperbolicity and graph_coloring

Reported by: dcoudert 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) Commit: c3678ad59f8aa6e372aeeefa6bd363fc49f4218b
Dependencies: Stopgaps:

Description (last modified by dcoudert)

  • 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 5 months ago by dcoudert

  • Branch set to u/dcoudert/27160_hyperbolicity_and_graph_coloring
  • Commit set to 4784cc285c52df637154e83ba063bb6ba652ed74
  • Status changed from new to needs_review

New commits:

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

comment:2 Changed 4 months ago by git

  • Commit changed from 4784cc285c52df637154e83ba063bb6ba652ed74 to 2490bc9b883bb758e405eb4ee81caf4ad3df707b

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 months ago by git

  • Commit changed from 2490bc9b883bb758e405eb4ee81caf4ad3df707b to c3678ad59f8aa6e372aeeefa6bd363fc49f4218b

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 months ago by dcoudert

  • 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 months ago by gh-jfraymond

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 months ago by dcoudert

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

comment:7 Changed 4 months ago by gh-jfraymond

  • Reviewers set to Jean-Florent Raymond
  • Status changed from needs_review to positive_review

comment:8 Changed 4 months ago by vbraun

  • Branch changed from u/dcoudert/27160_hyperbolicity_and_graph_coloring to c3678ad59f8aa6e372aeeefa6bd363fc49f4218b
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.