On development workflows for sharing (experimental) code

212 views
Skip to first unread message

Nicolas M. Thiery

unread,
May 3, 2016, 10:59:05 AM5/3/16
to sage-...@googlegroups.com
Dear Sage developers,

Tangentially to the recent discussion about modularity of the Sage
library and support for packages on top of Sage, I have started
writing some notes about the different workflows that have been used
to develop and share code, either "on top of Sage", or "to be
integrated in Sage":

https://wiki.sagemath.org/CodeSharingWorkflow

This is rather preliminary and biased from my experience with
Sage-Combinat, and lacks many of the points that have been discussed
(e.g. the idea of affiliated packages). Please hack in and complement
with your vision!

I hope to be able to flesh out a bit soon the ideas at the end about
monkey patching; but for that I need to put it to actual use :-)

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

Kwankyu Lee

unread,
May 3, 2016, 8:57:02 PM5/3/16
to sage-devel, Nicolas...@u-psud.fr
Thank you for starting and sharing this.

Eric Gourgoulhon

unread,
May 4, 2016, 8:56:36 AM5/4/16
to sage-devel, Nicolas...@u-psud.fr
Thank you Nicolas for this page which is very instructive.
I've added some comments on SageManifolds workflow.

Best wishes,

Eric.

Nicolas M. Thiery

unread,
May 6, 2016, 8:38:10 AM5/6/16
to Eric Gourgoulhon, sage-devel
On Wed, May 04, 2016 at 05:56:36AM -0700, Eric Gourgoulhon wrote:
> Thank you Nicolas for this page which is very instructive.

:-)

> I've added some comments on SageManifolds workflow.

Yes, I have seen this; and commented on one of them. Stuff to discuss
at some point, e.g. the upcoming Sage Days.

Btw thank you too to Jeroen and William for your edits!

Eric Gourgoulhon

unread,
May 6, 2016, 9:52:56 AM5/6/16
to sage-devel, egourg...@gmail.com, Nicolas...@u-psud.fr


Le vendredi 6 mai 2016 14:38:10 UTC+2, Nicolas M. Thiéry a écrit :
On Wed, May 04, 2016 at 05:56:36AM -0700, Eric Gourgoulhon wrote:
>    Thank you Nicolas for this page which is very instructive.

:-)

>    I've added some comments on SageManifolds workflow.

Yes, I have seen this; and commented on one of them. Stuff to discuss
at some point, e.g. the upcoming Sage Days.

Indeed! We may even organize a small session on this; I've added it to the list of topics on https://wiki.sagemath.org/days74.

Best wishes,

Eric. 

Samuel Lelievre

unread,
May 6, 2016, 7:27:12 PM5/6/16
to sage-devel, Nicolas...@u-psud.fr


2016-05-03 09:59:05 UTC-5, Nicolas M. Thiéry:
 
Tangentially to the recent discussion about modularity of the Sage
library and support for packages on top of Sage, I have started
writing some notes about the different workflows that have been used
to develop and share code, either "on top of Sage", or "to be
integrated in Sage":

        https://wiki.sagemath.org/CodeSharingWorkflow

This is rather preliminary and biased from my experience with
Sage-Combinat, and lacks many of the points that have been discussed
(e.g. the idea of affiliated packages). Please hack in and complement
with your vision!

Excellent!

I was also preparing a list  of Sage external packages, following
recent discussions around modularization and packaging, in which
several external packages were mentioned.

I updated this list using your page, and put it up at

    https://wiki.sagemath.org/SageMathExternalPackages

Hopefully the two pages can complement and feed each other,
and serve to eventually create a well-structured index of
external packages.

Best, Samuel

Nicolas M. Thiery

unread,
May 23, 2016, 11:51:10 AM5/23/16
to sage-...@googlegroups.com
Dear Sage developers,

In:

https://wiki.sagemath.org/CodeSharingWorkflow

I suggested a variant of the pip package workflow for sharing code,
where the features are dynamically inserted into the Sage library from
code laid out as in the Sage library by recursive monkey patching.

I cleaned up the utility code that I used for this in a few projects,
and released it as an independent pip package:

https://pypi.python.org/pypi/recursive-monkey-patch

For a still rather trivial but complete use case, see:

https://github.com/nthiery/sage-semigroups/

Enjoy!

Matthias Koeppe

unread,
May 20, 2020, 9:37:10 PM5/20/20
to sage-devel
Dear Nicolas and all,

On Tuesday, May 3, 2016 at 7:59:05 AM UTC-7, Nicolas M. Thiéry wrote:

Tangentially to the recent discussion about modularity of the Sage
library and support for packages on top of Sage, I have started
writing some notes about the different workflows that have been used
to develop and share code, either "on top of Sage", or "to be
integrated in Sage":

        https://wiki.sagemath.org/CodeSharingWorkflow

This is rather preliminary and biased from my experience with
Sage-Combinat, and lacks many of the points that have been discussed
(e.g. the idea of affiliated packages). Please hack in and complement
with your vision!


With only 4 years of delay, I have added a brief section on the use of native namespace packages (PEP 420) on that page.
The removal of Python 2 support finally allows us to use this mechanism, which can be a robust alternative to monkey-patching.

Also, in https://trac.sagemath.org/ticket/29705 (Meta-ticket: Modularize sagelib into separate distutils packages) I describe a plan for modularizing sagelib itself, using native namespace packages.


Reply all
Reply to author
Forward
0 new messages