]> git.parisson.com Git - mezzo.git/commitdiff
Add doc and sphix config, break README for the moment...
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 5 Dec 2016 00:09:13 +0000 (01:09 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 5 Dec 2016 00:09:13 +0000 (01:09 +0100)
19 files changed:
.gitignore
README.rst
debian-requirements.txt
doc/Makefile [new file with mode: 0755]
doc/build.sh [new file with mode: 0755]
doc/make.bat [new file with mode: 0755]
doc/src/architecture.rst [new file with mode: 0644]
doc/src/conf.py [new file with mode: 0644]
doc/src/copyright.rst [new file with mode: 0644]
doc/src/development.rst [new file with mode: 0644]
doc/src/index.rst [new file with mode: 0644]
doc/src/install.rst [new file with mode: 0644]
doc/src/license.rst [new file with mode: 0644]
doc/src/maintenance.rst [new file with mode: 0644]
doc/src/overview.rst [new file with mode: 0644]
doc/src/production.rst [new file with mode: 0644]
doc/src/related.rst [new file with mode: 0644]
docker-compose.yml
requirements.txt

index 249157e15aeedf8e1bc2c41c454afb7bc18348ec..6a3359c9b900c1753fe0a43082c2d29247e99763 100644 (file)
@@ -20,7 +20,6 @@ data/postgresql
 data/var
 .thumbnails
 .tmp
-doc
 
 # Installer logs
 pip-log.txt
index 824ce6c96f1ac6cdb9710097e89fb17e7dd8286e..54f67507ab092b495ab3881c7002ba01a1838e1a 100644 (file)
@@ -2,17 +2,32 @@
 Mezzanine-organization
 ======================
 
-Overview
-=========
-
 This application is a CMS for organizations with workflows
 
 It is based on Mezzanine and Django.
 
-Usecases
-========
+Use cases
+==========
+
+* Scaled audio computing (filtering, machine learning, etc)
+* Web audio visualization
+* Audio process prototyping
+* Realtime and on-demand transcoding and streaming over the web
+* Automatic segmentation and labelling synchronized with audio events
 
-[à compléter]
+
+Goals
+=====
+
+* **Do** asynchronous and fast audio processing with Python,
+* **Decode** audio frames from **any** audio or video media format into numpy arrays,
+* **Analyze** audio content with some state-of-the-art audio feature extraction libraries like Aubio, Yaafe and VAMP as well as some pure python processors
+* **Visualize** sounds with various fancy waveforms, spectrograms and other cool graphers,
+* **Transcode** audio data in various media formats and stream them through web apps,
+* **Serialize** feature analysis data through various portable formats,
+* **Playback** and **interact** **on demand** through a smart high-level HTML5 extensible player,
+* **Index**, **tag** and **annotate** audio archives with semantic metadata (see `Telemeta <http://telemeta.org>`__ which embed TimeSide).
+* **Deploy** and **scale** your own audio processing engine through any infrastructure
 
 Architecture
 ============
@@ -71,7 +86,6 @@ app/organization
 - `projects` : represent projects related to a team or a person
 - `shop` : manage product from prestashop (softwares and subscriptions), using _Cartridge
 
-
 Install
 =======
 
@@ -163,34 +177,30 @@ This will install a init script in /etc/init.d. For example, if your app directo
     sudo /etc/init.d/mezzanine-organization start
 
 
-Environment
-============
+Browsing
++++++++++
 
 Local
-+++++++++++++++++
+-------
 - front : http://localhost:9020
 - admin: http://localhost:9020/admin
 
-
 Dev
-+++++++++++++++++
+----
 - front : http://cri-dev01.ircam.fr/
 - admin : http://cri-dev01.ircam.fr/admin
 - ssh : ssh cri@cri-dev01.ircam.fr
 - cd /srv/ircam-www
 
-
 Prod
-+++++++++++++++++
+-----
 - front : http://www.ircam.fr
 - admin : http://www.ircam.fr/admin
-- ssh : ssh cri@web5.ircam.fr
-    - cd /home/cri/dev/ircam-www-dev
-
+- ssh : ssh cri@www.ircam.fr
+- cd /srv/ircam-www
 
 Development
-============
-
+===========
 
 Start in dev mode
 +++++++++++++++++
@@ -236,7 +246,24 @@ Front
 Gulp will launch BrowserSync. BrowserSync is a middleware that expose the website on port 3000.
 Any change on CSS or JS files will trigger the build system and reload the browser.
 
+Sponsors and Partners
+=====================
+
+* `Parisson <http://parisson.com>`_
+* `CNRS <http://www.cnrs.fr>`_ (National Center of Science Research, France)
+* `Huma-Num <http://www.huma-num.fr/>`_ (big data equipment for digital humanities, ex TGE Adonis)
+* `CREM <http://www.crem-cnrs.fr>`_ (french National Center of Ethomusicology Research, France)
+* `Université Pierre et Marie Curie <http://www.upmc.fr>`_ (UPMC Paris, France)
+* `ANR <http://www.agence-nationale-recherche.fr/>`_ (CONTINT 2012 project : DIADEMS)
+* `MNHN <http://www.mnhn.fr>`_ : Museum National d'Histoire Naturelle (Paris, France)
+
 
+Related projects
+=================
+
+* `Telemeta <http://telemeta.org>`__ : open web audio platform
+* `Sound archives <http://archives.crem-cnrs.fr/>`_ of the CNRS, CREM and the "Musée de l'Homme" in Paris, France.
+* The `DIADEMS project <http://www.irit.fr/recherches/SAMOVA/DIADEMS/en/welcome/>`_ sponsored by the ANR.
 Maintenance
 ============
 
@@ -305,7 +332,6 @@ Or more, inspecting any container of the composition (usefully to know IP of a c
 
     docker inspect [CONTAINER_ID]
 
-
 Copyrights
 ==========
 
@@ -314,7 +340,6 @@ Copyrights
 * Copyright (c) 2016 Emilie Zawadzki
 * Copyright (c) 2016 Jérémy Fabre
 
-
 License
 ========
 
@@ -329,17 +354,3 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.
 
 Read the LICENSE.txt file for more details.
-
-
-
-.. _Docker-engine: https://docs.docker.com/installation/
-.. _docker-compose: https://docs.docker.com/compose/install/
-.. _docker-compose reference: https://docs.docker.com/compose/reference/
-.. _Docker-Toolbox: https://www.docker.com/products/docker-toolbox
-.. _Git: http://git-scm.com/downloads
-.. _NodeJS: https://nodejs.org
-.. _Gulp: http://gulpjs.com/
-.. _Mezzanine-Agenda : https://github.com/jpells/mezzanine-agenda
-.. _Cartridge : https://github.com/stephenmcd/cartridge/
-.. _Sass: http://sass-lang.com/
-.. _Compass : http://compass-style.org/
index 21937f06543b4b52db3f0c08525edcc4ec8cbde1..04c6b888f682286168fc39b54de4b8e184df28c5 100644 (file)
@@ -8,3 +8,4 @@ locales
 pandoc
 nodejs-legacy
 vim
+python-sphinx
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100755 (executable)
index 0000000..7680d12
--- /dev/null
@@ -0,0 +1,171 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = build
+DEPENDENCIES  = sphinx numpydoc
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) src
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) src
+
+.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)"
+       @echo "  readme     to build the README.rst file"
+       @echo "  publish        to publish the doc"
+       @echo "  install_deps  to install the build dependencies"
+
+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/TimeSide.qhcp"
+       @echo "To view the help file:"
+       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TimeSide.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/TimeSide"
+       @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TimeSide"
+       @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."
+
+readme:
+       sed '/doctest/d' src/overview.rst | sed '/testcleanup/d' > ../README.rst
+       cat src/architecture.rst src/install.rst src/development.rst src/related.rst src/maintenance.rst src/copyright.rst src/license.rst >> ../README.rst
+       @echo
+       @echo "Build finished. The README.rst file is up to date."
+
+publish:
+       true
+
+install_deps:
+       pip install $(DEPENDENCIES)
+       @echo
+       @echo "All dependencies installed."
diff --git a/doc/build.sh b/doc/build.sh
new file mode 100755 (executable)
index 0000000..5d0bb23
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+make install_deps
+make html
+make publish
+make readme
+
diff --git a/doc/make.bat b/doc/make.bat
new file mode 100755 (executable)
index 0000000..8d7f45b
--- /dev/null
@@ -0,0 +1,190 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+       set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+set I18NSPHINXOPTS=%SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+       set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+       set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+       :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.  text       to make text files
+       echo.  man        to make manual pages
+       echo.  texinfo    to make Texinfo files
+       echo.  gettext    to make PO message catalogs
+       echo.  changes    to make an overview over 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
+       goto end
+)
+
+if "%1" == "clean" (
+       for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+       del /q /s %BUILDDIR%\*
+       goto end
+)
+
+if "%1" == "html" (
+       %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+       goto end
+)
+
+if "%1" == "dirhtml" (
+       %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+       goto end
+)
+
+if "%1" == "singlehtml" (
+       %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+       goto end
+)
+
+if "%1" == "pickle" (
+       %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished; now you can process the pickle files.
+       goto end
+)
+
+if "%1" == "json" (
+       %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished; now you can process the JSON files.
+       goto end
+)
+
+if "%1" == "htmlhelp" (
+       %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+       goto end
+)
+
+if "%1" == "qthelp" (
+       %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+       echo.^> qcollectiongenerator %BUILDDIR%\qthelp\TimeSide.qhcp
+       echo.To view the help file:
+       echo.^> assistant -collectionFile %BUILDDIR%\qthelp\TimeSide.ghc
+       goto end
+)
+
+if "%1" == "devhelp" (
+       %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished.
+       goto end
+)
+
+if "%1" == "epub" (
+       %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The epub file is in %BUILDDIR%/epub.
+       goto end
+)
+
+if "%1" == "latex" (
+       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+       goto end
+)
+
+if "%1" == "text" (
+       %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The text files are in %BUILDDIR%/text.
+       goto end
+)
+
+if "%1" == "man" (
+       %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The manual pages are in %BUILDDIR%/man.
+       goto end
+)
+
+if "%1" == "texinfo" (
+       %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+       goto end
+)
+
+if "%1" == "gettext" (
+       %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+       goto end
+)
+
+if "%1" == "changes" (
+       %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.The overview file is in %BUILDDIR%/changes.
+       goto end
+)
+
+if "%1" == "linkcheck" (
+       %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+       goto end
+)
+
+if "%1" == "doctest" (
+       %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+       if errorlevel 1 exit /b 1
+       echo.
+       echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+       goto end
+)
+
+:end
diff --git a/doc/src/architecture.rst b/doc/src/architecture.rst
new file mode 100644 (file)
index 0000000..3435e39
--- /dev/null
@@ -0,0 +1,95 @@
+
+Architecture
+============
+
+For easier development and production workflow, this application has been dockerized.
+
+Paths
+++++++
+
+- app \
+    django application
+
+  - app/locale \
+        locales for translations
+  - app/migrations \
+        mezzanine migrations
+  - app/organization \
+        organization app
+  - app/bin \
+        commands to run app with docker
+  - app/static \
+        all assets, js, css files
+  - app/templates \
+        main templates
+
+- bin \
+    maintenance bin
+- env \
+    docker-compose environment files
+- etc \
+    custom config files
+- lib \
+    custom libraries added as git submodules
+- var \
+    all application data versioned on a separated repository
+
+  - var/backup \
+        database backup directory
+  - var/media \
+        all media uploaded through the app
+  - var/lib/postgresql \
+        postgresql DB (not versioned)
+  - var/log/nginx \
+        nginx logs (not versioned)
+  - var/log/uwsgi \
+        uwsgi logs (not versioned)
+
+- bower.json \
+    javascript dependencies (cf `Front`_ section)
+- debian-requirements.txt \
+    used by docker to install debian packages (cf `In case of broken app`_ section)
+- docker-compose.yml \
+    description of all docker containers. This file is used by command "docker-compose" (cf `In case of broken app`_ section)
+- Dockerfile \
+    instructions to build app image (cf `In case of broken app`_ section)
+- Gemfile \
+    gem dependecies for ruby. For our case, it will install _Sass and _Compass. (cf `Front`_ section)
+- gulpfile.js \
+    script to compile all css, js files (cf `Front`_ section)
+- install.py \
+    cf section 'Install as a daemon' (cf `Install as a daemon`_ section)
+- package.json \
+    gulp dependencies when running "gulp install" (cf `Front`_ section)
+- requirements-dev.txt \
+    application package in dev version (cf `In case of broken app`_ section)
+- requirements.txt \
+    application package (cf `In case of broken app`_ section)
+
+
+
+Models
+++++++
+
+Main modules embed in app/organization
+
+- agenda \
+    manage events, using _Mezzanine-Agenda
+- core \
+    commons or abstract functionnality
+- formats \
+    manage date format
+- job \
+    jobs and candidacies for residency
+- magazine \
+    all news are managed by topics, articles and briefs
+- media \
+    audio and video gathered in playlist
+- network \
+    create a tree of Organizations > Departments > Teams > Persons
+- pages \
+    managing diffent type of pages (admin/pages/page/) and home
+- projects \
+    represent projects related to a team or a person
+- shop \
+    manage product from prestashop (softwares and subscriptions), using _Cartridge
diff --git a/doc/src/conf.py b/doc/src/conf.py
new file mode 100644 (file)
index 0000000..391c16c
--- /dev/null
@@ -0,0 +1,308 @@
+# -*- coding: utf-8 -*-
+#
+# TimeSide documentation build configuration file, created by
+# sphinx-quickstart on Thu Aug 22 10:49:09 2013.
+#
+# 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('../../'))
+
+sys.path.insert(0, os.path.abspath('../../app/'))
+from django.conf import settings
+settings.configure()
+
+# -- 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',
+              'sphinx.ext.autosummary',
+              'sphinx.ext.doctest',]
+
+doctest_path = os.path.abspath('../../')
+
+autodoc_default_flags = 'show-inheritance'
+autoclass_content = 'both'
+
+#autosummary_generate = True
+numpydoc_show_class_members = False
+
+# 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'Mezzanine-organization'
+copyright = u'2016 Guillaume Pellerin, Emilie Zawadzki, Jérémy Fabre'
+
+# 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.
+#
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.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 = []
+
+# 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 = ['timeside.']
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+try:
+       import sphinx_rtd_theme
+       html_theme = "sphinx_rtd_theme"
+       html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+except:
+       html_theme = 'default'
+
+# 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 = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# 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
+# This is required to remove the superfluous np module index added by numpydoc
+#html_domain_indices = ['py-modindex']
+
+# 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 = 'doc'
+
+
+# -- 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', 'TimeSide.tex', u'TimeSide Documentation',
+#    u'Guillaume Pellerin, Paul Brossier, Thomas Fillon', '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', 'timeside', u'TimeSide Documentation',
+#      [u'Guillaume Pellerin, Paul Brossier, Thomas Fillon'], 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', 'TimeSide', u'TimeSide Documentation',
+#    u'Guillaume Pellerin, Paul Brossier, Thomas Fillon', 'TimeSide', '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'
+
+
+# -- Options for Epub output ---------------------------------------------------
+
+# Bibliographic Dublin Core info.
+# epub_title = u'TimeSide'
+# epub_author = u'Guillaume Pellerin, Paul Brossier, Thomas Fillon'
+# epub_publisher = u'Guillaume Pellerin, Paul Brossier, Thomas Fillon'
+# epub_copyright = u'2014-2016 Guillaume Pellerin, Paul Brossier, Thomas Fillon'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# A tuple containing the cover image and cover page html template filenames.
+#epub_cover = ()
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+#epub_exclude_files = []
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True
diff --git a/doc/src/copyright.rst b/doc/src/copyright.rst
new file mode 100644 (file)
index 0000000..858cb56
--- /dev/null
@@ -0,0 +1,8 @@
+
+Copyrights
+==========
+
+* Copyright (c) 2016 Ircam
+* Copyright (c) 2016 Guillaume Pellerin
+* Copyright (c) 2016 Emilie Zawadzki
+* Copyright (c) 2016 Jérémy Fabre
diff --git a/doc/src/development.rst b/doc/src/development.rst
new file mode 100644 (file)
index 0000000..1f54d01
--- /dev/null
@@ -0,0 +1,47 @@
+
+Development
+===========
+
+Start in dev mode
++++++++++++++++++
+
+For a development environment setup::
+
+    docker-compose -f docker-compose.yml -f env/dev.yml up
+
+Then browse the app at http://localhost:9020/
+
+On MacOS or Windows, we need to replace 'localhost' by the IP given by the docker terminal.
+
+.. warning :: In this mode, Django is run with the `runserver` tool in DEBUG mode. NEVER use this in production!
+
+
+Back
++++++
+
+If you modify or add django models, you can produce migration files with::
+
+    bin/makemigrations.sh
+
+To apply new migrations::
+
+    bin/migrate.sh
+
+Accessing the app container shell::
+
+    docker-compose run app bash
+
+
+Front
++++++
+
+1. Installing gulp dependencies::
+
+    See previous section: "Compile static files".
+
+2. Run gulp::
+
+    gulp
+
+Gulp will launch BrowserSync. BrowserSync is a middleware that expose the website on port 3000.
+Any change on CSS or JS files will trigger the build system and reload the browser.
diff --git a/doc/src/index.rst b/doc/src/index.rst
new file mode 100644 (file)
index 0000000..efb8c4b
--- /dev/null
@@ -0,0 +1,29 @@
+.. TimeSide documentation master file, created by
+   sphinx-quickstart on Thu Aug 22 10:49:09 2013.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+======================
+Mezzanine-organization
+======================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   overview
+   architecture
+   install
+   development
+   production
+   maintenance
+   copyright
+   licence
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/doc/src/install.rst b/doc/src/install.rst
new file mode 100644 (file)
index 0000000..18906cc
--- /dev/null
@@ -0,0 +1,126 @@
+
+Install
+=======
+
+Clone
+++++++
+
+On Linux, first install Git_, Docker-engine_ and docker-compose_ and open a terminal.
+
+On MacOS or Windows install Git_ and the Docker-Toolbox_ and open a Docker Quickstart Terminal.
+
+Then run these commands::
+
+    git clone --recursive https://github.com/Ircam-RnD/mezzanine-organization.git
+
+
+Compile static files
++++++++++++++++++++++
+
+Gulp_ allow to compile scss to css, concatenate js files and has a watcher, who do this tasks on file change.
+Gulp_ require NodeJS_ installed on your computer to work.
+
+1. Install gulp globally::
+
+    sudo npm install --g gulp
+
+2. Install bower globally::
+
+    sudo npm install -g bower
+
+3. Install gulp dependencies::
+
+    npm install
+
+4. Install ruby dependencies::
+
+    sudo apt install ruby
+    sudo gem install bundler
+    bundle install
+
+5. Build::
+
+    bower install
+    gulp build
+
+
+/!\ If you have an issue with ffi module, try to install dev package from ruby::
+
+    apt-get install ruby-dev
+
+
+Start
++++++
+
+For a production environment setup::
+
+    cd mezzanine-organization
+    docker-compose up
+
+which builds, (re)creates, starts, and attaches to containers.
+
+Then browse the app at http://localhost:8020/
+
+On MacOS or Windows, we need to replace 'localhost' by the IP given by the docker terminal.
+
+
+Install as a daemon
++++++++++++++++++++++
+
+Run daemon install script::
+
+    sudo ./install.py
+
+Run daemon and install cron::
+
+    sudo ./install.py --user=$USER --cron
+
+    You can find logs at /var/log/mezzanine-organization
+
+options::
+
+    --uninstall : uninstall the daemon
+    --cron : install cron backup rule (every 6 hours)
+    --user : specify user
+    --systemd : use systemd
+    --composition_file : the path of the YAML composition file to use (optional)
+
+This will install a init script in /etc/init.d. For example, if your app directory is named `mezzanine-organization`, `/etc/init.d/mezzanine-organization` becomes the init script for the OS booting procedure and for you if you need to start the daemon by hand::
+
+    sudo /etc/init.d/mezzanine-organization start
+
+
+Browsing
++++++++++
+
+Local
+-------
+- front : http://localhost:9020
+- admin: http://localhost:9020/admin
+
+Dev
+----
+- front : http://cri-dev01.ircam.fr/
+- admin : http://cri-dev01.ircam.fr/admin
+- ssh : ssh cri@cri-dev01.ircam.fr
+- cd /srv/ircam-www
+
+Prod
+-----
+- front : http://www.ircam.fr
+- admin : http://www.ircam.fr/admin
+- ssh : ssh cri@www.ircam.fr
+- cd /srv/ircam-www
+
+
+.. _Docker-engine: https://docs.docker.com/installation/
+.. _docker-compose: https://docs.docker.com/compose/install/
+.. _docker-compose reference: https://docs.docker.com/compose/reference/
+.. _Docker-Toolbox: https://www.docker.com/products/docker-toolbox
+.. _Git: http://git-scm.com/downloads
+.. _NodeJS: https://nodejs.org
+.. _Gulp: http://gulpjs.com/
+.. _Mezzanine-Agenda : https://github.com/jpells/mezzanine-agenda
+.. _Cartridge : https://github.com/stephenmcd/cartridge/
+.. _Sass: http://sass-lang.com/
+.. _Compass : http://compass-style.org/
diff --git a/doc/src/license.rst b/doc/src/license.rst
new file mode 100644 (file)
index 0000000..1084739
--- /dev/null
@@ -0,0 +1,15 @@
+
+License
+========
+
+mezzanine-organization is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+mezzanine-organization is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+Read the LICENSE.txt file for more details.
diff --git a/doc/src/maintenance.rst b/doc/src/maintenance.rst
new file mode 100644 (file)
index 0000000..4e90e25
--- /dev/null
@@ -0,0 +1,65 @@
+Maintenance
+============
+
+Log
+++++
+
+- var/log/nginx/app-access.log \
+    nginx access log of the app
+- var/log/nginx/app-error.log \
+    nginx error log of the app
+- var/log/uwsgi/app.log \
+    uwsgi log of the app
+
+Upgrade
++++++++++
+
+Upgrade application, all dependencies, data from master branch and also recompile assets::
+
+    bin/upgrade.sh
+
+
+Backup & restore DB
+++++++++++++++++++++
+
+To backup the database, in **another** terminal (or a Docker Quickstart Terminal)::
+
+    bin/push.sh #(only prod !)
+
+giving your user password if asked...
+
+To restore the backuped database, in another terminal (or a Docker Quickstart Terminal)::
+
+    bin/pull.sh
+
+
+Repair
++++++++
+
+If the app is not accessible, first try to restart the composition with::
+
+    docker-compose restart
+
+If the app is not responding yet, try to restart the docker service and then the app::
+
+    docker-compose stop
+    sudo /etc/init.d/docker restart
+    docker-compose up
+
+If the containers are still broken, try to delete exisiting containers (this will NOT delete critical data as database or media)::
+
+    docker-compose stop
+    docker-compose rm
+    docker-compose up
+
+In case you have installed the init script to run the app as a daemon (cf. section "Install as a daemon"), you can use it to restart the app:
+
+    /etc/init.d/mezzanine-organization restart
+
+If you need more informations about running containers::
+
+    docker-compose ps
+
+Or more, inspecting any container of the composition (usefully to know IP of a container)::
+
+    docker inspect [CONTAINER_ID]
diff --git a/doc/src/overview.rst b/doc/src/overview.rst
new file mode 100644 (file)
index 0000000..0c90c52
--- /dev/null
@@ -0,0 +1,16 @@
+======================
+Mezzanine-organization
+======================
+
+This application is a CMS for organizations with workflows
+
+It is based on Mezzanine and Django.
+
+Use cases
+==========
+
+...
+
+
+.. _Django : https://www.djangoproject.com/
+.. _Mezzanine : http://mezzanine.jupo.org/
diff --git a/doc/src/production.rst b/doc/src/production.rst
new file mode 100644 (file)
index 0000000..a6b77a1
--- /dev/null
@@ -0,0 +1,19 @@
+
+Production
+===========
+
+Deploying
+---------
+
+Our docker composition already bundles some powerful containers and bleeding edge frameworks like: Nginx, MySQL, Redis, Celery, Django and Python. It thus provides a safe and continuous way to deploy your project from an early development stage to a massive production environment.
+
+.. warning :: Before any serious production usecase, you *must* modify all the passwords and secret keys in the configuration files of the sandbox.
+
+The best
+
+Scaling
+--------
+
+Thanks to Celery, each TimeSide worker of the server will process each task asynchronously over independant threads so that you can load all the cores of your CPU.
+
+To scale it up through your cluster, Docker provides some nice tools for orchestrating it very easily: `Machine and Swarm <https://blog.docker.com/2015/02/orchestrating-docker-with-machine-swarm-and-compose/>`_.
diff --git a/doc/src/related.rst b/doc/src/related.rst
new file mode 100644 (file)
index 0000000..cada6a1
--- /dev/null
@@ -0,0 +1,19 @@
+
+Sponsors and Partners
+=====================
+
+* `Parisson <http://parisson.com>`_
+* `CNRS <http://www.cnrs.fr>`_ (National Center of Science Research, France)
+* `Huma-Num <http://www.huma-num.fr/>`_ (big data equipment for digital humanities, ex TGE Adonis)
+* `CREM <http://www.crem-cnrs.fr>`_ (french National Center of Ethomusicology Research, France)
+* `Université Pierre et Marie Curie <http://www.upmc.fr>`_ (UPMC Paris, France)
+* `ANR <http://www.agence-nationale-recherche.fr/>`_ (CONTINT 2012 project : DIADEMS)
+* `MNHN <http://www.mnhn.fr>`_ : Museum National d'Histoire Naturelle (Paris, France)
+
+
+Related projects
+=================
+
+* `Telemeta <http://telemeta.org>`__ : open web audio platform
+* `Sound archives <http://archives.crem-cnrs.fr/>`_ of the CNRS, CREM and the "Musée de l'Homme" in Paris, France.
+* The `DIADEMS project <http://www.irit.fr/recherches/SAMOVA/DIADEMS/en/welcome/>`_ sponsored by the ANR.
index 5d28f3a5455bc0a999afe10cd3c291f5b935a9ca..0e36aff855e861ae1973b4aabf7293843cbbb08b 100644 (file)
@@ -26,6 +26,7 @@ data:
     - ./data/backup/:/srv/backup
     - /srv/static
     - /srv/bower
+    - ./doc:/srv/doc
   command: "true"
 
 db:
@@ -51,6 +52,7 @@ app:
     - ./lib/django-prestashop/:/srv/lib/django-prestashop
     # - ./lib/mezzanine/:/srv/lib/mezzanine
     # - ./lib/cartridge/:/srv/lib/cartridge
+    - ./doc:/srv/doc
   volumes_from:
     - data
   expose:
index cc45d3fd52b59288d8a62282af2486aad434fea1..9f59f84eb2e725a7f20858146d7d2d2de216607d 100644 (file)
@@ -20,4 +20,4 @@ xlrd==1.0.0
 ipython
 gitpython
 pygraphviz
-sphinx
+sphinx_rtd_theme