Lots of documentation changes

* added a YouCanHelp directive to replace FIXMEs and encourage contributors
  to help out
* moved some bits around between the hacking howto and the codebase documents
* expanded on the stub nature of the theming howto
* tweaked some other text
This commit is contained in:
Will Kahn-Greene 2011-05-03 12:07:01 -04:00
parent 8ac897c3b6
commit 9610848c29
8 changed files with 159 additions and 39 deletions

View File

@ -7,6 +7,18 @@
This chapter covers the libraries that GNU MediaGoblin uses as well as
various recipes for getting things done.
.. Note::
This chapter is in flux. Clearly there are things here that aren't
documented. If there's something you have questions about, please
ask!
See `the join page on the website <http://mediagoblin.org/join/>`_
for where we hang out.
For more information on how to get started hacking on GNU MediaGoblin,
see :ref:`hacking-howto`.
Software Stack
==============
@ -59,6 +71,55 @@ Software Stack
* `JQuery <http://jquery.com/>`_: for groovy JavaScript things
What's where
============
After you've run buildout, you're faced with the following directory
tree::
mediagoblin/
|- mediagoblin/ source code
| |- tests/
| |- templates/
| |- auth/
| \- submit/
|- docs/ documentation
|
| the rest of these directories are generated by
| buildout.
|
|- bin/ scripts
|- develop-eggs/
|- eggs/
|- mediagoblin.egg-info/
|- parts/
|- user_dev/ sessions, etc
As you can see, all the code for GNU MediaGoblin is in the
``mediagoblin`` directory.
Here are some interesting files and what they do:
:routing.py: maps url paths to views
:views.py: views handle http requests
:models.py: holds the mongodb schemas---these are the data structures
we're working with
You'll notice that there are several sub-directories: tests,
templates, auth, submit, ...
``tests`` holds the unit test code.
``templates`` holds all the templates for the output.
``auth`` and ``submit`` are modules that enacpsulate authentication
and media item submission. If you look in these directories, you'll
see they have their own ``routing.py``, ``view.py``, and
``models.py`` in addition to some other code.
Recipes
=======

View File

@ -16,7 +16,7 @@ import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
@ -25,7 +25,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
extensions = ["mgext.youcanhelp"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -4,11 +4,16 @@
Contributing HOWTO
====================
.. _join-the-community-section:
Join the community!
===================
We're super glad you want to join our community!
See `the join page on the website <http://mediagoblin.org/join/>`_ for
where we hang out.
There are a variety of ways you can help us and become part of the
team. We're not just looking for coders! We're also looking for
documentation writers, users, testers, evangelists, user-interface

View File

@ -9,16 +9,20 @@ So you want to hack on GNU MediaGoblin?
=======================================
First thing to do is check out the `Web site
<http://mediagoblin.org>`_ where we list all the project
<http://mediagoblin.org/join/>`_ where we list all the project
infrastructure including:
* the mailing list
* the IRC channel
* the bug tracker
* the mailing list
* the issue tracker
Additionally, we have information on how to get involved, who to talk
to, what needs to be worked on, and other things besides!
Second thing to do is take a look at :ref:`codebase-chapter` where
we've started documenting how GNU MediaGoblin is built and how to add
new things.
How to set up and maintain an environment for hacking
=====================================================
@ -80,10 +84,16 @@ Updating dependencies
---------------------
While hacking on GNU MediaGoblin over time, you'll eventually have to
update your development environment. To do that, run::
update your development environment because the dependencies have
changed. To do that, run::
./bin/buildout
.. Note::
You only need to do this when dependencies are updated. You don't
need to do this when you've made code changes.
Wiping your environment for a clean-slate
-----------------------------------------
@ -104,8 +114,12 @@ Delete the following directories:
* parts/
* user_dev/
FIXME - how to drop data from mongodb? we should probably write a
script.
.. YouCanHelp::
If you're familiar with MongoDB and bash, we'd love to get a bash
script that removes all the GNU MediaGoblin data from an existing
MongoDB instance. Let us know!
Running the server
@ -124,42 +138,34 @@ Run::
./bin/nosetests
What's where
============
After you've run buildout, you're faced with the following directory
tree::
mediagoblin/
|- mediagoblin/ source code
| |- tests/
| |- templates/
| |- auth/
| \- submit/
|- docs/ documentation
|
| the rest of these directories are generated by
| buildout.
|
|- bin/ scripts
|- develop-eggs/
|- eggs/
|- mediagoblin.egg-info/
|- parts/
|- user_dev/ sessions, etc
Quickstart for Django programmers
=================================
FIXME - write this
We're not using Django, but the codebase is very Django-like in its
structure.
* ``routing.py`` is like ``urls.py`` in Django
* ``models.py`` has mongokit ORM definitions
* ``views.py`` is where the views go
We're using MongoDB. Basically, instead of a relational database with
tables, you have a big JSON structure which acts a lot like a Python
dict.
.. YouCanHelp::
If there are other things that you think would help orient someone
new to GNU MediaGoblin but coming from Django, let us know!
Bite-sized bugs to start with
=============================
FIXME - write this
**May 3rd, 2011**: We don't have a list of bite-sized bugs, yet, but
this is important to us. If you're interested in things to work on,
let us know on `the mailing list <http://mediagoblin.org/join/>`_ or
on the `IRC channel <http://mediagoblin.org/join/>`_.
Tips for people new to coding
@ -186,7 +192,10 @@ that are freely available on the Internet:
These are all excellent texts.
FIXME - are there good quality Python tutorial videos?
.. YouCanHelp::
If you know of other good quality Python tutorials and Python
tutorial videos, let us know!
Learning Libraries GNU MediaGoblin uses

View File

@ -44,7 +44,7 @@ dedicated to computer user freedom.
How can I participate?
======================
See `Get Involved <http://mediagoblin.org/join/>`.
See `Get Involved <http://mediagoblin.org/join/>`_ on the website..
How is GNU MediaGoblin licensed?

0
docs/mgext/__init__.py Normal file
View File

44
docs/mgext/youcanhelp.py Normal file
View File

@ -0,0 +1,44 @@
from docutils import nodes
from sphinx.util.compat import Directive, make_admonition
class youcanhelp_node(nodes.Admonition, nodes.Element):
pass
class YouCanHelp(Directive):
has_content = True
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
def run(self):
ad = make_admonition(
youcanhelp_node,
self.name,
["You Can Help!"],
self.options,
self.content,
self.lineno,
self.content_offset,
self.block_text,
self.state,
self.state_machine)
ad[0].line = self.lineno
return ad
def visit_youcanhelp_node(self, node):
self.visit_admonition(node)
def depart_youcanhelp_node(self, node):
self.depart_admonition(node)
def setup(app):
app.add_node(
youcanhelp_node,
html=(visit_youcanhelp_node, depart_youcanhelp_node),
latex=(visit_youcanhelp_node, depart_youcanhelp_node),
text=(visit_youcanhelp_node, depart_youcanhelp_node)
)
app.add_directive('youcanhelp', YouCanHelp)

View File

@ -4,4 +4,5 @@
Theming HOWTO
===============
FIXME - stub!
We haven't implemented the necessary scaffolding to allow for theming
yet. Thus, this chapter is a stub.