Skip to content

Conversation

@benelot
Copy link
Contributor

@benelot benelot commented Feb 26, 2020

  • Setup sphinx
  • Configure the sphinx extensions (comment extraction etc.)
  • Format the code comments

I set the format style to numpy style, even though we are still far from it. For this to change I certainly need your help to know which parts have to be commented.

@benelot
Copy link
Contributor Author

benelot commented Feb 26, 2020

The current state can be uploaded to readthedocs as soon as the repository is public. I think we have to discuss which parts of the library are meant to be public and as such need intensive documentation and which parts are not meant to be internal and thus do need less documentation.

@benelot benelot requested review from WillemWybo and jakobj February 26, 2020 12:56
@benelot benelot self-assigned this Feb 26, 2020
@benelot benelot added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Feb 26, 2020
@benelot benelot mentioned this pull request Feb 26, 2020
@benelot benelot linked an issue Feb 26, 2020 that may be closed by this pull request
@WillemWybo
Copy link
Collaborator

WillemWybo commented Feb 26, 2020

I get an error when trying to compile the sphinx file with sh renew-sphinxdoc.sh

Sphinx error:
master file /Users/wybo/Code/NEAT_public/docs/source/contents.rst not found
make: *** [html] Error 2

@benelot
Copy link
Contributor Author

benelot commented Feb 26, 2020

weird, there is contents.rst in my folder and it should not be required...can you see what happens if you put an empty contents.rst file into the source folder and run the script again?

@WillemWybo
Copy link
Collaborator

If I do that it works. Seems like it does quite a reasonable job already for many functions (although some docstrings seem to be randomly missing, not sure why. It prints a lot of warnings but not necessarily on the missing functions.

@benelot
Copy link
Contributor Author

benelot commented Feb 26, 2020

Yes, we can work through the warnings and see what they are caused by. If some of your files contain code that is not either in a function, class or if name == 'main': condition, then they might be executed during the sphinx inspection.

@benelot benelot changed the title [WIP] Sphinx docs Sphinx docs Feb 26, 2020
@benelot
Copy link
Contributor Author

benelot commented Feb 26, 2020

Ready to merge!

@WillemWybo
Copy link
Collaborator

It seems that getting rid of all non-API modules i.e. neat.tools.kernelextraction or neat.tools.fittools.zerofinding would already remove a lot of the warnings. The website that is rendered for me is also not in the nice format of https://networkx.github.io/documentation/networkx-1.10/overview.html

@WillemWybo WillemWybo merged commit b50955d into nest:python3 Feb 26, 2020
@benelot
Copy link
Contributor Author

benelot commented Feb 26, 2020

You are right, we could just exclude that from the documentation, there is a feature for that. The format is just a theme I think, I will check how to do it from the sphinx source they have at their github repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate documentation

2 participants