It would be much much better if you would
(1) make your code work as part of the Sage library (i.e., as python
code that is in SAGE_ROOT/devel/sage/sage/)
(2) release your code under the GPL,
(3) make sure there are lots of doctests, and
(4) submit it as an mercurial/hg patch to us,
so that it can get (a) refereed, (b) be included in every
version of sage, and (c) make sure it continues to work
even as we change and improve Sage (because we'll
always run all your doctests and if they fail then we'll
be notified and fix things).
-- William
You *must* modify SAGE_ROOT/devel/sage/setup.py and add a new
module called tests (or whatever). You also *must* create a file
tests/__init__.py so Python knows that tests is a module. Then
do "sage -br" to startup sage and copy over any new code.
> but
> sage: import sage.tests.qm2
> works.
>
> I thought a spkg-install script would be the right place to deal with
> "copying files around",
> sage -b does not care about $SAGE_ROOT/devel/sage/sage/modules/
> quadratic-modules.sage
>
>
> So here are two new questions:
> How can we import our file into a sage session instead of attaching
> it?
> Is there a script for appending our file to the different all.py files
> (or should we do it by hand and put it in the patch)?
>
> With best regards,
> Lars Fischer
>
> >
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
> So here are two new questions:
> How can we import our file into a sage session instead of attaching
> it?
> Is there a script for appending our file to the different all.py files
> (or should we do it by hand and put it in the patch)?
You should do that by hand, and use your judgment about what to import.
William
[integrating your code into the Sage library]
If you get frustrated, please do _not_ hesitate to post to sage-support
with questions. We definitely *do* want your code. It's just that
in the long-run integrating it into the Sage library is optimal, since it
means a good refereeing process, and that your code will be maintained
in the longrun. Actually, I kind of think that if we keep pushing this
approach and do it right, it will gain some credibility and perhaps someday
it will be the future of publishing mathematical code. And of course
every such "publication" would definitively make Sage a more capable
and well tested system.
-- William