-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
sage.knots
: Modularization fixes (imports), # needs
#38118
Conversation
Documentation preview for this PR (built with commit b196b22; changes) is ready! 🎉 |
What distribution package (K) provides knot theory heavily depends on groups. I think the distribution package (K) should depend on the distribution package (G) that provides groups. What is (G)? |
In #35095, I have |
I think |
@soehms ? |
Per design of the modularized distributions, sagemath-graphs is not a package only for "graph theory". Rather it's a package that defines graphs and recognizable generalizations thereof and contains code that directly makes use of such structures. And the most basic code in |
Yes. The theory of knots and links uses graphs. But more importantly it uses groups, braid groups, and also polynomials.
Knots and links are not generalizations of graphs... |
this part applies to
|
Similarly Let's wait for an opinion from an expert though. |
By the way, there are 39 instances of the word "graph" in |
I'm not really a knot theory expert either, but I think to know enought about the
That's right. According to Wikipedia knot theory is a part of Geometric toplology. On that page it is listed as a subfield of its own, while on the Low-dimensional topology page it is mentioned as a subfield as well. As you already explained the connections to graph theory, group theory and polynomial rings just appear to be tool-boxes. Maybe the problem with modularization is an inconsistency between the developer's and the user's perspective. If a user interested in knot theory or geometric topology doesn't want to install the whole of the Sage library to work with topologically relevant parts of it, it won't help him that we've split the functionality in terms of dependencies. To facilitate modularization for such use cases, we should find a way to declare meta-packages as collections of existing standard and optional packages that define parts of Sage that cover a certain mathematical area. For example, such a meta-package for knot theory would consist of the standard packages But I'm not sure if such use cases are intended by our modularization project. If modularization only adresses developers, then I agree that we should not give preference to any of the tool-boxes (e.g. Other opinions, @culler , @NathanDunfield , @tscrim , @miguelmarco , @fchapoton ? |
@soehms Thanks for sharing this analysis.
It's true that my development focus in this "modularization" phase of the modularization project has been in getting the modularized distributions to ship and build in isolation. The dependencies are the hard technical constraints for this, and this is where the main technical difficulty lies. I have done most of this work already by myself (with the help of all who have supported the upstreaming of this work in their roles as PR reviewers); it's a necessary "bootstrapping" step. Sometimes decisions have to be taken that are arbitrary to some degree. So there is a component (knots) that has two hard runtime dependencies, groups and graphs. Well, one of the distributions has to ship it. It would be a mistake to defer the decision and keep knots for now in a catch-all, not-yet-modularized distribution until "we know better". Breaking the vicious cycle, making everything shippable in practical distributions, is exactly the point of this phase. Defining convenient and stable ways to advertise functionality to users is a largely separate question, and this is one where I indeed hope that communities of domain experts -- developers and users -- will start to engage with the modularization project. This is really the "integration" phase of the modularization. Most of the technical difficulty is gone: defining meta-packages is just a matter of writing a pyproject.toml file; with "optional dependencies" that advertise features. So a different hard problem comes to the fore: Reaching out to users, shaping and leading communities. |
I agree with @soehms and @kwankyu that, mathematically, knot theory is not usually viewed as part of (or even strongly connected to) graph theory. There's more overlap with modern combinatorial/geometric group theory, especially the aspects that On the technical question of where |
Here is my position on modularization:
1. Modularization is NOT for users. A user who wants to use Sage should
install Sage. Period. (And the Sage project should put effort into making
it as easy as possible to install Sage.)
2. Modularization is very useful for developers who would like to include
some parts of Sage, either as a dependency or as a "vendorization" in the
project that the developer is developing. Including all of Sage, in either
way, turns small or medium sized projects into enormous projects and
therefore is not practical. A guiding example is CyPari, which is a
dependency of SnapPy and also is embedded in the SnapPy app.
- Marc
PS Classifying the sub-disciplines of mathematics is hard, and is not the
job of the Sage developers, and should not be a prerequisite of the
modularization project. The decision of which Sage components to group
into a module should be based on the software. The decision of which Sage
modules to include in a given project should be made by the project
developer based on what the project needs.
…On Mon, Jun 3, 2024 at 12:59 PM Nathan Dunfield ***@***.***> wrote:
I agree with @soehms <https://github.com/soehms> and @kwankyu
<https://github.com/kwankyu> that, mathematically, knot theory is not
usually viewed as part of (or even strongly connected to) graph theory.
There's more overlap with modern combinatorial/geometric group theory,
especially the aspects that sage.knots implements.
On the technical question of where sage.knots should go in the
modularization, I have no informed opinion.
—
Reply to this email directly, view it on GitHub
<#38118 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ6CP73LUQUGU4M7SZS7TDZFSVGTAVCNFSM6AAAAABIR6FH4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHAYDONRXGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I agree with most of what @culler wrote, except to caution that the word "user" means many different things to different people. And the transition from (1) being merely a user of software to (2) sharing a script to (3) publishing a package in the Python "ecosystem" is soft and gradual, and supporting this transition when Sage is part of the equation is one of the goals of the modularization project. |
First let us note that some distribution packages are already in sage, and some other distribution packages are yet either in Matthias' repo or in future. All these collectively form the basic products of the modularization project. This PR is about preparation of the sage library for the modularization project, in particular, related with the python module
Yes. Thanks for that. However, I think this is the source of problems about the modularization project. People in the sage community did not engage in the design of the modularization of the sage library. For the project to proceed, I think it is the time when the design (and the design principles) is shared with the community, discussed and reflects the results of the discussion. Both of the users and developers of sage should acknowledge the project and become supporters of the modularized sage. Even accepting and not being hostile to As we are on this PR, we may take In the current design, This PR introduces too many According to #35095, it contains some of A developer developing his own software may depend on
Why?
If we want to ship
The first phase will be over when the distribution packages shipping hard dependencies (the blue boxes in the diagram of
Having people wait until the phase of defining "meta-packages" and just accept your design as done in #35095 seems to be unrealistic strategy to proceed the modularization project, as I think the recent disputed PRs manifest. |
I disagree. These so-called "disputes" have no legitimacy whatsoever. The project will not be governed by these expressions of disrespect and hostility. |
I prefer not to engage with such statements of what belongs and what does not. One important criterion is the overall complexity -- how many distributions we create. |
Sorry that they remind you of the disrespect and hostility. Of course, it has no place in our community. I just wanted to mention that not a few people have hostile (or at least unfriendly) attitude towards the modularization itself. I think it is important for the community to embrace the modularization project as their own mission. |
Reducing |
I agree with that 99%, especially the part in parentheses 100%. On the other hand, some users may not want to spend that much disk space, so why not have an option for them? |
From a mathematical point of view, this sounds reasonable to me, even though there are no direct dependencies on |
Is there anything wrong with doing the same for |
The downside of using the file-level doctest tag is that
It's a tradeoff. If your preference is to change them to file-level tags, I can make this change. |
|
I think your second point won't be a problem as long as there are CI runs testing the entire Sage library. As for your first point, we lose the work you've already done for this PR. On the other hand, we'll need more work in the future to keep this information valid. So the question is, how useful is the information we lose? According to your statistics, there are many more untagged doctests than those tagged with |
This sounds reasonable to me, thanks. |
diff --git a/src/sage/knots/knotinfo.py b/src/sage/knots/knotinfo.py
index 6bc9c3a09cf..7942a7092a2 100644
--- a/src/sage/knots/knotinfo.py
+++ b/src/sage/knots/knotinfo.py
@@ -1521,7 +1521,7 @@ class KnotInfoBase(Enum):
sage: K3_1 = KnotInfo.K3_1
sage: K3_1j = K3_1.jones_polynomial() # needs sage.symbolic
- sage: L2a1_1j = Ljt # see note above
+ sage: L2a1_1j = Ljt # see note above # needs sage.symbolic
sage: R = L2a1_1j.parent()
sage: Oj = R(1)
sage: t = R('t') from File "src/sage/knots/knotinfo.py", line 1524, in sage.knots.knotinfo.KnotInfoBase.jones_polynomial
Warning: Variable 'Ljt' referenced here was set only in doctest marked '# needs sage.graphs sage.groups sage.symbolic'
L2a1_1j = Ljt # see note above |
In
|
Otherwise lgtm. Thanks for switching to file-level tags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM.
Thank you! |
"Examples" is what the doctest code calls them. |
All right. But I think "example" is ambiguous as a unit of measure (outside of the code)... |
Also some doctest cosmetics.
sage --fixdoctests --verbose
now shows doctest tagging statistics.📝 Checklist
⌛ Dependencies