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 a description of how something is registered to the docs #3732

Closed
matt-gardner opened this issue Feb 5, 2020 · 1 comment
Closed

Add a description of how something is registered to the docs #3732

matt-gardner opened this issue Feb 5, 2020 · 1 comment

Comments

@matt-gardner
Copy link
Member

@matt-gardner matt-gardner commented Feb 5, 2020

I would be nice to show in the docs how a particular class is registered, both what name it has and what constructor is used. Especially for something like Vocabulary, which is registered three times with different names and constructors.

Not sure if it's possible to do this programmatically, or if we just need to include a section in docstrings for this.

@matt-gardner

This comment has been minimized.

Copy link
Member Author

@matt-gardner matt-gardner commented Mar 22, 2020

I looked into the pydoc code that we're using (which is actually a fork of pydoc-markdown, with a main entry point that can be found here, for future interested readers: https://github.com/justindujardin/mathy/blob/master/libraries/mathy_pydoc/mathy_pydoc/__main__.py). It looked like if we want to customize things to get allennlp-specific docs (like, have certain decorators get special treatment), we'd basically have to maintain our own fork of pydoc-markdown. It's not a super large amount of code, but it's not trivial, either, and it's not something I want to look into right now.

For now, it looks like the best solution to this is to just make sure that everything that is registered mentions this in its docstring. I'm going to start on this now.

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

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.