Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sphinx extension and autogen function for documenting config options #458

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

takluyver
Copy link
Member

This is the machinery we prototyped for documenting IPython config options. By defining a simple Sphinx extension, individual config options can be linkable, cross-referenceable, and nicely searchable.

It was always my intention to move this into traitlets so we can easily use it for other Jupyter applications. I'm not aware of any problems since we started using it for IPython.

@minrk minrk merged commit c6faed1 into ipython:master Nov 14, 2017
@minrk minrk added this to the 5.0 milestone Nov 14, 2017
@rmorshea
Copy link
Contributor

@takluyver Out of curiosity, does this supersede some prior automatic documentation systems that have been proposed, or would this compliment one?

@takluyver
Copy link
Member Author

I'm not sure which systems you're referring to. In some ways it supersedes the method in traitlets to generate rst docs, but the new function produces rst that is only valid in Sphinx with the extension loaded, so it's not a drop-in replacement for the older one.

@rmorshea
Copy link
Contributor

I had proposed #261 some time ago, though it definitely needs to be rewritten. The goal was to update cls.__doc__ with information about the traits owned by cls. I'm not sure whether that would compliment or conflict with this work.

@takluyver
Copy link
Member Author

On the face of it, I think this is complementary to #261. That's focused on documenting traitlets within a Python API, for interactive inspection and for API docs. This is specifically about documenting traitlets used as application config - so the starting point is an application rather than a class, it only selects configurable traits, and it focuses on things like command line aliases.

The main motivation for this is that I want to be able to link people to individual config options in our docs.

@takluyver takluyver deleted the sphinxext branch November 15, 2017 19:12
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-minor rereviewed, minor change need to be put in changelog. labels Jun 4, 2020
@Carreau Carreau added 5.0-major Major change in 5.0 need proper documentation and removed 5.0-minor rereviewed, minor change need to be put in changelog. 5.0-re-review Need to re-review for potential API impact changes. labels Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0-major Major change in 5.0 need proper documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants