That is an encouraging news.To speed up the process, we have to pass
This PR bundles together totally unrelated things.
What do sagemath-objects and sagemath-categories have to do with demoting brial to optional?
... All of these are then imported by src/sage/all__sagemath_categories.py
I don't think that I understand the purpose of sagemath_categories.
The diagram you link to indicates that sagemath-categories is almost at the bottom, whereas sagemath-symbolics is almost at the top of the hierarchy that you propose.
However, the PR includes a filefrom sage.calculus.functional import diff, derivative, expand, simplify, taylorand many similar files, e.g. src/sage/combinat/all__sagemath_categories.py, src/sage/groups/all__sagemath_groups.py, importing things like
from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, linear_relation, multiple, multiples, order_from_multiple)All of these are then imported by src/sage/all__sagemath_categories.py
I don't think that I understand the purpose of sagemath_categories.
If this is the case then the brial related PR ought to come after the sagemath-objects and -categories stuff PR. (Or maybe more than one PR).
It seems that it puts about 50% or more of Sage into sagemath-categories, cause it includes SR (with calculus), polynomial rings, etc. One may ask whether it's worthwhile to have at all in this form.
However, this PR introduces a new kind of file, `all__sagemath_categories.py`, into (almost?) *every* subdirectory of src. Thus, it seems to me that this affects almost all developers - after all these files have to be maintained once they are there.
this PR introduces a new kind of file, `all__sagemath_categories.py`,
For example, I see that PowerSeriesRing is imported, but LazyPowerSeriesRing is not. I don't understand the difference.
I thought that they were about the distribution packages, because that's what's mentioned in the top lines.
A much more meaningful design, and an obvious improvement, would be to
have a (say) sagemath-smallcore, where, say, 70% of
sagelib functionality is, with the remaining parts based off this
sagemath-smallcore.
[...] fixing the breakage in distribution A might induce a
breakage in distribution B,
as they overlap in hard to keep in mind, spaghetti-like, ways.
I could also imagine to have three layers:* a core distribution with absolutely minimal dependencies and only dependencies which have proved stable on all supported platforms
On Sun, 29 Sept 2024 at 00:22, Matthias Koeppe <matthia...@gmail.com> wrote:
> On Saturday, September 28, 2024 at 12:28:30 PM UTC-7 axio...@yahoo.de wrote:
>
> I could also imagine to have three layers:
>
> * a core distribution with absolutely minimal dependencies and only dependencies which have proved stable on all supported platforms
>
> This is exactly sagemath-categories. It has absolutely minimal dependencies.
Would it make sense to give this a different name like Dima's
suggestion of sagemath-core or something else like sagemath-base,
sagemath-minimal etc?
> I could also imagine to have three layers:
>
> * a core distribution with absolutely minimal dependencies and only dependencies which have proved stable on all supported platforms
>
> This is exactly sagemath-categories. It has absolutely minimal dependencies.
Would it make sense to give this a different name like Dima's
suggestion of sagemath-core or something else like sagemath-base,
sagemath-minimal etc?I think all of these options are much less expressive than the current choice.Anything named -minimal could describe pretty much any arbitrary choice. (It's "minimal" for *what*?)Likewise -core could mean pretty much anything. There are many other things that are arguably the "core" of Sage.And sagemath-categories is definitely not the -base; below it in the dependency graph there is sagemath-objects (an even smaller subset).
Please don't fragment this discussion. It seems productive to me currently.
On 29 September 2024 01:50:39 BST, Matthias Koeppe <matthia...@gmail.com> wrote:
>On Saturday, September 28, 2024 at 5:21:56 PM UTC-7 oscar.j....@gmail.com
>wrote:
>
>On Sun, 29 Sept 2024 at 00:22, Matthias Koeppe <matthia...@gmail.com>
>wrote:
>> On Saturday, September 28, 2024 at 12:28:30 PM UTC-7 axio...@yahoo.de
>wrote:
>>
>> I could also imagine to have three layers:
>>
>> * a core distribution with absolutely minimal dependencies and only
>dependencies which have proved stable on all supported platforms
>>
>> This is exactly sagemath-categories. It has absolutely minimal
>dependencies
So it's not minimal, as it contains sagemath-objects
>I think all of these options are much less expressive than the current
>choice.
The current choice is confusing, for a number of reasons:
* as it invokes wrong associations: "oh, it's category theory, but with more algebra - it must be Abelian categories there. Sage does Abelian categories, wow!"
* the name does not stand out at all from the rest of distributions to indicate that it is something minimal/core/base and contained (almost) everywhere else
* it arbitrarily names the distribution after one of its parts (sage.categories), and ignores the rest of its content.
>Anything named *-minimal* could describe pretty much any arbitrary choice.
>(It's "minimal" for *what*?)
A minimal element in the poset of distributions,
obviously.
Perhaps sagemath-foundations is better?
Should we hold a vote?
I think that `sagemath--minimal-dependencies` would be clear, wouldn't it?
I have now two more questions:* why are some classes without any dependencies missing from what's currently named `sagemath-categories`? I don't know how to do a systematic search, so I only checked the ones I know well, and `GrowthDiagram` is not there, but is pure python.
* wouldn't it be better to tag dependencies, rather than having to explicitly put something into what's currently `sagemath-categories`? I imagine that it will be a constant source of confusion whether to put some new functionality into all.py or all__sagemath_categories.py
... What I tried to say is that the core distribution should have minimal dependencies, but contain as much of sage as possible.
... What do you have in mind people would do with just the stuff in `categories`?
... What I tried to say is that the core distribution should have minimal dependencies, but contain as much of sage as possible.More code requires more dependencies. The "core distribution" as you describe is not possible.
So, it turns out that> * a core distribution with absolutely minimal dependencies and only dependencies which have proved stable on all supported platforms
>
> This is exactly sagemath-categories. It has absolutely minimal dependenciesis not what I tried to say. What I tried to say is that the core distribution should have minimal dependencies, but contain as much of sage as possible.I don't see any advantage of restricting to a smaller subset.
What do you have in mind people would do with just the stuff in `categories`?
> And for sure doing any such renaming games will be outside of the scope of the PR in question. https://github.com/sagemath/sage/pull/36380 should not wait for it.
#36380 is first of all waiting for, requested by more than one
reviewer, splitting off the part related to brial - as the latter is a
really urgent and unrelated to sagemath-categories thing.
They do provide a random subset of concrete implementations - e.g. polynomials.
I don't think it's wise to subject people to more messy misnamed
things than it is absolutely necessary.
Once people are used to bad designs and wrong names (assuming there is
anyone left working with them!),
it's pretty hard to make changes.
... What I tried to say is that the core distribution should have minimal dependencies, but contain as much of sage as possible.More code requires more dependencies. The "core distribution" as you describe is not possible.I don't understand this, and I don't understand why some "functionality" (as mentioned above, e.g. "simplify" and "taylor") is in sagemath-categories.I think it is problematic if we deploy a scheme that not even all developers understand.
In my mind it could make sense for there to be a sagemath-minimal
package which from a user perspective represents a "minimal
installation of Sage" in comparison to say a package called
sagemath-full.
It seems to me that one of the main innovations of sage (among other CAS) was to make writing doctests really easy *and* keep them together with the code *and* make testing them *while developing* very straightforward.
The final of these three points would be broken by encouraging developers to test only the parts of sage they are interested in, even if only slightly so. This can be seen in packages that were developed for sage, but not integrated, and used mostly for a relatively specific task. An example I have in mind is the ore_algebra package.
the description given by Matthias, reproduced below, makes no sense to me at all.> The other contents of sagemath-categories are provided in similar spirit. For example, there are the Function objects from sage.functions -- but only in a generic, dispatching role. Actual implementations of most functions depend on various libraries. Likewise, polynomials are there only in a generic implementation; the specialized implementations and higher-level functionality (e.g., Gröbner bases) are provided by other distributions as they depend on various libraries.
In my mind it could make sense for there to be a sagemath-minimal
package which from a user perspective represents a "minimal
installation of Sage" in comparison to say a package called
sagemath-full. The implication of that though is that the package
provides enough usable features that a user who only wants to use
widely used basic features of Sage would be able to use
sagemath-minimal to do what they want. It sounds like
sagemath-categories does not provide that. I think that the same
problem applies to the name sagemath-core because again to me that
name implies some level of usability from an end-user perspective.
Looking at the diagram (in
https://github.com/sagemath/sage/pull/35095) is the part on the right
"sagemath-repl"?
I'm assuming that it is separate from categories because it depends on
ipython or something but is it likely that anyone would want to
install sagemath-repl without also installing sagemath-categories?
If not then would it make sense for sagemath-repl to depend on
sagemath-categories rather than sagemath-objects and then would there
still be a need for sagemath-objects and
sagemath-environment/sage-conf?
Something that is very unclear to me is what the sizes of these things
are. For example, how much disk space does it take to install
sagemath-mpmath plus dependencies? How much larger or smaller is that
than just installing sagemath-categories?
It seems to me that one of the main innovations of sage (among other CAS) was to make writing doctests really easy *and* keep them together with the code *and* make testing them *while developing* very straightforward.True!The final of these three points would be broken by encouraging developers to test only the parts of sage they are interested in, even if only slightly so. This can be seen in packages that were developed for sage, but not integrated, and used mostly for a relatively specific task. An example I have in mind is the ore_algebra package.We should not encourage that.
It seems to me that one of the main innovations of sage (among other CAS) was to make writing doctests really easy *and* keep them together with the code *and* make testing them *while developing* very straightforward.
> There's a simple and important principle of Open Source: Trust those who are doing the work.I cannot quite pin it down,
but this sounds fishy to me. Maybe because in this particular case it's not just about work, maybe also because there are some aspects I find plain wrong.
what's so special about an updated sagemath-categories distribution so that you absolutely must base the brial update on them?
Distributions are just wrappers for code, after all.
Instead of using -distributions magic only you, and perhaps, Tobias, know (as witnessed on the PR which does a similar job, but for brial,
<https://github.com/sagemath/sage/pull/38712>), you can merely use a few imports that need to be used, regardless of the state of sagemath-categories.
Why is it quicker than running ./sage -t src/sage/lfunctions src/sage/rings/
(perhaps few other should be added) on a full sagelib install?
And extra complexity to run wider tests, for sagelib, as it's not
installed by default.
For a wider testing, we should not assume that free and generous
GitHub CI allowance we enjoy now is there to stay. [...]
> On Thursday, October 3, 2024 at 1:18:44 PM UTC-7 Dima Pasechnik wrote:
>
> Why is it quicker than running ./sage -t src/sage/lfunctions src/sage/rings/
> (perhaps few other should be added) on a full sagelib install?
On Thu, Oct 3, 2024 at 11:01 PM Matthias Koeppe
> The main point of testing a modularized distribution is not speed but to protect against modularization regressions.
> Testing the modularized distributions is not the same as passing a subset of files to the doctester.
We are taking about a particular example - of developing a piece of
number-theoretic functionality, and how
using only sagemath-number-theory distribution might benefit the developer.
It was suggested that it might be quicker with sagemath-number-theory,
as it would only test a part of the sagelib.
I pointed out that an option to test a part is already here, for long time.
And on the other hand, as at some point one would need to test the
whole sagelib,
it's more work with the modularised system, not less
My point is that the benefits of modularisation are unclear, there are
more tests to run, more complexity
to understand, for seemingly no gain.
We are observing disadvantage of a long thread.
it's more work with the modularised system, not lessOn the project level, It takes more work to provide more products (distribution packages) to users.
On an individual developer level, it is less work if he can focus on "a smaller sage library" (sagemath-number-theory)
My point is that the benefits of modularisation are unclear, there are
more tests to run, more complexity
to understand, for seemingly no gain.Like our github ci, "more tests to run, more complexity to understand" is a burden upon the core developers maintaining the project.
The motivation of the modularization project is to reduce the burden who only needs some portion of the sage library,and wants to use and develop the portion within the python ecosystem.
An individual mathematician who only needs some portion of the sage library may install only his favorite distribution package.There are obvious benefits of using smaller software package: less time in installing and testing, less number of failure points in installing and testing, less cognitive stress, ...
The motivation of the modularization project is to reduce the burden who only needs some portion of the sage library,and wants to use and develop the portion within the python ecosystem.
An individual mathematician who only needs some portion of the sage library may install only his favorite distribution package.
" An individual who wants to use Sage should just install Sage."
I would rather do math than spend my time learning the ins and outs of a software package. I nearly said this in response to some past posts making the same point. I agree with them too.
Robert Bruner
________________________________________
From: sage-...@googlegroups.com <sage-...@googlegroups.com> on behalf of G. M.-S. <list...@gmail.com>
Sent: Sunday, October 6, 2024 11:41 AM
To: sage-...@googlegroups.com
Subject: Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept
[EXTERNAL]
I wholly agree with Marc.
For me, this is another instance of a user point of view versus a developer point of view.
Coming from someone who tries to make SageMath easily available for ordinary people, Marc's views are all the more valuable IMHO.
Guillermo
On Sun, 6 Oct 2024 at 17:24, Marc Culler <marc....@gmail.com<mailto:marc....@gmail.com>> wrote:
On Thursday, October 3, 2024 at 8:05:09 PM UTC-5 Kwankyu Lee wrote:
The motivation of the modularization project is to reduce the burden who only needs some portion of the sage library,
and wants to use and develop the portion within the python ecosystem.
I would say that the motivation is to make it possible for a developer to include a self-contained portion of sage in a separate project without having to make that project as large as a full Sage distribution.
An individual mathematician who only needs some portion of the sage library may install only his favorite distribution package.
As I have said so many times before, apparently to no avail, I strongly disagree with this point of view. It is not reasonable to expect an individual mathematician, or student, to be able to decide which portions of Sage are needed, nor even to know which portions can be installed separately. An individual who wants to use Sage should just install Sage. All of it. And that installation should be very easy. It should certainly not require deciding which portions of Sage might be needed in which contexts.
- Marc
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com<mailto:sage-devel+...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CANnG18_%2BiVEiMLyfwECMvZq5aCFsnB5Jd6K7uVD_LRczKKvOjw%40mail.gmail.com<https://groups.google.com/d/msgid/sage-devel/CANnG18_%2BiVEiMLyfwECMvZq5aCFsnB5Jd6K7uVD_LRczKKvOjw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
I would say that the motivation is to make it possible for a developer to include a self-contained portion of sage in a separate project without having to make that project as large as a full Sage distribution.
... It is not reasonable to expect an individual mathematician, or student, to be able to decide which portions of Sage are needed, nor even to know which portions can be installed separately. An individual who wants to use Sage should just install Sage. All of it. And that installation should be very easy. It should certainly not require deciding which portions of Sage might be needed in which contexts.
... There would also be a strong incentive to try to carve out
a meaningful subset of Sage for end-users that was more portable ...
On the other hand, who would be the users of the distribution packages for whatever need? I wonder how they overlap with sage developers.
For me, this is another instance of a user point of view versus a developer point of view.Coming from someone who tries to make SageMath easily available for ordinary people, Marc's views are all the more valuable IMHO.
An individual mathematician who only needs some portion of the sage library may install only his favorite distribution package.As I have said so many times before, apparently to no avail, I strongly disagree with this point of view. It is not reasonable to expect an individual mathematician, or student, to be able to decide which portions of Sage are needed, nor even to know which portions can be installed separately. An individual who wants to use Sage should just install Sage. All of it. And that installation should be very easy. It should certainly not require deciding which portions of Sage might be needed in which contexts.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b5d5eeb2-238f-4520-9715-4b6d3704ba65n%40googlegroups.com.
A concrete example of a useful standalone Sage module is CyPari2. By including CyPari within SnapPy we are able to make it possible to compute number theoretic invariants of hyperbolic manifolds. We are unable to use Sage's CyPari2 because we need to support Windows. But, as Oscar says, it should be easier to port individual modules to Windows than all of Sage. That is the case with CyPari.As another example, it would be great for SnapPy if we could also include Sage's interval arithmetic code, packaged as a standalone module.
If we concentrated on facilitating the latter, rather than on
distribution packages, it could have been there now.
- the examples we have of bits of software developed as part of sage that ended up as library components of other projects are peripheral, interfacing parts that were spun off into independent libraries.- we don't have examples of core functionality of sage getting adopted as a component of another project
Against that background:
what purpose would modularizing the core of sage serve and what benefit do we think to derive from it?
Once distributions are happy packaging sage in a conventional way, perhaps people could easily generate flatpaks or snap packages as well, which should be more stable (they'll be huge, though).
On Tuesday, October 8, 2024 at 1:23:55 PM UTC-6 Nils Bruin wrote:- the examples we have of bits of software developed as part of sage that ended up as library components of other projects are peripheral, interfacing parts that were spun off into independent libraries.- we don't have examples of core functionality of sage getting adopted as a component of another projectThe most obvious reason for this is that it too hard for a project to adopt core functionality of Sagewith the current organization of Sage. Making that easier was one of the main motivations for the modularization project. So this is circular reasoning.
> As you're pointing out, sage still fits within 10GB in source, so it looks like sagemath could just be one pypi package.
I think that you have misunderstood the limits that Marc was referring
to. The 100MB file limits means that a single project installer file
should be less than 100MB. The 10GB project limit means that all
installer files for each Python version and each OS for all versions
of a project should not add up to more than 10GB. A single Sage
installer file for one OS, Sage version and CPython version comes
close to the total file size limit allowed for any project by default
in PyPI.
On Monday, October 7, 2024 at 12:05:25 AM UTC-5 Kwankyu Lee wrote:On the other hand, who would be the users of the distribution packages for whatever need? I wonder how they overlap with sage developers.A concrete example of a useful standalone Sage module is CyPari2. By including CyPari within SnapPy we are able to make it possible to compute number theoretic invariants of hyperbolic manifolds. We are unable to use Sage's CyPari2 because we need to support Windows. But, as Oscar says, it should be easier to port individual modules to Windows than all of Sage. That is the case with CyPari.
The problem with Windows is just that cypari2 does not support it.
CyPari works fine on Windows. There is some trickiness required to
get cysignals to work on Windows. This is because sage's
implementation of sig_on calls setjmp and expects a signal handler to
call longjmp, but that scheme fails on Windows where each signal
handler runs in a separate thread with its own stack. However, CyPari
has a workaround for this.
PS There is another problem with cypari2, completely unrelated to this
thread, which prevents SnapPy from using it, even on platforms which
are supported by cypari2. That problem is that huge memory leaks were
introduced in cypari2 by a redesign of the Python Gen class to try to
keep the Pari GEN managed by a Python Gen object on the Pari stack as
long as possible. Those leaks make cypari2 unusable for us. CyPari
has reverted to the original model, where each Pari GEN is moved to
the Pari heap when its wrapper Gen is constructed, and is freed from
the Pari heap in the wrapper's __dealloc__ method. That fixes the
leaks.
As far as I know, cysignals is another instance of a component originally developed for sagemath, about maybe 20 years ago, then separated into a standalone package. In theory, this separation should make it easier to support other OS, but the fact that windows support hasn't materialized yet is a sign that this is not so clear.
ERROR HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
Project size too large. Limit for project 'jupyterlab' total size is 10
GB. See https://pypi.org/help/#project-size-limit
For them, they are hitting a total size limit of 10 GB.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/79e2d59c-162d-4162-acb7-7ee7ae958324n%40googlegroups.com.