-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 examples to docstrings #62
Comments
We definitely need more examples in the docs. I don't know if we need an example for absolutely everything, though. In any case, we probably will want to change the documentation formatting to 1 page per function. I don't have any experience using |
Any decision on this? |
@mikofski I support adding brief examples to the function docstrings where they would be useful. Personally, I find documentation pages structured like ModelChain and Clearsky to be more useful, so that's where I've focused my documentation efforts. But I encourage people that want small examples for each function to take on the effort. So I lean toward leaving this generic issue open. What do you think? |
can I try to do this sir. |
Certainly. Are you somewhat familiar with PV system modeling? That would help with forming examples. It would be best to take this up in small pieces. Maybe the file |
ok ill start with the iam.py file, thanks for the boost. |
We should decide whether we want to add examples to the docstrings of the functions or not.
While (I think) examples are not included in every pandas object, they are in numpy. numpydoc has an optional section for examples.
I would like to include examples and also I would like to use doctests.
For the moment we have some examples, but some doctests fail
(see output of
nosetests -v -w pvlib --with-coverage --cover-package=pvlib --with-doctest
).I once had a discussion with pandas developers (see pandas-dev/pandas#3439) and they didn't see their examples as tests.
However for pvlib,
doctest
may have an additional benefit for testing purposes and also it tests if our documentation is up to date with the state of the objects we document.The text was updated successfully, but these errors were encountered: