pvlib / pvlib-python

A set of documented functions for simulating the performance of photovoltaic energy systems.
https://pvlib-python.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.19k stars 998 forks source link

define/improve documentation structure #329

Open wholmgren opened 7 years ago

wholmgren commented 7 years ago

We should consider implementing the documentation structure ideas described in this pycon 2017 talk and associated blog post:

https://www.youtube.com/watch?v=azf6yzuJt54

https://www.divio.com/en/blog/documentation/

My hope is that a more clearly defined documentation structure will help users identify how they can easily contribute to the documentation.

If people are interested and willing to commit the time to produce more how-to and tutorial content, I would volunteer to improve the documentation infrastructure and then help users get content into the documentation. Ideally, adding to the documentation would be as easy as adding a new jupyter notebook, markdown, or rst file to a source/howtos or source/tutorials directory. This would be a post-PVSC project.

cwhanse commented 4 years ago

@wholmgren what do you think about SunPy's documentation structure? Looking around at other projects to find a model for pvlib-python

wholmgren commented 4 years ago

I like it. I suggest we pursue that refactoring once #846 is merged.

wholmgren commented 4 years ago

I also like where MetPy is going here https://github.com/Unidata/MetPy/pull/1457

kandersolar commented 4 years ago

I just stumbled on this -- too late for this year I guess, but maybe next year: https://developers.google.com/season-of-docs

mikofski commented 4 years ago

There's also outreachy:

Outreachy internship projects may include programming, user experience, documentation, illustration, graphical design, or data science.

Altho I believe Google Season of Docs recruits professional tech writers who probably need considerably less oversight than an intern.

kandersolar commented 2 years ago

FYI the Divio link is now broken (but is still on archive.org). Here is an updated link that seems to have more detail than the original page did: https://documentation.divio.com/

I had a hard time understanding the differences between "Tutorials" and "How-To Guides" until I saw this table again:

  Most useful when we’re studying Most useful when we’re coding
Practical steps Tutorials How-to guides
Theoretical knowledge Explanation Reference

So at a basic level, "how-to" guides are for people that are already writing code but want something to copy/paste for their specific task. Tutorials are for people who are looking to learn and the exact content doesn't need to be immediately applicable.

Anyway here is a first attempt at recategorizing our current docs with the Divio structure:

Divio category Divio analogy Current docs examples
Tutorials Classroom lesson Some of our gallery examples, sort of
How-To Guides Cookbook recipe Most of our current gallery examples, sort of
Explanation High-level discussion Most user's guide pages; maybe some gallery examples
Reference Encyclopedia entry API Reference pages, Variables & Symbols page

I propose this strategy to guide reworking our existing content and adding new content in the future:

With that strategy in mind, I see two main areas for improvement:

I declare this wall of text complete and solicit your feedback.

cwhanse commented 2 years ago

+1 to the proposed strategy. The Intro Tutorial was intended for beginners, but I think our idea of a beginner was someone who already knew python and had some understanding of PV production modeling and needed to know how to use pvlib. I'd rather not try to teach PV power modeling by means of the pvlib docs, but we could copy the process figure from pvpmc.sandia.org if we think we need something.

I would like the API reference to become easier to use. Functions are not in alphabetical order, full paths are displayed (e.g., pvlib.clearsky.bird) and some methods are mixed in with base layer functions (pvlib.location.Location.get_clearsky) is in the "Clear sky" category.

adriesse commented 2 years ago

In terms of priorities, I would see API as number one and the rest as nice to have.

wholmgren commented 2 years ago

@kanderso-nrel thanks for the careful analysis. It's hard for me to see how we go from here to there without a single enormous PR from a hero (i.e. you :) ). But maybe as a first step we could rewrite a few examples and create two categories.

The API reference worked a lot better before we adopted the pydata sphinx theme. For example, see 0.8.0 API docs. I haven't kept up with it, but maybe a newer version of pydata sphinx theme would help with general readability too.

kandersolar commented 2 years ago

Agreed the new theme really makes a mess of the API reference. The problem is that, in the new theme, the left sidebar is for listing sub-pages and in-page sections go in the right sidebar, whereas the old theme put them both in the left sidebar. I will try to figure out some way to improve this.

It's hard for me to see how we go from here to there without a single enormous PR

Yeah. Maybe some alternative workflow would make sense here, like sending PRs to an intermediate (non-master) branch to allow smaller piecemeal reviews without making a mess of master in the meantime. I think more thought is needed about how specifically the docs would change, and then maybe a sensible implementation plan will emerge.