Re: Developing with psage

13 views
Skip to first unread message

William Stein

unread,
Nov 6, 2010, 6:04:27 PM11/6/10
to Nick Alexander, ps...@googlegroups.com
On Sat, Nov 6, 2010 at 12:36 PM, Nick Alexander <ncale...@gmail.com> wrote:
> Hi William,
>
> I installed psage following fairly new instructions about cloning an hg
> repository and using setup.py.

Which instructions? The ones here? http://code.google.com/p/purplesage/

> I installed into a clean sage-4.5 Mac OS X
> 10.5 binary installation.  It seems to work.

I've never tried with 4.5, which is 4 months (!) old.

> But how do you develop?

Quoting from the webpage mentioned above: "(6) If you make changes to
Python code in psage, just reload it or restart sage; the changes are
automatically noticed. If you make changes to Cython code in psage,
type the following to rebuild the Cython extension code in place:
sage setup.py build_ext --inplace $*
"

>  Doctesting seems to be impossible:

I haven't setup a doctesting system for psage yet. I plane to use nose-test:

http://somethingaboutorange.com/mrl/projects/nose/0.11.2/

I might even set this up today... (I need to soon, anyways.) Given
that there is no "100% doctest coverage" requirement for psage, I
might also use unit tests a lot more than in Sage.

> I'm having trouble with directories,
> imports don't seem to work the way I expect (but perhaps my python is
> rusty),

Please give an example. Psage should just be a straightforward
setuptools-based Python project, with a bit of Cython complication
thrown in.
Setuptools: http://peak.telecommunity.com/DevCenter/setuptools

> it isn't clear how the namespace is scoped, etc.

It's just standard Python, I hope.

> Can you blog about
> this?  I have some code that I'd like to get running in this environment but
> there seem to be serious hurdles.

Awesome. It would be cool if you could click the "Create a clone" button here:

http://code.google.com/p/purplesage/source/clones

and push your code to the clone...

(If you have HG issues with ssl, just put "http" instead of "https".)

-- William


--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

William Stein

unread,
Nov 6, 2010, 6:06:17 PM11/6/10
to Nick Alexander, ps...@googlegroups.com
On Sat, Nov 6, 2010 at 3:04 PM, William Stein <wst...@gmail.com> wrote:
> On Sat, Nov 6, 2010 at 12:36 PM, Nick Alexander <ncale...@gmail.com> wrote:
>>  Doctesting seems to be impossible:
>
> I haven't setup a doctesting system for psage yet.  I plane to use nose-test:
>
>   http://somethingaboutorange.com/mrl/projects/nose/0.11.2/
>
> I might even set this up today... (I need to soon, anyways.)   Given
> that there is no "100% doctest coverage" requirement for psage, I
> might also use unit tests a lot more than in Sage.

There is also an issue open for the test suite:

http://code.google.com/p/purplesage/issues/detail?id=8

William

Reply all
Reply to author
Forward
0 new messages