Dag Odenhall avatar Dag Odenhall committed 5010ec9

Use Sphinx' Todo extension and style admonitions

Comments (0)

Files changed (10)

docs/_themes/flatland/static/flatland.css

    margin: auto;
    text-align: center;
 }
+
+
+div.admonition {
+  background: #efefef;
+  border-left: .3em solid #333;
+  margin: 1em -3em;
+  padding: 1em 3em;
+}
+
+
+div.admonition-todo {
+  border-left: .3em solid #A2C875;
+}
+
+
+div.admonition.note {
+  border-left: .3em solid #F2DD8F;
+}
     'sphinx.ext.autodoc',
     'sphinx.ext.doctest',
     'sphinx.ext.intersphinx',
+    'sphinx.ext.todo',
 ]
 
 
 }
 
 
+todo_include_todos = True
+
+
 spelling_ignore_pypi_package_names = True
 
 
    markup
    signals
    patterns/index
+   todo

docs/schema/dicts.rst

 
 .. currentmodule:: flatland.schema.containers
 
-TODO intro
+.. TODO:: intro
 
 .. _set_policy:
 
 ``set()`` Policy
 ----------------
 
-TODO strict, duck, etc.
+.. TODO:: strict, duck, etc.
 
 Validation
 ----------

docs/schema/schema.rst

   from flatland import Dict, String
   SearchSchema = Dict.named('search').of(String.named(u'keywords'))
 
-FIXME UPDATE:
+.. TODO:: FIXME UPDATE:
 
   FieldSchemas are a bit like Python ``class`` definitions: they need be
   defined only once and don't do much on their own.
   >>> form.value
   {u'keywords': u'foo bar baz'}
 
-FIXME UPDATE:
+.. TODO:: FIXME UPDATE:
 
   FieldSchema instances may be freely composed and shared among many
   containers.
   >>> sorted(form.value.keys())
   [u'many_searches', u'search']
 
-FIXME UPDATE:
+.. TODO:: FIXME UPDATE:
 
-    Elements can be supplied to template environments and used to
-    great effect there: elements contain all of the information needed
-    to display or redisplay a HTML form field, including errors
-    specific to a field.
+  Elements can be supplied to template environments and used to
+  great effect there: elements contain all of the information needed
+  to display or redisplay a HTML form field, including errors
+  specific to a field.
 
-    The :attr:`~Element.u`, :attr:`~Element.x`, :attr:`~Element.xa` and
-    :meth:`~Element.el` members are especially useful in templates and have
-    shortened names to help preserve your sanity when used in markup.
+  The :attr:`~Element.u`, :attr:`~Element.x`, :attr:`~Element.xa` and
+  :meth:`~Element.el` members are especially useful in templates and have
+  shortened names to help preserve your sanity when used in markup.
 
 
 ``Element``
+Documentation Todo List
+=======================
+
+.. todolist::

flatland/schema/base.py

 
     @class_cloner
     def with_properties(cls, *iterable, **properties):
-        """TODO: doc"""
+        """.. TODO:: doc"""
         simplified = dict(*iterable, **properties)
         cls.properties.update(simplified)
         return cls
     def validate_element(self, element, state, descending):
         """Assess the validity of an element.
 
-        TODO: this method is dead.  Evaluate docstring for good bits that
-        should be elsewhere.
+        .. TODO:: this method is dead.  Evaluate docstring for good bits
+            that should be elsewhere.
 
         :param element: an :class:`Element`
         :param state: may be None, an optional value of supplied to

flatland/schema/compound.py

     __metaclass__ = _MetaCompound
 
     def __compound_init__(cls):
-        """TODO: doc
+        """.. TODO:: doc
 
         Gist: runs *once* per class, at the time the first element is
         constructed.  You can run it by hand if you want to finalize

flatland/schema/containers.py

     validates_up = 'validators'
 
     descent_validators = ()
-    """TODO: doc descent_validators"""
+    """.. TODO:: doc descent_validators"""
 
     @class_cloner
     def descent_validated_by(cls, *validators):
     """
 
     def _as_element(self, value):
-        """TODO"""
+        """.. TODO::"""
         if value is Unspecified:
             return self.member_schema()
         if isinstance(value, Element):
     """Base of mapping-like Containers."""
 
     field_schema = ()
-    """TODO: doc field_schema"""
+    """.. TODO:: doc field_schema"""
 
     def __init__(self, value=Unspecified, **kw):
         Container.__init__(self, **kw)
         return self.itervalues()
 
     def set(self, value):
-        """TODO: doc set()"""
+        """.. TODO:: doc set()"""
         self.raw = value
         pairs = to_pairs(value)
         self._reset()
 
     @class_cloner
     def of(cls, *fields):
-        """TODO: doc of()"""
+        """.. TODO:: doc of()"""
         # TODO: doc
         # TODO: maybe accept **kw?
         for field in fields:
         return self
 
     def set(self, value, policy=None):
-        """TODO: doc set()"""
+        """.. TODO:: doc set()"""
         self.raw = value
         pairs = to_pairs(value)
         self._reset()

flatland/schema/scalars.py

     """
 
     child_type = String
-    """TODO: doc"""
+    """.. TODO:: doc"""
 
     def __init__(self, value=Unspecified, **kw):
         Scalar.__init__(self, **kw)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.