ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 21 Jun 2012 12:12:20 +0200Submitting a module to Sage trac with supporting test code and documentationhttps://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/Hi all:
I recently wrote
1. a new Python module for Sage
2. a Python module that tests (1) using the unittest module
3. a PDF document describing the mathematical background for the algorithms in (1)
I want to submit all three of these to the Sage trac server for reviewers to refer to. Is that a good idea? If so, what's the best way to do that? I know how to submit (1) as a patch, but what about (2) and (3)?
Thanks.Wed, 20 Jun 2012 01:38:05 +0200https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/Comment by benjaminfjones for <p>Hi all:</p>
<p>I recently wrote </p>
<ol>
<li>a new Python module for Sage </li>
<li>a Python module that tests (1) using the unittest module </li>
<li>a PDF document describing the mathematical background for the algorithms in (1)</li>
</ol>
<p>I want to submit all three of these to the Sage trac server for reviewers to refer to. Is that a good idea? If so, what's the best way to do that? I know how to submit (1) as a patch, but what about (2) and (3)?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19558#post-id-19558The test module could also be submitted as a patch and invoked as part of the Sage doctests of the main module. If appropriate, the document describing the algorithms could be upload to the arXiv for posterity.Wed, 20 Jun 2012 13:38:18 +0200https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19558#post-id-19558Answer by kcrisman for <p>Hi all:</p>
<p>I recently wrote </p>
<ol>
<li>a new Python module for Sage </li>
<li>a Python module that tests (1) using the unittest module </li>
<li>a PDF document describing the mathematical background for the algorithms in (1)</li>
</ol>
<p>I want to submit all three of these to the Sage trac server for reviewers to refer to. Is that a good idea? If so, what's the best way to do that? I know how to submit (1) as a patch, but what about (2) and (3)?</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?answer=13732#post-id-13732I don't think we would want random pdf documents included in Sage. Sage supports fairly arbitrary LaTeX using jsmath (soon to be MathJax), so if you really needed to include it (as opposed to link to an article), you could do so in the documentation, especially at the top of the file.
You also don't need to include a separate testing module using unittest; instead, just use the usual Sage doctest framework to include lots of examples (see pretty much any file for examples, or [the Sage developer guide section on coding conventions in Sage](http://sagemath.org/doc/developer/conventions.html). If you really needed to, you could even include a separate testing module using those same conventions.Wed, 20 Jun 2012 12:20:21 +0200https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?answer=13732#post-id-13732Comment by kcrisman for <p>I don't think we would want random pdf documents included in Sage. Sage supports fairly arbitrary LaTeX using jsmath (soon to be MathJax), so if you really needed to include it (as opposed to link to an article), you could do so in the documentation, especially at the top of the file.</p>
<p>You also don't need to include a separate testing module using unittest; instead, just use the usual Sage doctest framework to include lots of examples (see pretty much any file for examples, or <a href="http://sagemath.org/doc/developer/conventions.html">the Sage developer guide section on coding conventions in Sage</a>. If you really needed to, you could even include a separate testing module using those same conventions.</p>
https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19550#post-id-19550You can put in a test module, but it will probably get 'needs work' if it's not in the Sage standard format for tests. But that is a discussion that can happen at the ticket - go ahead and open a ticket and post a patch!Thu, 21 Jun 2012 12:12:20 +0200https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19550#post-id-19550Comment by araichev for <p>I don't think we would want random pdf documents included in Sage. Sage supports fairly arbitrary LaTeX using jsmath (soon to be MathJax), so if you really needed to include it (as opposed to link to an article), you could do so in the documentation, especially at the top of the file.</p>
<p>You also don't need to include a separate testing module using unittest; instead, just use the usual Sage doctest framework to include lots of examples (see pretty much any file for examples, or <a href="http://sagemath.org/doc/developer/conventions.html">the Sage developer guide section on coding conventions in Sage</a>. If you really needed to, you could even include a separate testing module using those same conventions.</p>
https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19556#post-id-19556Thanks. OK, i'll put the PDF on arXiv and reference it in the module. Regarding the separate unittest test module, i already wrote it and found it more convenient to write and use than putting the tests in the main module's docstrings. So, if it's OK to still use it, do i just submit it as a separate patch? Wed, 20 Jun 2012 19:40:46 +0200https://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/?comment=19556#post-id-19556