-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add Folder for Manifold Examples #30799
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
There are now two way that I see (not related to this ticket directly):
Namely, some dimensions have peculiarities that we may want to consider (e.g. S3 is parallelizable). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:5
Here's my proposal in concrete form. Feedback is welcome. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:7
I struggle a bit with the word "model". Other ideas are welcome. |
comment:8
I don't care for the name "model" as it means something slightly different to me than what you intend. I would say "examples" is a better name. |
comment:9
What about calling the folder simply |
comment:10
Thanks for this ticket. A folder dedicated to standard manifolds sounds like a good idea. Regarding the name, I would lean to
instead of
which looks unnecessarily longer and probably more difficult to find via introspection. Apparently, there is no |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Michael Jung |
comment:12
Doctest works out for |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
Usually there is just a |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:39
Replying to @mjungmath:
Indeed.
OK, to be consistent with the rest of Sage code, it's probably wise to keep the
Yes. Most probably, we need a
Yes factory approach might be better in this respect. It avoids to invoke |
comment:40
Allow me to summarize the accumulated discussion. Unfortunately, we can't start polls here (a feature I completely miss).
With respect to the last point, I suggest that every cataloged manifold should have it's own method in Please let me know if I caught something wrong. |
comment:41
Ok, I'm convinced: +1 for For the pattern, it probably depends on the concrete example and how much the implementations differ. In general, the factory pattern is good when you have completely independent implementations of some interface (e.g. getting infos from a file vs from an web api) whereas the façade pattern excels at hiding the implementation details. You can also combine them easily.
|
comment:42
Replying to @tobiasdiez:
I disagree here. Dedicated methods to each example are a good thing anyway imho, see comment:40. So why not leave the simple constructions there?
Totally! I think this is how we should do it. The parallelizable cases have the same charts, but in contrast to their brothers a global frame which can be constructed in the corresponding classes. So, I'd prefer the façade pattern here as well. But this is something we should discuss in more detail in #30804. |
comment:45
What about this? I think, the However, with this commit, there is a doctest error in line 215 of |
comment:46
Replying to @mjungmath:
See #30830 for details. |
comment:47
Replying to @mjungmath:
To elaborate: each manifold constructed from the global namespace, i.e. via the factory method, obtains a unique tag. That means, each invokation constructs a new object. For consistency, this should hold for Please object if you disagree. |
comment:48
Replying to @mjungmath:
No, Anyway, the unique tag issue is beyond the scope of this ticket, I believe. |
comment:49
Replying to @egourgoulhon:
What is the intention behind it?
You're right. However, it is somehow entwined. It wouldn't make sense to create a factory method somewhere else than in |
comment:50
Replying to @mjungmath:
|
comment:51
Replying to @egourgoulhon:
Mh, I see. And But what about I think, this should be catched via So, what's your proposal with the import/method/catalog behavior then? Keep the version of comment:29? |
comment:52
Replying to @egourgoulhon:
I still haven't forgotten that I promised you I would do that. It is on my to-do list. Sorry for taking so long. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits: |
comment:54
Like Eric pointed out correctly, some things discussed here go beyond the scope of this ticket. I reverted the branch to an older version, where I used lazy imports into Lazy import should prevent circular and unneccessary imports. Patchbot is already green. |
comment:55
We can do further changes in other tickets. I think it is good to take some smaller steps in each ticket. |
Reviewer: Travis Scrimshaw |
comment:56
I agree. Thanks. |
Changed branch from u/gh-mjungmath/add_folder_for_manifold_models to |
Belongs to #30189.
I propose to add a new folder for manifold examples:
src/sage/manifolds/differentiable/examples
Furthermore, I suggest we move
euclidean.py
andreal_line.py
to that folder and make it, besides the global availability, accessible from the catalog, too. The idea is that any manifold example can be accessed via the catalog, and the corresponding files are stored in theexamples
folder.For manifolds with non-smooth structure (or non-diffeomorphic structures), we can add such a folder in
manifolds
, too. But I don't see the need yet.CC: @egourgoulhon @tscrim
Component: manifolds
Author: Michael Jung
Branch/Commit:
8d2f44d
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/30799
The text was updated successfully, but these errors were encountered: