ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 24 Aug 2017 02:40:27 -0500Should I / how should I make an optional sage package?http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.
Is this a good thing to do?
If so, what are the steps?
My code is all in .sage files, but I could easily turn it into .py files if that is better.
Tue, 22 Aug 2017 15:49:01 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/Comment by kcrisman for <p>I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.</p>
<p>Is this a good thing to do?</p>
<p>If so, what are the steps?</p>
<p>My code is all in .sage files, but I could easily turn it into .py files if that is better.</p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38627#post-id-38627This is a timely question as more and more people are starting to think of whether to have an optional package versus a pip installable versus just code lying around - it really depends upon use case; all three would have to have some maintenance involved.Wed, 23 Aug 2017 05:38:02 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38627#post-id-38627Answer by mforets for <p>I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.</p>
<p>Is this a good thing to do?</p>
<p>If so, what are the steps?</p>
<p>My code is all in .sage files, but I could easily turn it into .py files if that is better.</p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38626#post-id-38626a recent talk by Marc Masdeu about distributing Sage/Python code is worth mentioning: [Sage Days 87, p-adics, Burlington, Vermont, July 2017](http://mat.uab.cat/~masdeu/research/slides/)Wed, 23 Aug 2017 03:20:37 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38626#post-id-38626Comment by mforets for <p>a recent talk by Marc Masdeu about distributing Sage/Python code is worth mentioning: <a href="http://mat.uab.cat/~masdeu/research/slides/">Sage Days 87, p-adics, Burlington, Vermont, July 2017</a></p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38636#post-id-38636don't hesitate to report problems / feedback ! the `sage_sample` template that i've used successfully (docs, linked with Travis CI, etc) is [mkoeppe's fork](https://github.com/mkoeppe/sage_sample).
see also this recent repository: [sage_package_template](https://github.com/mmasdeu/sage_package_template).Thu, 24 Aug 2017 02:40:27 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38636#post-id-38636Comment by paragon for <p>a recent talk by Marc Masdeu about distributing Sage/Python code is worth mentioning: <a href="http://mat.uab.cat/~masdeu/research/slides/">Sage Days 87, p-adics, Burlington, Vermont, July 2017</a></p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38635#post-id-38635This looks like it might be a good way to go if I can figure it out.Thu, 24 Aug 2017 01:45:53 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38635#post-id-38635Answer by eric_g for <p>I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.</p>
<p>Is this a good thing to do?</p>
<p>If so, what are the steps?</p>
<p>My code is all in .sage files, but I could easily turn it into .py files if that is better.</p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38624#post-id-38624Thanks for your willingness to share your code. Maybe a good place to start is to read [Sage developer's guide](http://doc.sagemath.org/html/en/developer/), especially its section [Packaging Third-Party Code](http://doc.sagemath.org/html/en/developer/packaging.html). You may also have a look at this [discussion about various options for sharing Sage codes](https://wiki.sagemath.org/CodeSharingWorkflow). Wed, 23 Aug 2017 02:24:59 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38624#post-id-38624Answer by FrédéricC for <p>I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.</p>
<p>Is this a good thing to do?</p>
<p>If so, what are the steps?</p>
<p>My code is all in .sage files, but I could easily turn it into .py files if that is better.</p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38625#post-id-38625Another way is to make a pip module, for example
https://pypi.python.org/pypi/surface_dynamics/
or
https://pypi.python.org/pypi/multipolynomial_bases/
I do not know if there is documentation somwhere on how to do that.Wed, 23 Aug 2017 02:26:51 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?answer=38625#post-id-38625Comment by Emmanuel Charpentier for <p>Another way is to make a pip module, for example</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/multipolynomial_bases/">https://pypi.python.org/pypi/multipol...</a></p>
<p>I do not know if there is documentation somwhere on how to do that.</p>
http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38628#post-id-38628Hmmm... sounds a bit hyperspecialized for use in Python *without* sage (or at least without the sage library...).Wed, 23 Aug 2017 08:28:30 -0500http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/?comment=38628#post-id-38628