Proposal: Deprecate all of sage.finance, sage.media, sage.stats in 9.1

270 views
Skip to first unread message

Matthias Koeppe

unread,
May 1, 2020, 5:19:32 PM5/1/20
to sage-devel
These modules have a very limited amount of code, seem to have seen no major development for about 10 years, and are (with minor exceptions) unused in the rest of Sage.

Potential users will be better off with looking for mainstream libraries in the Python ecosystem, or with interfacing with Python, etc.


John H Palmieri

unread,
May 1, 2020, 7:46:28 PM5/1/20
to sage-devel
Did you mean 9.2? It's too late to add deprecations to 9.1, in my opinion.

Dima Pasechnik

unread,
May 2, 2020, 3:56:18 AM5/2/20
to sage-devel
On Sat, May 2, 2020 at 12:46 AM John H Palmieri <jhpalm...@gmail.com> wrote:
>
> Did you mean 9.2? It's too late to add deprecations to 9.1, in my opinion.
>

be it 9.1 or 9.2, it's certainly a good idea to deprecate and remove.

>
> On Friday, May 1, 2020 at 2:19:32 PM UTC-7, Matthias Koeppe wrote:
>>
>> These modules have a very limited amount of code, seem to have seen no major development for about 10 years, and are (with minor exceptions) unused in the rest of Sage.
>>
>> Potential users will be better off with looking for mainstream libraries in the Python ecosystem, or with interfacing with Python, etc.
>>
>>
> --
> 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/7fd459a4-2f42-413b-9e17-6075b50388ec%40googlegroups.com.

Sébastien Labbé

unread,
May 2, 2020, 8:15:29 AM5/2/20
to sage-devel
At least, I know that module sage/finance/stock.py is completely broken. A warning was added in trac ticket #25473
For the doctests to pass, tag "known bug" was added for most of the doctests:

$ sage -t --optional=sage,internet --show-skipped src/sage/finance/stock.py
...
    22 tests not run due to known bugs
...

I don't use any of these three modules, but maybe some do? The stats folder contains a lot of stuff:

$ tree stats/
stats/
├── all.py
├── basic_stats.py
├── distributions
│   ├── dgs_bern.c
│   ├── dgs_bern.h
│   ├── dgs_gauss_dp.c
│   ├── dgs_gauss.h
│   ├── dgs_gauss_mp.c
│   ├── dgs.h
│   ├── dgs_misc.h
│   ├── dgs.pxd
│   ├── discrete_gaussian_integer.pxd
│   ├── discrete_gaussian_integer.pyx
│   ├── discrete_gaussian_lattice.py
│   ├── discrete_gaussian_polynomial.py
│   ├── __init__.py
│   └── __pycache__
├── hmm
│   ├── all.py
│   ├── chmm.pyx
│   ├── distributions.pxd
│   ├── distributions.pyx
│   ├── hmm.pxd
│   ├── hmm.pyx
│   ├── __init__.py
│   ├── __pycache__
│   ├── util.pxd
│   └── util.pyx
├── __init__.py
├── intlist.pxd
├── intlist.pyx
├── __pycache__
└── r.py

5 directories, 28 files
$ tree finance/
finance/
├── all.py
├── easter.py
├── fractal.pyx
├── __init__.py
├── markov_multifractal_cython.pyx
├── markov_multifractal.py
├── option.pyx
├── __pycache__
├── stock.py
├── time_series.pxd
└── time_series.pyx

1 directory, 10 files
$ tree media/
media/
├── all.py
├── channels.pyx
├── __init__.py
├── __pycache__
└── wav.py

1 directory, 4 files


On Saturday, May 2, 2020 at 9:56:18 AM UTC+2, Dima Pasechnik wrote:
On Sat, May 2, 2020 at 12:46 AM John H Palmieri <jhpalm...@gmail.com> wrote:
>
> Did you mean 9.2? It's too late to add deprecations to 9.1, in my opinion.
>

be it 9.1 or 9.2, it's certainly a good idea to deprecate and remove.

>
> On Friday, May 1, 2020 at 2:19:32 PM UTC-7, Matthias Koeppe wrote:
>>
>> These modules have a very limited amount of code, seem to have seen no major development for about 10 years, and are (with minor exceptions) unused in the rest of Sage.
>>
>> Potential users will be better off with looking for mainstream libraries in the Python ecosystem, or with interfacing with Python, etc.
>>
>>
> --
> 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-...@googlegroups.com.

Vincent Delecroix

unread,
May 2, 2020, 12:02:05 PM5/2/20
to sage-...@googlegroups.com
If anything is broken, removing is fine with me.

Otherwise, *each* class/function in each of these modules must
be endowed with a very explicit deprecation warning pointing to
the better upstream equivalent. I do not see why there should be
any exception with our deprecation policy.

Le 02/05/2020 à 14:15, Sébastien Labbé a écrit :
> At least, I know that module sage/finance/stock.py is completely broken. A
> warning was added in trac ticket #25473 <https://trac.sagemath.org/25473>
>> an email to sage-...@googlegroups.com <javascript:>.

Matthias Koeppe

unread,
May 2, 2020, 2:23:34 PM5/2/20
to sage-devel
On Saturday, May 2, 2020 at 9:02:05 AM UTC-7, vdelecroix wrote:
If anything is broken, removing is fine with me.

Otherwise, *each* class/function in each of these modules must
be endowed with a very explicit deprecation warning pointing to
the better upstream equivalent. I do not see why there should be
any exception with our deprecation policy.


I agree with both of these points.

And yes, I guess I meant to suggest doing this for 9.2, right after 9.1 is released.

Matthias Koeppe

unread,
May 2, 2020, 2:29:23 PM5/2/20
to sage-devel
On Saturday, May 2, 2020 at 11:23:34 AM UTC-7, Matthias Koeppe wrote:
 I meant to suggest doing this for 9.2, right after 9.1 is released.

I have added a link to this thread to https://wiki.sagemath.org/ReleaseTours/sage-9.2

Travis Scrimshaw

unread,
May 3, 2020, 7:24:23 PM5/3/20
to sage-devel
It might also be good to also include a message in the deprecation saying if you use this to maybe either a) implement an interface to the library or b) contact sage-devel regarding the desire to keep this feature.

Best,
Travis

kcrisman

unread,
May 4, 2020, 8:26:55 AM5/4/20
to sage-devel


On Sunday, May 3, 2020 at 7:24:23 PM UTC-4, Travis Scrimshaw wrote:
It might also be good to also include a message in the deprecation saying if you use this to maybe either a) implement an interface to the library or b) contact sage-devel regarding the desire to keep this feature.



That is a pretty good idea - at least the "stats" it is conceivable someone is using, since otherwise one has to explicitly use R/gsl/other stats interfaces and that is obviously with a different syntax than the usual Sage.  But I wouldn't be surprised if even that was rarely used.

kcrisman

unread,
May 7, 2020, 8:46:00 AM5/7/20
to sage-devel
Were there any tickets opened related to this?  I didn't see anything linked to that on the wiki link Matthias posted.

In particular, I am wondering whether the stats module might be in a different category than the others.  At the very least, even if "Sage-native" functionality were removed, it probably should be replaced with good documentation about how to use pandas or something similar from within Sage - something even a harried stats instructor who happens to be familiar with Sage could use.  

Matthias Koeppe

unread,
May 7, 2020, 11:40:11 AM5/7/20
to sage-devel
On Thursday, May 7, 2020 at 5:46:00 AM UTC-7, kcrisman wrote:
Were there any tickets opened related to this?  I didn't see anything linked to that on the wiki link Matthias posted.


No tickets yet -- please feel free to open tickets to flesh out the way forward regarding stats that you have in mind.
 

kcrisman

unread,
May 7, 2020, 9:24:08 PM5/7/20
to sage-devel



Were there any tickets opened related to this?  I didn't see anything linked to that on the wiki link Matthias posted.


No tickets yet -- please feel free to open tickets to flesh out the way forward regarding stats that you have in mind.
 

Thanks.  Yeah, I feel like removing functions like "mean" and "median" that beginners might look for is not a good idea, but we can also add good references to other sources. See https://trac.sagemath.org/ticket/29662 and https://trac.sagemath.org/ticket/29663 for a start.

Matthias Koeppe

unread,
May 8, 2020, 12:08:52 AM5/8/20
to sage-devel
On Thursday, May 7, 2020 at 6:24:08 PM UTC-7, kcrisman wrote:

No tickets yet -- please feel free to open tickets to flesh out the way forward regarding stats that you have in mind.
 

Thanks.  Yeah, I feel like removing functions like "mean" and "median" that beginners might look for is not a good idea, but we can also add good references to other sources. See https://trac.sagemath.org/ticket/29662 and https://trac.sagemath.org/ticket/29663 for a start.


Thanks for opening the tickets. A first thing to note is that Python 3.4 added basic stats functions: https://docs.python.org/3/library/statistics.html

 

Matthias Koeppe

unread,
Aug 26, 2021, 2:49:59 PM8/26/21
to sage-devel
The following tickets are now ready for review:

https://trac.sagemath.org/ticket/32427 -- Deprecate sage.finance

Reply all
Reply to author
Forward
0 new messages