Dan Drake wrote:
> I'm preparing an arXiv submission that will include an appendix of Sage
> code along with a separate .sage file with the code. Working with Sage I
> have come to assume that all code not doctested is broken, so I'd like
> to include doctests. I've written up my docstrings, but when I run "sage
> -t foo.sage", the doctests don't work -- they complain about the
> functions not being defined.
> 
> The doctesting mechanism seems to assume that you're only testing code
> that is available via "from sage import *". Is there a way to run
> doctests on an arbitrary file of Sage code?


Cool.  I just posted a note on Arxiv with a .sage program file, and I'm 
seeing the same problem.  (I thought the doctests passed, but apparently 
they don't and I'm seeing the same problem; I think I got around this 
once by "including" the file as part of the sage standard library and 
then running the doctests.).

Slightly off-topic suggestions for posting to arxiv, for what it's worth:

1. I also included a .sws file for people that use Sage from the 
notebook and would not even consider using Sage from the command line. 
If you do something like that (and maybe even if you include a .sage 
file), you need to tell arxiv to ignore the file (i.e., don't process it 
with their autotex program).  To do that, you can follow the 
instructions here:

http://de.arxiv.org/help/faq/mistakes#auto_ignore

(this is needed in the .sws case since arxiv refuses to proceed when 
there is a bzip2 file in your submission).

2. (this is totally a preference thing) I think it's helpful for people 
if you put that there is a Sage program included in the preprint in the 
comments, just like you would if there was a figure or something.  Plus, 
everyone that gets the arxiv email starts seeing references to Sage 
programs; that helps our marketing department :).


Thanks, and good luck!

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to