Ask Your Question
3

Atomatic building of documentation for a custom library

asked 12 years ago

Jesustc gravatar image

Hi there,

I have created a .sage file with functions of my own, and have documented every function following http://www.sagemath.org/doc/developer...

Is there a way of generating automatically a pdf or html with the docstring of every function in the library, such as the ones in the sage documentation?

Or, more or less the same: can I use something like 'sage -docbuild' for a custom file (with standard doctrings)?

Cheers!

Preview: (hide)

Comments

Well, it *is* possible if you add your file to your Sage installation (presumably as a .py file?) and then add it to the list of things in the reference manual. But I think you mean as a separate file.

kcrisman gravatar imagekcrisman ( 12 years ago )

I do, thanks.

Jesustc gravatar imageJesustc ( 12 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

I don't think this is possible now, but it's an interesting idea. I wonder how hard it would be to implement.

Preview: (hide)
link

Comments

I wouldn't imagine it would be that hard, if we could just automate the sphinx quickstart thing to add the files and then do whatever magic extracts the function definitions in Sage's ReST format. I'd be very open to reviewing any work you do on that ;)

kcrisman gravatar imagekcrisman ( 12 years ago )
1

I've been playing with it for the last day. I may have something soon. One issue is to decide where to do the building; I think it makes most sense to do everything in the user's .sage directory.

John Palmieri gravatar imageJohn Palmieri ( 12 years ago )
1

Shame on me: http://ask.sagemath.org/question/432/using-sphinx-to-document-a-module-using-sage. Still, I would say it is not a perfect solution.

Jesustc gravatar imageJesustc ( 12 years ago )

I had a feeling, but was also too lazy... not perfect, but certainly doable.

kcrisman gravatar imagekcrisman ( 12 years ago )
2

See also http://trac.sagemath.org/sage_trac/ticket/13679. This works for me with .py and .sage files, but not with .pyx files.

John Palmieri gravatar imageJohn Palmieri ( 12 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 12 years ago

Seen: 436 times

Last updated: Nov 01 '12