Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit e41099d156c2427c561e1bd47f27dd808ae50dd8
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 13 17:43:56 2012 +0100
Start writing documentation about fedocal
This is the first work on the documentation. Two paragraphs are still
missing in the usage section but that will do for now.
It will need to be updated when we change the handling of the
configuration file (to use Flask's recommandation).
Refers #4
>---------------------------------------------------------------
doc/Makefile | 153 +++++++++++++++++++
doc/conf.py | 282 +++++++++++++++++++++++++++++++++++
doc/configuration.rst | 48 ++++++
doc/contributing.rst | 31 ++++
doc/dep.html | 388 +++++++++++++++++++++++++++++++++++++++++++++++++
doc/deployment.rst | 102 +++++++++++++
doc/development.rst | 137 +++++++++++++++++
doc/index.rst | 58 ++++++++
doc/requirements.txt | 2 +
doc/usage.rst | 123 ++++++++++++++++
10 files changed, 1324 insertions(+), 0 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..105b5d3
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,153 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/fedocal.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/fedocal.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/fedocal"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/fedocal"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..9036124
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,282 @@
+# -*- coding: utf-8 -*-
+#
+# fedocal documentation build configuration file, created by
+# sphinx-quickstart on Mon Nov 12 09:06:13 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+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('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'fedocal'
+copyright = u'2012, Pierre-Yves Chibon <pingou(a)pingoured.fr>'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+import cloud_sptheme as csp
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#html_theme = 'default'
+html_theme = "cloud"
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+html_theme_options = {
+ "sidebarwidth": "200px",
+ "max_width": "900px",
+ "compact_width": "800px",
+ "minimal_width": "700px",
+
+ # Style it like Fedora..
+ "bodyfont": "Cantarell",
+
+ "highlightcolor": "#79db32", # First Green
+
+ "sidebarbgcolor": "#FEFEFE",
+ "sidebartrimcolor": "#FEFEFE",
+
+ "sectionbgcolor": "#FEFEFE",
+ "sectiontrimcolor": "#FEFEFE",
+ "sectiontextcolor": "#444444",
+
+ "relbarbgcolor": "#FEFEFE",
+ "relbartextcolor": "#444444",
+ "relbarlinkcolor": "#444444",
+
+ "bgcolor": "#FEFEFE",
+ "textcolor": "#444444",
+ #"linkcolor": "#79db32", # First Green
+ "linkcolor": "#00009d",
+
+ "headtextcolor": "#444444",
+ "headlinkcolor": "#444444",
+
+ #"codebgcolor"
+ #"codetextcolor"
+ "codetrimcolor": "#79db32", # First Green
+
+ "footerbgcolor": "#FEFEFE",
+}
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+html_theme_path = [csp.get_theme_dir()]
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'fedocaldoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'fedocal.tex', u'fedocal Documentation',
+ u'Pierre-Yves Chibon \\textless{}pingou(a)pingoured.fr\\textgreater{}', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'fedocal', u'fedocal Documentation',
+ [u'Pierre-Yves Chibon <pingou(a)pingoured.fr>'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'fedocal', u'fedocal Documentation',
+ u'Pierre-Yves Chibon <pingou(a)pingoured.fr>', 'fedocal', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
diff --git a/doc/configuration.rst b/doc/configuration.rst
new file mode 100644
index 0000000..af96b34
--- /dev/null
+++ b/doc/configuration.rst
@@ -0,0 +1,48 @@
+Configuration
+=============
+
+There are three main configuration options to set to have fedocal running
+
+The secret key
+---------------
+
+Set in the configuration file under the key ``SECRET_KEY``, this is a unique,
+random string which is used by `Flask <http://flask.pocoo.org>`_ to generate
+the `CSRF <http://en.wikipedia.org/CSRF>`_ key unique for each user.
+
+
+You can easily generate one using `pwgen <http://sf.net/projects/pwgen>`_
+for example to generate a 50 characters long random key
+::
+
+ pwgen 50
+
+
+The database URL
+-----------------
+
+Fedocal uses `SQLAlchemy <http://sqlalchemy.org>`_ has Object Relationship
+Mapper and thus to connect to the database. You need to provide under the
+key ``DB_URL`` in the configuration file the required information to connect
+to the database.
+
+
+Examples URLs are::
+
+ db_url=mysql://user:pass@host/db_name
+ db_url=postgres://user:pass@host/db_name
+ db_url=sqlite:////full/path/to/database.sqlite
+
+
+The admin group
+----------------
+
+Fedocal relies on a group of administrator to create calendar which are then
+managed by people from this group. The ``ADMIN_GROUP`` field in the
+configuration file refers to the
+`FAS <https://admin.fedoraproject.org/accounts>`_ group that manages this
+fedocal instance.
+
+See :doc:`usage` for details explanations on the different administration layer
+of fedocal.
+
diff --git a/doc/contributing.rst b/doc/contributing.rst
new file mode 100644
index 0000000..b5cfd6d
--- /dev/null
+++ b/doc/contributing.rst
@@ -0,0 +1,31 @@
+Contributing
+============
+
+If you're submitting patches to fedocal, please observe the following:
+
+- Check that your python code is `PEP8-compliant
+ <http://www.python.org/dev/peps/pep-0008/>`_. There is a `pep8 tool
+ <http://pypi.python.org/pypi/pep8>`_ that can automatically check
+ your source.
+
+- Check your code quality usint `pylint <http://pypi.python.org/pypi/pylint>`_.
+ The ``run_pylint.sh`` allows you to run pylint for the whole project which
+ solves some problem that you might find if you run pylint on your file alone.
+
+- Check that your code doesn't break the test suite. The test suite can be
+ run using the ``run_tests.sh`` shell script at the top of the sources.
+ See :doc:`development` for more information about the test suite.
+
+- If you are adding new code, please write tests for them in ``fedocal/tests/``,
+ the ``run_tests.sh`` script will help you to see the coverage of your code
+ in unit-tests.
+
+- If your change warrants a modification to the docs in ``doc/`` or any
+ docstrings in ``fedocal/`` please make that modification.
+
+.. note:: You have a doubt, you don't know how to do something, you have an
+ idea but don't know how to implement it, you just have something bugging
+ you?
+
+ Come to see us on IRC: ``#fedora-apps`` on irc.freenode.net or via the
+ `trac of the project <http://fedorahosted.org/fedocal/>`_.
diff --git a/doc/dep.html b/doc/dep.html
new file mode 100644
index 0000000..af12dc1
--- /dev/null
+++ b/doc/dep.html
@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
+<title></title>
+<style type="text/css">
+
+/*
+:Author: David Goodger (goodger(a)python.org)
+:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $
+:Copyright: This stylesheet has been placed in the public domain.
+
+Default cascading style sheet for the HTML output of Docutils.
+
+See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
+customize this style sheet.
+*/
+
+/* used to remove borders from tables and images */
+.borderless, table.borderless td, table.borderless th {
+ border: 0 }
+
+table.borderless td, table.borderless th {
+ /* Override padding for "table.docutils td" with "! important".
+ The right padding separates the table cells. */
+ padding: 0 0.5em 0 0 ! important }
+
+.first {
+ /* Override more specific margin styles with "! important". */
+ margin-top: 0 ! important }
+
+.last, .with-subtitle {
+ margin-bottom: 0 ! important }
+
+.hidden {
+ display: none }
+
+a.toc-backref {
+ text-decoration: none ;
+ color: black }
+
+blockquote.epigraph {
+ margin: 2em 5em ; }
+
+dl.docutils dd {
+ margin-bottom: 0.5em }
+
+object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
+ overflow: hidden;
+}
+
+/* Uncomment (and remove this text!) to get bold-faced definition list terms
+dl.docutils dt {
+ font-weight: bold }
+*/
+
+div.abstract {
+ margin: 2em 5em }
+
+div.abstract p.topic-title {
+ font-weight: bold ;
+ text-align: center }
+
+div.admonition, div.attention, div.caution, div.danger, div.error,
+div.hint, div.important, div.note, div.tip, div.warning {
+ margin: 2em ;
+ border: medium outset ;
+ padding: 1em }
+
+div.admonition p.admonition-title, div.hint p.admonition-title,
+div.important p.admonition-title, div.note p.admonition-title,
+div.tip p.admonition-title {
+ font-weight: bold ;
+ font-family: sans-serif }
+
+div.attention p.admonition-title, div.caution p.admonition-title,
+div.danger p.admonition-title, div.error p.admonition-title,
+div.warning p.admonition-title {
+ color: red ;
+ font-weight: bold ;
+ font-family: sans-serif }
+
+/* Uncomment (and remove this text!) to get reduced vertical space in
+ compound paragraphs.
+div.compound .compound-first, div.compound .compound-middle {
+ margin-bottom: 0.5em }
+
+div.compound .compound-last, div.compound .compound-middle {
+ margin-top: 0.5em }
+*/
+
+div.dedication {
+ margin: 2em 5em ;
+ text-align: center ;
+ font-style: italic }
+
+div.dedication p.topic-title {
+ font-weight: bold ;
+ font-style: normal }
+
+div.figure {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+div.footer, div.header {
+ clear: both;
+ font-size: smaller }
+
+div.line-block {
+ display: block ;
+ margin-top: 1em ;
+ margin-bottom: 1em }
+
+div.line-block div.line-block {
+ margin-top: 0 ;
+ margin-bottom: 0 ;
+ margin-left: 1.5em }
+
+div.sidebar {
+ margin: 0 0 0.5em 1em ;
+ border: medium outset ;
+ padding: 1em ;
+ background-color: #ffffee ;
+ width: 40% ;
+ float: right ;
+ clear: right }
+
+div.sidebar p.rubric {
+ font-family: sans-serif ;
+ font-size: medium }
+
+div.system-messages {
+ margin: 5em }
+
+div.system-messages h1 {
+ color: red }
+
+div.system-message {
+ border: medium outset ;
+ padding: 1em }
+
+div.system-message p.system-message-title {
+ color: red ;
+ font-weight: bold }
+
+div.topic {
+ margin: 2em }
+
+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
+ margin-top: 0.4em }
+
+h1.title {
+ text-align: center }
+
+h2.subtitle {
+ text-align: center }
+
+hr.docutils {
+ width: 75% }
+
+img.align-left, .figure.align-left, object.align-left {
+ clear: left ;
+ float: left ;
+ margin-right: 1em }
+
+img.align-right, .figure.align-right, object.align-right {
+ clear: right ;
+ float: right ;
+ margin-left: 1em }
+
+img.align-center, .figure.align-center, object.align-center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.align-left {
+ text-align: left }
+
+.align-center {
+ clear: both ;
+ text-align: center }
+
+.align-right {
+ text-align: right }
+
+/* reset inner alignment in figures */
+div.align-right {
+ text-align: inherit }
+
+/* div.align-center * { */
+/* text-align: left } */
+
+ol.simple, ul.simple {
+ margin-bottom: 1em }
+
+ol.arabic {
+ list-style: decimal }
+
+ol.loweralpha {
+ list-style: lower-alpha }
+
+ol.upperalpha {
+ list-style: upper-alpha }
+
+ol.lowerroman {
+ list-style: lower-roman }
+
+ol.upperroman {
+ list-style: upper-roman }
+
+p.attribution {
+ text-align: right ;
+ margin-left: 50% }
+
+p.caption {
+ font-style: italic }
+
+p.credits {
+ font-style: italic ;
+ font-size: smaller }
+
+p.label {
+ white-space: nowrap }
+
+p.rubric {
+ font-weight: bold ;
+ font-size: larger ;
+ color: maroon ;
+ text-align: center }
+
+p.sidebar-title {
+ font-family: sans-serif ;
+ font-weight: bold ;
+ font-size: larger }
+
+p.sidebar-subtitle {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+p.topic-title {
+ font-weight: bold }
+
+pre.address {
+ margin-bottom: 0 ;
+ margin-top: 0 ;
+ font: inherit }
+
+pre.literal-block, pre.doctest-block, pre.math {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+span.classifier {
+ font-family: sans-serif ;
+ font-style: oblique }
+
+span.classifier-delimiter {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+span.interpreted {
+ font-family: sans-serif }
+
+span.option {
+ white-space: nowrap }
+
+span.pre {
+ white-space: pre }
+
+span.problematic {
+ color: red }
+
+span.section-subtitle {
+ /* font-size relative to parent (h1..h6 element) */
+ font-size: 80% }
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px }
+
+table.docinfo {
+ margin: 2em 4em }
+
+table.docutils {
+ margin-top: 0.5em ;
+ margin-bottom: 0.5em }
+
+table.footnote {
+ border-left: solid 1px black;
+ margin-left: 1px }
+
+table.docutils td, table.docutils th,
+table.docinfo td, table.docinfo th {
+ padding-left: 0.5em ;
+ padding-right: 0.5em ;
+ vertical-align: top }
+
+table.docutils th.field-name, table.docinfo th.docinfo-name {
+ font-weight: bold ;
+ text-align: left ;
+ white-space: nowrap ;
+ padding-left: 0 }
+
+h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
+h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
+ font-size: 100% }
+
+ul.auto-toc {
+ list-style-type: none }
+
+</style>
+</head>
+<body>
+<div class="document">
+
+
+<div class="section" id="deployment">
+<h1>Deployment</h1>
+</div>
+<div class="section" id="from-sources">
+<h1>From sources</h1>
+<p>Clone the source:</p>
+<pre class="literal-block">
+git clone https://github.com/pypingou/fedocal.git
+</pre>
+<p>Copy the configuration file:</p>
+<pre class="literal-block">
+cp fedocal.cfg.sample fedocal.cfg
+</pre>
+<p>Adjust the configuration file (secret key, database URL, admin group...).
+See doc:<a href="#id1"><span class="problematic" id="id2">`configuration`_</span></a> for detailed information about the configuration.</p>
+<p>Create the database scheme:</p>
+<pre class="literal-block">
+python fedocal/fedocallib/model.py
+</pre>
+</div>
+<div class="section" id="from-system-wide-packages">
+<h1>From system-wide packages</h1>
+</div>
+<div class="section" id="set-up-wsgi">
+<h1>Set-up WSGI</h1>
+<p>Start by installing <tt class="docutils literal">mod_wsgi</tt>:</p>
+<pre class="literal-block">
+yum install mod_wsgi
+</pre>
+<p>Then configure apache:</p>
+<pre class="literal-block">
+sudo vim /etc/httd/conf.d/wsgi.conf
+</pre>
+<p>and put in this file:</p>
+<pre class="literal-block">
+WSGIScriptAlias /fedocal /var/www/wsgi/fedocal.wsgi
+<Directory /var/www/wsgi/>
+ Order deny,allow
+ Allow from all
+</Directory>
+</pre>
+<p>Then create the file /var/www/wsgi/fedocal.wsgi with:</p>
+<pre class="literal-block">
+import fedocal
+application = fedocal.APP
+</pre>
+<!-- note: If you run form the sources, you might have to add at the
+top of the file ::
+
+ import sys
+ sys.path.insert(0, '/srv/fedocal/') -->
+<p>Then restart apache and you should be able to access the website on
+<a class="reference external" href="http://localhost/fedocal">http://localhost/fedocal</a></p>
+<p>Then restart apache and you should be able to access the website on
+<a class="reference external" href="http://localhost/fedocal">http://localhost/fedocal</a></p>
+</div>
+<div class="section" id="for-testing">
+<h1>For testing</h1>
+<p>See doc:<cite>development</cite> if you want to run fedocal just to test it.</p>
+</div>
+<div class="system-messages section">
+<h1>Docutils System Messages</h1>
+<div class="system-message" id="id1">
+<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">deployment.rst</tt>, line 16); <em><a href="#id2">backlink</a></em></p>
+Unknown target name: "configuration".</div>
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/deployment.rst b/doc/deployment.rst
new file mode 100644
index 0000000..f238cc6
--- /dev/null
+++ b/doc/deployment.rst
@@ -0,0 +1,102 @@
+Deployment
+==========
+
+From sources
+------------
+
+Clone the source::
+
+ git clone https://github.com/pypingou/fedocal.git
+
+
+Copy the configuration file::
+
+ cp fedocal.cfg.sample fedocal.cfg
+
+Adjust the configuration file (secret key, database URL, admin group...).
+See :doc:`configuration` for detailed information about the configuration.
+
+
+Create the database scheme::
+
+ python fedocal/fedocallib/model.py
+
+Set up the WSGI as described below.
+
+
+From system-wide packages
+-------------------------
+
+Start by install fedocal::
+
+ yum install fedocal
+
+Find the sample configuration file::
+
+ rpm -ql fedocal |grep fedocal.cfg.sample
+
+Copy this file into ``/etc/`` with the name ``fedocal.cfg``::
+
+ cp /path/to/fedocal.cfg.sample /etc/fedocal.cfg
+
+Find the file used to create the database::
+
+ rpm -ql fedocal |grep model.py
+
+Create the database scheme::
+
+ python path/to/fedocal/fedocallib/model.py
+
+Set up the WSGI as described below.
+
+
+Set-up WSGI
+-----------
+
+Start by installing ``mod_wsgi``::
+
+ yum install mod_wsgi
+
+
+Then configure apache::
+
+ sudo vim /etc/httd/conf.d/wsgi.conf
+
+and put in this file::
+
+ WSGIScriptAlias /fedocal /var/www/wsgi/fedocal.wsgi
+ <Directory /var/www/wsgi/>
+ Order deny,allow
+ Allow from all
+ </Directory>
+
+
+Then create the file /var/www/wsgi/fedocal.wsgi with::
+
+
+ import fedocal
+ application = fedocal.APP
+
+.. note:: If you run form the sources, you might have to add at the
+ top of the file ::
+
+ import sys
+ sys.path.insert(0, '/srv/fedocal/')
+
+ Adapt the path to your configuration
+
+
+Then restart apache and you should be able to access the website on
+http://localhost/fedocal
+
+
+.. note:: `Flask <http://flask.pocoo.org/>`_ provides also some documentation
+ on how to `deploy Flask application with WSGI and apache
+ <http://flask.pocoo.org/docs/deploying/mod_wsgi/>`_.
+
+
+For testing
+-----------
+
+See :doc:`development` if you want to run fedocal just to test it.
+
diff --git a/doc/development.rst b/doc/development.rst
new file mode 100644
index 0000000..56e8b5a
--- /dev/null
+++ b/doc/development.rst
@@ -0,0 +1,137 @@
+Development
+===========
+
+Get the sources
+---------------
+
+Anonymous:
+
+::
+
+ git clone http://git.fedorahosted.org/git/fedocal.git
+
+Contributors:
+
+::
+
+ git clone ssh://<FAS user>@git.fedorahosted.org/git/fedocal.git
+
+
+Run fedocal for development
+---------------------------
+Copy the configuration file::
+
+ cp fedocal.cfg.sample fedocal.cfg
+
+Adjust the configuration file (secret key, database URL, admin group...)
+See :doc:`configuration` for more detailed information about the configuration.
+
+
+Create the database scheme::
+
+ python fedocal/fedocallib/model.py
+
+Run the server::
+
+ python fedocal/__init__.py
+
+You should be able to access the server at http://localhost:5000
+
+
+Every time you save a file, the project will be automatically restarted
+so you can see your change immediatly.
+
+
+Coding standards
+----------------
+
+We are trying to make the code `PEP8-compliant
+<http://www.python.org/dev/peps/pep-0008/>`_. There is a `pep8 tool
+<http://pypi.python.org/pypi/pep8>`_ that can automatically check
+your source.
+
+
+We are also inspecting the code using `pylint
+<http://pypi.python.org/pypi/pylint>`_ and aim of course for a 10/10 code
+(but it is an assymptotic goal).
+We provide a shell script ``run_pylint.sh`` at the top of the sources to allow
+easy inspection of the code with pylint.
+
+.. note:: both pep8 and pylint are available in Fedora via yum:
+
+ ::
+
+ yum install python-pep8 pylint
+
+
+Send patch
+----------
+
+The easiest way to work on fedocal is to make your own branch in git, make your
+changes to this branch, commit whenever you want, rebase on master, whenever
+you need and when you are done, send the patch either by email or via the trac.
+
+
+The workflow would therefore be something like:
+
+ git branch <my_shiny_feature>
+ git checkout <my_shiny_feature>
+ <work>
+ git commit file1 file2
+ <more work>
+ git commit file3 file4
+ git checkout master
+ git pull
+ git checkout <my_shiny_feature>
+ git rebase master
+ git format-patch -2
+
+This will create two patch files that you can send by email to submit in the
+trac.
+
+.. note:: You can send your patch by email to the `fedocal mailing-list
+ <https://lists.fedorahosted.org/mailman/listinfo/fedocal>`_
+
+Unit-tests
+----------
+
+Fedocal has a number of unit-tests providing at the moment a full coverage of
+the backend library (fedocallib).
+
+
+We aim at having a full (100%) coverage of the whole code (including the Flask
+application) and of course a smart coverage as in we want to check that the
+functions work the way we want but also that they fail when we expect it and
+the way we expect it.
+
+
+Tests checking that function are failing when/how we want are as important
+as tests checking they work the way they are intended to.
+
+``run_tests.sh``, located at the top of the sources, helps to run the
+unit-tests of the project with coverage information using `python-nose
+<https://nose.readthedocs.org/>`_.
+
+
+Each unit-tests files (located under ``fedocal/tests/``) can be called
+by alone, allowing easier debugging of the tests. For example:
+
+::
+
+ python fedocal/tests/test_week.py
+
+
+Database changes
+----------------
+
+We try to make the database schema as stable as possible, however once in a
+while we need to change it to add new features or information.
+
+
+When database changes are made, they should have the corresponding change
+handled via `alembic <http://pypi.python.org/pypi/alembic>`_.
+
+
+See the `alembic tutorial
+<http://alembic.readthedocs.org/en/latest/tutorial.html>`_ for more information
+on how to make a revision to the database schema.
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..0db22bd
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,58 @@
+Fedocal
+=======
+
+Fedocal is a web based calendar application for Fedora.
+
+
+A number of groups in Fedora are using a calendar to coordinate their work,
+and at the moment the only tool at their disposition is the
+`wiki <http://fedoraproject.org/wiki>`_ with all the challenge of formatting
+properly tables in the mediawiki syntax.
+
+
+This project aims at providing a single place where these different calendars
+can be found and managed. This should save us from wiki page such as
+the `fedora-meeting irc calendar
+<https://fedoraproject.org/wiki/Meeting_channel>`_ or the `ambassador event
+<https://fedoraproject.org/wiki/Events>`_ page
+which are either hardly maintained or plain un-readable.
+
+
+Additionnaly, a number of groups are sending reminders for their meeting, this
+is true for the regional ambassadors, the board, or the infrastructure meetings
+this application aims at automating this process in order to take this task off
+the shoulders of fellow contributors.
+
+Resources:
+
+- `Home page <http://fedorahosted.org/fedocal/>`_
+- `Documentation <>`_
+- `Git repository <http://git.fedorahosted.org/git/fedocal>`_
+- `Discussion mailing-list
+ <https://lists.fedorahosted.org/mailman/listinfo/fedocal>`_
+- `Developer mailing-list
+ <https://lists.fedorahosted.org/mailman/listinfo/fedocal-devel>`_ (this
+ contains changes in the trac as well as commit notifications. It is not
+ intended for discussion)
+
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ deployment
+ configuration
+ usage
+ development
+ contributing
+
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..c577a66
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,2 @@
+sphinx
+cloud_sptheme
diff --git a/doc/usage.rst b/doc/usage.rst
new file mode 100644
index 0000000..062749b
--- /dev/null
+++ b/doc/usage.rst
@@ -0,0 +1,123 @@
+Usage
+=====
+
+Users
+-----
+
+Fedocal has basically two levels for the users
+- administrators
+- users
+
+Administrators
+~~~~~~~~~~~~~~
+
+Administrators are people with an account on the
+`Fedora account system (FAS) <https://admin.fedoraproject.org/accounts/>`_ and
+belong the administrator group as set in the :doc:`configuration`.
+
+Administrators are the only people allowed to create a calendar and edit all
+the meetings.
+
+
+Users
+~~~~~
+
+Users are people with an account on the
+`Fedora account system (FAS) <https://admin.fedoraproject.org/accounts/>`_ and
+belong to at least one more group than the ``fedora_cla`` group which
+every contributor should sign to contribute to Fedora.
+
+
+Create calendar
+---------------
+
+After loging in, if you are in the administrator group, you will see an
+``Admin`` entry in the left menu containing a link to ``Create calendar``.
+Use this link to create a calendar.
+
+The form to fill ask for:
+
+- ``calendar name``: the name of the calendar as used in the link and as title
+ for this calendar.
+- ``calendar description``: a short description of what the calendar is used for.
+ This description will also show up on the page of the calendar and should
+ thus not be too long.
+- ``calendar managers group``: the name of the
+ `FAS <https://admin.fedoraproject.org/accounts/>`_
+ group to which should belong people that will manage the calendar
+ (ie: create meetings).
+- ``multiple meetings``: by default a calendar does not allow someone to create
+ a meeting or an event on a specific date if there is already something
+ planned at that time that day. By turning on this option, the calendar will
+ become less strict and allow multiple meetings at the same time on the same
+ day. This option should remain off for calendar handling for example IRC
+ meetings, while it should be turned off for calendar handling for example
+ Ambassadors events which can occurs the same day at different location in the
+ world.
+- ``region meetings``: by default, you can not associate a meeting with a region,
+ by turning on this option you can. This allows to "tag" a meeting or an event
+ as concerning a specfic region and thus allows someone to check out only
+ the meeting within his region.
+
+ Regions are meant to be 'NA', 'APAC', 'EMEA', 'LATAM'.
+
+ Note that this can also be used to filter meetings retrieved via the API.
+
+
+Create meeting
+--------------
+
+
+Edit meeting
+------------
+
+One can only edit a meeting if he is one of the manager of the meeting or if
+he is an administrator of fedocal.
+
+
+In these cases, once logged-in, go to the page ``Manage your meetings`` and
+there is presented a list of the meetings for which you are a manager and that
+you can edit.
+
+
+When editing a meeting you will have the same field as when creating one,
+plus when the meeting is recursive an option to update all the future meetings
+or just this one (default).
+
+
+Delete meeting
+--------------
+
+One can only delete a meeting if he is one of the manager of the meeting or if
+he is an administrator of fedocal.
+
+
+In these cases, once logged-in, go to the page ``Manage your meetings`` and
+there is presented a list of the meetings for which you are a manager and that
+you can delete.
+
+
+You will be asked to confirm the deletion of the meeting and for recursive
+meetings you will have to specify if you want to delete all the future meetings
+or just this one (default).
+
+
+For archives purposes, you can never delete meetings from the past.
+
+
+iCal feed
+---------
+
+Fedocal provides for each calendar an iCal feed allowing integration with your
+own calendar application.
+
+This iCal is read-only and can be found at::
+
+ http://<url to fedocal>/ical/<calendar name>/
+
+
+Reminders
+---------
+
+
+
#4: Documentation
--------------------------+-------------------------
Reporter: pingou | Owner: pingou
Type: enhancement | Status: assigned
Priority: major | Milestone: 0.1.0
Component: fedocal | Version: development
Resolution: | Keywords:
--------------------------+-------------------------
Changes (by pingou):
* status: new => assigned
Comment:
I have started to work on this
--
Ticket URL: <https://fedorahosted.org/fedocal/ticket/4#comment:2>
fedocal <https://fedorahosted.org/fedocal>
A web-based calendar application for Fedora
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit e7db1853f2f15f8ec20bca05a39a369ebca16a92
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Nov 12 09:44:22 2012 +0100
Update the .gitignore file
Add to the list of files to ignore the _build folder from the
documentation.
The makefile will regenerate it as needed and we don't need to have
the html version of the doc in the repo.
>---------------------------------------------------------------
.gitignore | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9fd5698..fa2154e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,5 @@ build
.project
.pydevproject
.coverage
-fedocal/fedocal.cfg
alembic.ini
+_build/