how to readthedocs

26
How to (Really) ReadTheDocs https://readthedocs.org/ John Costa @johncosta Wednesday, October 23, 13

Upload: john-costa

Post on 23-Jan-2015

498 views

Category:

Technology


0 download

DESCRIPTION

DjangoMaine October Meet-up Slides for John Costa's talk on ReadTheDocs

TRANSCRIPT

Page 1: How to ReadTheDocs

How to (Really)ReadTheDocs

https://readthedocs.org/ John Costa@johncosta

Wednesday, October 23, 13

Page 2: How to ReadTheDocs

About Me

Developer Support Engineer at DotCloud

Introduced to Python through Django when 0.96 was released.

Wednesday, October 23, 13

Page 3: How to ReadTheDocs

Overview

Documentation In General

ReadTheDocs - What is it?

ReadTheDocs - Setting up an open source project

Wednesday, October 23, 13

Page 4: How to ReadTheDocs

Documentation

How many people document their code?

Why bother?

Wednesday, October 23, 13

Page 5: How to ReadTheDocs

DocumentationWhy?

Not all code is obvious. Complex code is complex.

Business rules may be readable, but don’t explain why they are there.

Finding details takes a long time...it wastes money to keep re-finding these details

Wednesday, October 23, 13

Page 6: How to ReadTheDocs

DocumentationWhy?

Dependencies between systems may not be obvious

Helps keep your project in scope (maybe) :)

Not everyone is thinking in the same context at the same time.

Wednesday, October 23, 13

Page 7: How to ReadTheDocs

DocumentationWhat?

Dependencies

Installation instructions

Guides - like a readme

Things like change logs

Information about supported languages, runtime, and tool versions

Wednesday, October 23, 13

Page 8: How to ReadTheDocs

DocumentationWhere?

In a wiki?

What happens when code changes?

What if you need to support multiple versions?

Self hosted, self managed process (script that rebuilds documentation)

Wednesday, October 23, 13

Page 9: How to ReadTheDocs

Documentation“Readability is a primary focus for Python developers, in both project and code documentation.” - Kenneth Reitz, The Hitchhiker's Guide to Python (python-guide)

“Documentation is communication” - Jacob Kaplan-Moss, pycon-2011-writing-great-documentation

Wednesday, October 23, 13

Page 10: How to ReadTheDocs

ReadTheDocsFree(!!) hosting for Open Source documentation

Created by Eric Holscher, Charles Leifer, and Bobby Grace for the 2010 Django Dash

Goals:

It was created to make hosting documentation simple!

To create a central platform for people to find documentation (search)

Wednesday, October 23, 13

Page 11: How to ReadTheDocs

ReadTheDocsArchitecture

Wednesday, October 23, 13

Page 12: How to ReadTheDocs

Read The Docs

Documentation Start

RTD Setup

RTD Post-Commit Hook

Wednesday, October 23, 13

Page 13: How to ReadTheDocs

ReadTheDocsDocumentation Start

$ pip install sphinx$ mkdir docs && cd docs$ sphinx-quickstart

$ make html

Wednesday, October 23, 13

Page 14: How to ReadTheDocs

ReadTheDocsRTD Setup

Wednesday, October 23, 13

Page 15: How to ReadTheDocs

ReadTheDocsRTD Setup

Wednesday, October 23, 13

Page 16: How to ReadTheDocs

ReadTheDocsRTD Setup

Wednesday, October 23, 13

Page 17: How to ReadTheDocs

ReadTheDocsRTD Post-Commit Hook

Wednesday, October 23, 13

Page 18: How to ReadTheDocs

ReadTheDocsRTD Post-Commit Hook

Wednesday, October 23, 13

Page 19: How to ReadTheDocs

ReadTheDocsRTD Post-Commit Hook

Wednesday, October 23, 13

Page 20: How to ReadTheDocs

ReadTheDocsPrivate RTD

Can you do it...yes!

Set it up like any other django application stack

Or (beta)

Wednesday, October 23, 13

Page 21: How to ReadTheDocs

Things We Didn’t talk about

Sphinx

ReStructuredText(reST)

Documentation Conventions

Wednesday, October 23, 13

Page 24: How to ReadTheDocs

Resources/References

https://docs.readthedocs.org/en/latest/index.html

http://programmers.stackexchange.com/questions/121775/why-should-you-document-code/121787

http://programmers.stackexchange.com/questions/152325/where-to-put-code-documentation

Wednesday, October 23, 13

Page 26: How to ReadTheDocs

Thank You!@johncosta

Wednesday, October 23, 13