sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 475 forks source link

experimental package for the 3D printing of Cayley graphs. #24280

Open 7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b opened 6 years ago

7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b commented 6 years ago

On the website reflections.swarthmore.edu, we have implemented a model builder for Cayley graphs of low-rank reflection groups in a series of SageCells. We would like to use this code to create an experimental package.

CC: @jplab @tscrim @bsalisbury1 @elizabethjd

Component: graphics

Keywords: sagedays@icerm

Branch/Commit: u/kdilks/3d_cayley_graphs @ e1ee29f

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

7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b commented 6 years ago
comment:1

Package code currently at this link: https://github.com/kjcollins/3d_cayley_graphs. Model class is in cayley_model.sage.

We would like to include this as an addition to sage/plot/plot3d, if it's appropriate.

7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b commented 6 years ago

Branch: u/kjcollins/3d_cayley_graphs

7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b commented 6 years ago

Commit: 80faffa

7ee7619c-ba8c-4a11-88d1-b1bbf7e7cb4b commented 6 years ago

New commits:

80faffauploading package to ticket
jplab commented 6 years ago
comment:5

In order for the bot to test your ticket, it is required to have the field "Authors" filled with the full names of the authors

jplab commented 6 years ago
comment:6

Hi,

I had a look at the code, here are already some things to have a look at:

EXAMPLES:

Basic plot of a reflection group::     <---- double colon here.
             <------ line break here
    sage: ReflectionGroup(['A',3])                             # optional - gap3
    Irreducible real reflection group of rank 3 and type A3
    sage: w = ReflectionGroup(['A',3])                         # optional - gap3
    sage: ReflectionGroup3d(w)
    Rigid graphical representation of Irreducible real reflection group of rank 3 and type A3
    sage: g = ReflectionGroup3d(w)
    sage: g.plot3d()
    Graphics3d Object

for more details, see here https://doc.sagemath.org/html/en/developer/#writing-code-for-sage . Further, the first line of test above is not needed.

That's what I can see for now. If you could work on the above list, then I can continue to give feedback once new versions come along!

Best, JP

tscrim commented 6 years ago
comment:8

Is there something specific about ReflectionGroup that you need to use? Why not WeylGroup or CoxeterGroup (when the Cartan/Coxeter type is a finite type)?

bsalisbury1 commented 6 years ago

Changed keywords from none to sagedays@icerm

1adc0eef-8957-46d9-975b-2dd71dfbd9ba commented 6 years ago

Changed branch from u/kjcollins/3d_cayley_graphs to u/kdilks/3d_cayley_graphs

1adc0eef-8957-46d9-975b-2dd71dfbd9ba commented 6 years ago

Changed commit from 80faffa to c62a792

1adc0eef-8957-46d9-975b-2dd71dfbd9ba commented 6 years ago

New commits:

b4b9a58Merge branch 'u/kjcollins/3d_cayley_graphs' of git://trac.sagemath.org/sage into 24280CayGraph
c62a792Addressing reviewer changes, one doctest is spitting out magic doctest errors before giving right result.
1adc0eef-8957-46d9-975b-2dd71dfbd9ba commented 6 years ago
comment:12

The problem is that having

warnings.simplefilter("always")

which is meant to bring up warnings for 3 specific doc-tests is causing a normal doc-test to throw hundreds of warnings. Removing that import just causes those 3 specific doc-tests to return a blank line instead of a warning, so that 3 doc-tests will just be modified/removed.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from c62a792 to 798dd74

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

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

798dd74Pushing changes from my computer since it's not working in the cloud
jplab commented 6 years ago
comment:14

Hi,

without the gap3 optional package, I still get 3 doctest failures:

File "reflection_group3d.py", line 63, in sage.plot.plot3d.reflection_group3d
Failed example:
    g_plot = cayley_graph_3d(A1A1, point=(21,11,31))
Expected nothing
Got:
    doctest:warning

File "reflection_group3d.py", line 212, in sage.plot.plot3d.reflection_group3d.cayley_graph_3d._real_dimension
Failed example:
    A = cayley_graph_3d(W)

File "reflection_group3d.py", line 213, in sage.plot.plot3d.reflection_group3d.cayley_graph_3d._real_dimension
Failed example:
    A.real_dimension
Exception raised:

The last two are caused by a missing flag # optional - gap3.

Question: are those warnings _really_ important? This is not typical to have warnings issued to the user like this in Sage.

Instead, perhaps writing a warning block inside of the class to tell the user what the hidden behavior is might be a good idea, as suggested by the Sage Developer's manual:

https://doc.sagemath.org/html/en/developer/coding_basics.html#documentation-strings

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

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

19dbf74Merge branch 'u/kdilks/3d_cayley_graphs' of git://trac.sagemath.org/sage into 24280cayley3d
e1ee29fAll tests are now passing on my cocalc version of sage devel, both with and without the optional gap3. The user warnings have been removed and a warning block about requiring gap3 has been added.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 798dd74 to e1ee29f