Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue in graph_plot_js #27460

Closed
dcoudert opened this issue Mar 11, 2019 · 13 comments
Closed

fix issue in graph_plot_js #27460

dcoudert opened this issue Mar 11, 2019 · 13 comments

Comments

@dcoudert
Copy link
Contributor

Fix issue reported in https://groups.google.com/forum/#!topic/sage-devel/oD1jQVirJBs

The mapping of vertices given to d3.js was incorrect

Component: graph theory

Author: David Coudert

Branch/Commit: 8e5f238

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/27460

@dcoudert dcoudert added this to the sage-8.7 milestone Mar 11, 2019
@dcoudert
Copy link
Contributor Author

Commit: 771b91e

@dcoudert
Copy link
Contributor Author

Branch: u/dcoudert/27460_graph_plot_js

@dcoudert
Copy link
Contributor Author

New commits:

771b91etrac #27460: fix ordering

@fchapoton
Copy link
Contributor

comment:2

Having a doctest would be good..

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2019

Changed commit from 771b91e to ebddf9d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2019

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

ebddf9dtrac #27460: add doctest

@dcoudert
Copy link
Contributor Author

comment:4

I added a doctest but it's not good. It works on my laptop with py3, but not with py2.
The order of the keys of the dictionaries is not the same in py2 and py3 :(

with py2, I get

..."links": [{"strength": 0, "target": 0, "color": "#aaa", "curve": 0, "source": 1, "name": ""}], "pos": [], "edge_thickness": 4, "loops": [], "edge_labels": false, "vertex_size": 7, "vertex_labels": true, "directed": true, "gravity": 0.04, "charge": -120, "nodes": [{"group": "0", "name": "10"}, {"group": "0", "name": "1"}]...

and with py3

..."nodes": [{"name": "10", ...}, {"name": "1", ...}], "links": [{"source": 1, "target": 0, ...}]...

Any suggestion is more than welcome.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2019

Changed commit from ebddf9d to 8e5f238

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2019

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

8e5f238trac #27460: a more robust doctest

@dcoudert
Copy link
Contributor Author

comment:6

OK, I found a more robust doctest that is OK for py2 and py3. Hope you like it.

@fchapoton
Copy link
Contributor

comment:7

ok, looks good. When patchbot is green, positive review

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Mar 13, 2019

Changed branch from u/dcoudert/27460_graph_plot_js to 8e5f238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants