On 1/13/08, Lars Fischer <[EMAIL PROTECTED]> wrote:
>
> Thank you for your answer,
>
> > 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,
>
> We are working on all four points and ( 2 and 3 are already there). At
> the moment we want to test our file.
>
> Our problem is like this:
> sage quadratic-modules.sage
> cp quadratic-modules.py $SAGE_ROOT/devel/sage/sage/tests/qm1.py
> cp quadratic-modules.py $SAGE_ROOT/devel/sage/build/sage/tests/qm2.py
>
> sage:import sage.tests.qm1
> ---------------------------------------------------------------------------
> <type 'exceptions.ImportError'>

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

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to