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

Various modifications for ProPlot #91

Closed
wants to merge 19 commits into from

Conversation

lukelbd
Copy link
Contributor

@lukelbd lukelbd commented Nov 25, 2019

Not sure if you guys will necessarily want to merge this as it changes some core behavior, but I forked this for use with my proplot project and added the following features:

  • Skip over class methods that are public, but do not have their own __doc__ attributes. This prevents inheriting and displaying documentation from external projects, namely matplotlib.
  • Include __getitem__, __getattr__, __setitem__, and __setattr__ in the list of builtin methods that are not ignored by the documentation generator. I use these to document some dictionary/list subclasses.
  • Give class methods and attributes their own stub pages, instead of putting all class methods and attributes on a single page. This also required adding the new files to env.found_docs and reordering the event hooks in automodsumm.py so that sphinx_automodapi is called before autosummary. This way autosummary sees the new class pages and builds the appropriate stubs.

Related:

…odsumm before automodapi in sphinx event queue

Debug readthedocs

Testing

Testing

Fix
Update version

Bugfix
Tmp

Test version increment

Version

Tag

Tag

Version

Tag

New version

No version change

Test

Incr version

Test

Change

Version

Version

Revert
Readme

Readme

Minor
@lukelbd lukelbd changed the title Proplot mods Various modifications for ProPlot Nov 25, 2019
@lukelbd
Copy link
Contributor Author

lukelbd commented Dec 1, 2019

Let me know if you guys have any interest in merging this (I can squash and force-push the messy history).

If so I could implement these features as configurable options so the changes are backwards compatible, e.g. an automodsumm_ignore_nodoc = True to skip methods with __doc__ == None, automodsumm_include_methods = ['__init__', '__call__', '__getitem__', ...] to explicitly include certain private and hidden methods (the default would just be __init__ and __call__), and automodsumm_method_stubs = True to enable individual pages for method stubs. Would be relatively simple.

@astrofrog
Copy link
Member

astrofrog commented May 15, 2020

@lukelbd - thanks for the PR and sorry for not responding sooner! I think some of these options sound like they would be useful to some users although for example for astropy we wouldn't want one page per method/attribute since we we would end up with waaaay too many pages. This PR as-is also includes a lot of changes that are specific to the proplot fork, e.g. the changes to the readme and so on. So I was wondering if you could open a separate PR for each conceptually different addition, and indeed avoid changing the default behavior, but make these things configurable as mentioned in your latest comment? I think all three features could be merged in if they were configurable and defaulted to the current behavior.

@lukelbd
Copy link
Contributor Author

lukelbd commented May 18, 2020

@astrofrog Sounds good! I'll do that when I get the chance, maybe some weekend later this month. Will close this PR since it will be replaced by 3 others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants