Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a description of how something is registered to the docs #3732
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
Not sure if it's possible to do this programmatically, or if we just need to include a section in docstrings for this.
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.