flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

Unify casing #228

Open saraedum opened 1 year ago

saraedum commented 1 year ago

I've always found it confusing that translation_surfaces is a collection of functions but is not a module in the flatsurf.geometry package. So you cannot do either:

from flatsurf.translation_surfaces import square_torus
from flatsurf.geometry.translation_surfaces import square_torus

But have to say

from flatsurf.geometry import translation_surfaces
translation_surfaces.square_torus(…)

There's nothing fundamentally wrong with this but the name translation_surfaces just signals to me that this is a module and not a class.

Once #220 has been merged, we could consider putting these example surfaces on the category as static methods so that this would work:

from flatsurf import TranslationSurfaces
TranslationSurfaces.square_torus(…)

Another option would be to put these surfaces into a proper module, something like flatsurf.geometry.translation_surfaces or flatsurf.geometry.examples maybe.

From a user's perspective, it's probably best if all those surfaces were exposed on flatsurf directly. So you could just say from flatsurf import square_torus.