Permalink
Browse files

Refactoring

	* removed depracated docs
	* added check code
	* pyflakes advices applied to flightdeck/*py files
  • Loading branch information...
1 parent 5a26401 commit 1233e39fc89b0d12e28e405e1cfbe923426c723f @zalun zalun committed Oct 1, 2010
View
BIN Docs/Addon Builder - DEPRECATED - Definition of Package Building System.pdf
Binary file not shown.
View
500 Docs/Addon Builder - DEPRECATED - Definition of Package Building System.tex
@@ -1,500 +0,0 @@
-\documentclass[10pt]{article}
-
-\title{Mozilla Addon Builder\\ DEPRECATED\\ Definition of the Package Building System}
-\author{Piotr Zalewa}
-\date{build --- \today}
-
-\def\Ua{{\tt Ua}}
-\def\Ub{{\tt Ub}}
-\def\La{{\tt La}}
-\def\Ma{{\tt Ma}}
-\def\Mb{{\tt Mb}}
-
-\def\xpi{{\tt XPI}}
-\def\amo{{\tt AMO}}
-
-\def\headsto{${\Longrightarrow}$ }
-\def\hto{\headsto}
-\def\eq{${\supset}$ }
-
-\usepackage{fullpage, url, tikz}
-\begin{document}
-\maketitle
-
-% This document is written in LaTeX
-% For quick doc please follow to http://web.mit.edu/olh/Latex/ess:Latex.html
-% All used symbols may be found here: http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols
-% Graphz are using the TikZ package: http://texamples.net/tikz
-
-{\scriptsize
- \noindent Download this document from \\
-\url{http://github.com/zalun/FlightDeck/raw/master/Docs/Addon%20Builder%20-DEPRECATED%20-%20Definition%20of%20Package%20Building\%20System.pdf}
-}{\scriptsize
- \noindent If in doubts, please take a look at the accompanied slides at \\
- \url{http://github.com/zalun/FlightDeck/raw/master/Docs/Addon\%20Builder\%20-\%20Build\%20System.pdf}
-}
-
-\section{This documet was working on assumptions which are not up to date. There will be a different
-document created, which would describe similar subjects.}
-\section{Syntax}
-
- \subsection{Objects}
-
- {\em \small {\tt x}, {\tt y}, {\tt z} --- represents {\tt [a..z]}\\
- {\tt m}, {\tt n} --- represents {\tt [0..9]+}}
-
- \begin{description}
- \item[{\tt Ux}] is the specific User (identified by {\em User:name})
- \item[{\tt Px}] is the specific Package (identified by {\em Package:name})\\
- It should always be used within its {\tt type} context as {\tt Lx} --- Library or {\tt Ax} ---
- Addon\\
- Every Package has an associated PackageRevision\footnote{PackageRevision is not the same as
- Package version. The latter is just meta-data, a text field of PackageRevision object used only
- in exported \xpi. It will no longer be used for data identification.} (identified by a triplet
- {\tt Ux:Py.n} \\{\em User/Package/PackageRevision:revisionNumber})
- \item[{\tt Mx}] is the Module (identified by {\tt Ux:Py.n:Mz}
- {\em PackageRevision/Module:name}\footnote{Every data object is identified by a PackageRevision.
- The concept is similar to {\em git}'s commits. In essence, for every saved Module change, a new
- PackageRevision is created.})
- \end{description}
-
- \subsection{Object identification --- revision numbers and HEAD}
- \begin{description}
- \item[{\tt Ux:Py.n}] defines revision of the Package.\\
- {\tt Ua:La.1} --- First revision of Library \La\ saved by \Ua.
- \item[{\tt Ux:Py.n:Mz}] defines the precise Module revision --- a Module inside the PackageRevision. \\
- {\tt Ua:La.1:Ma} --- Module \Ma\ inside the first revision of Library \La\ saved by \Ua.
- \item[{\tt Px \hto Uy:Px.n}] is the HEAD revision of the Package\\
- {\tt La \hto Ua:La.1} --- \La's HEAD points to the first revision of Library \La\ saved by \Ua.
- \item[{\tt Ux:Py.n \eq \{Ux:Py.m:Mz, \ldots\}}] Modules inside the Package revision.\\
- {\tt Ua:La.2 \eq \{Ua:La.1:Ma, Ub:La.2:Mb\}} --- Second revision of Library \La\ saved by
- \Ua\ contains \Ma\ saved by \Ua\ in his \La's first revision and \Mb\ saved by \Ub\ in his
- second \La's revision.
- \end{description}
-
-\section{Relations between database objects}
- Graph of a sample database stage for the {\tt La \hto Ua:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}}. Every object
- relates to the appropriate User.
-
- \vspace{0mm}\begin{tikzpicture}[
- package/.style={rectangle,draw=blue!80,fill=blue!20,font=\tt,anchor=west},
- user/.style={rectangle,draw=orange!80,fill=orange!20,font=\tt,anchor=west},
- revision/.style={rectangle,draw=blue!80,fill=blue!20,font=\tt,anchor=west},
- module/.style={rectangle,draw=green!80,fill=green!20,font=\tt,anchor=west},
- created/.style={draw=orange!80,thick},
- createdlab/.style={auto,swap,orange,font=\small},
- parent/.style={draw=blue!80,thick,blue},
- parentlab/.style={auto,swap,blue,font=\small},
- origin/.style={draw=gray!90,thick,gray},
- originlab/.style={auto,swap,gray,font=\small},
- ismodule/.style={draw=green!80,thick},
- ismodulelab/.style={auto,swap,green,font=\small},
- heads/.style={draw=red,very thick},
- headslab/.style={auto,swap,red,font=\small}
- ]
- \node [package] (La) at (0,-1) {La};
- \node [user] (Ua) at (2,0) {Ua}
- edge [<-,created,bend right=45] node [createdlab,rotate=20,anchor=south] {created by} (La);
- \node [user] (Ub) at (8,0) {Ub};
- \node [revision] (UaLa0) at (2,-1) {Ua:La.0};
- edge [->,parent] (La);
- \node [revision] (UaLa1) at (2,-2) {Ua:La.1}
- edge [->,parent,bend left=30] (La)
- edge [->,origin] (UaLa0);
- \node [module] (UaLa1Ma) at (4.5,-2) {Ua:La.1:Ma}
- edge [->,ismodule] (UaLa1);
- \node [revision] (UbLa0) at (8,-3) {Ub:La.0}
- edge [->,parent,bend left=30] (La)
- edge [->,origin,bend left=30] node [originlab,anchor=south,rotate=350] {originated from} (UaLa1)
- edge [<-,ismodule,bend left=20] node [ismodulelab,anchor=south,rotate=340] {belongs to} (UaLa1Ma);
- \node [revision] (UbLa1) at (8,-4) {Ub:La.1}
- edge [->,parent,bend left=30] node [parentlab,anchor=south,rotate=340] {relates to} (La)
- edge [->,origin] (UbLa0)
- edge [<-,ismodule,bend left=20] (UaLa1Ma)
- edge [<-,heads,bend left=40] node [headslab,below,rotate=345] {HEAD revision} (La);
- \node [module] (UbLa1Mb) at (10.5,-4) {Ub:La.1:Mb}
- edge [->,ismodule] (UbLa1);
- \end{tikzpicture}
-
- Real world example will be more complicated. In essence a PackageRevision might (and most of the time
- will) be originated from more than one PackageRevisions. There is also no mention of Library dependencies.
-
-
-\section{Exporting \xpi}
-
- Be aware that it is possible and common to export \xpi\footnote{An XPI (pronounced "zippy" and derived
- from XPInstall) installer module is a ZIP file that contains an install script or a manifest at the root
- of the file, and a number of data files.} from partially unsaved data. This happens when User will use
- the "Try in browser" functionality. In this case \xpi\ may not be send to
- \amo\footnote{\url{http://addons.mozilla.org/}}.
-
- \subsection{Creating directory structure}
-
- Directory structure should be as close as standard Jetpack SDK as possible.
-
- \subsubsection*{Create temporary directory and copy Jetpack SDK Packages}
-
- \begin{itemize}
- \item{\tt /tmp/packages\_\{hash\}\footnote{hash is a random string, different for every
- exported \xpi}/
- \begin{itemize}
- \item{development-mode/}
- \item{jetpack-core/}
- \item{nsjetpack/}
- \item{test-harness/}
- \end{itemize}
- }
- \end{itemize}
-
- \subsection{Exporting Packages with Modules}
-
- \begin{enumerate}
- \item{Create Package and its Modules directories\\
- {\tt /tmp/packages\_\{hash\}/\{Package:name\}/}\\
- {\tt /tmp/packages\_\{hash\}/\{Package:name\}/lib/}
- }
- \item{Use collected data to create the Manifest.\\
- {\tt /tmp/packages\_\{hash\}/\{Package:name\}/package.json}
- }
- \item{Create Module files\\
- Iterate over the assigned Modules and create a "{\tt .js}" file with its content inside
- Package's {\tt lib/} directory.
- }
- \item{Export dependencies\\
- Iterate over Libraries on which a Package depends and repeat this section ({\em Export
- the Package with Modules}) for every Library.
- }
- \end{enumerate}
-
- \subsection{Building \xpi}
-
- System is already in a virtual environment knowing about Jetpack SDK. It is enough to change
- directory to {\tt /tmp/packages\_\{hash\}/\{Package:name\}/} and call {\tt cfx xpi}. The
- {\tt \{Package:name\}.xpi} file will be created in current directory. Its location is then send
- to the front-end to be used in further actions, usually calling the {\em FlightDeck Addon}\footnote{
- FlightDeck Addon is a Jetpack extension allowing to temporary installation of the \xpi. It
- needs to be called with an URL of the \xpi.} to download and install the \xpi.
-
- \subsection{Uploading to AMO}
-
- Create \xpi\ from the database object. Use {\tt mechanize} lib to login to \amo and upload the
- file faking it was done directly from the browser.
-
-\section{Editing Package and its Modules}
-
- How database evolves by changing the Packages and Modules. This description will be used later to design
- structure and functionalities of the system.
-
- \subsection{Starting point}
- \noindent All next scenarios start from the {\tt Ua:La.1} defined as below.
- \subsubsection*{{\tt La \hto Ua:La.1 \eq \{Ua:La.1:Ma\}}}
- Package \La\ is created by User \Ua.\\
- \La's HEAD is PackageRevision identified as {\tt Ua:La.1}\\
- It contains only one module - \Ma
-
- \noindent Following steps had to happen to achieve above status:
-
- \vspace{5mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- branchfrom/.style={circle},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};
- \node [branch] (UaLa0) at (0,0) {}
- node [labr] at (5mm,0) {Ua:La.0 \eq \{\}}
- node [labl] at (-5mm,0) {\Ua\ creates empty Library \La};
- \node [heads] (LaUaLa0) at (0,-5mm) {}
- edge (UaLa0)
- node [labr] at (5mm,-5mm) {La \hto Ua:La.0}
- node [labl] at (-5mm,-5mm) {System sets \La's HEAD};
- \node [save] (UaLa1) at (0,-10mm) {}
- edge (LaUaLa0)
- node [labr] at (5mm,-10mm) {Ua:La.1 \eq \{Ua:La.1:Ma\}}
- node [labl] at (-5mm,-10mm) {\Ua\ adds new Milestone \Ma\ to \La};
- \node [heads] (LaUaLa1) at (0,-15mm) {}
- edge [<-] (UaLa1)
- node [labr] at (5mm,-15mm) {La \hto Ua.La.1}
- node [labl] at (-5mm,-15mm) {\Ua\ sets the HEAD};
- \end{tikzpicture}
-
- \subsection{Scenario (1 Module, 2 Users, no dependencies)}
- \Ua\ and \Ub\ are working on \La\\
- \Ub\ modified one module
-
- \vspace{3mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- branchfrom/.style={circle},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [heads] (UaLa1) at (0,0) {};
- \node [branch] (UbLa0) at (5mm,-5mm) {}
- edge [bend right] (UaLa1)
- node [labr] at (10mm,-5mm) {Ub:La.0 \eq \{Ua:La.1:Ma\}}
- node [labl] at (-5mm,-5mm) {\Ub\ creates new branch};
- \node [save] (UbLa1) at (5mm,-10mm) {}
- edge [-] (UbLa0)
- node [labr] at (10mm,-10mm) {Ub:La.1 \eq \{Ub:La.1:Ma\}}
- node [labl] at (-5mm,-10mm) {\Ub\ saved changes to \Ma}
- node [labl] at (-5mm,-15mm) {\Ub\ sends {\em request} to \La's creator to updade \La's HEAD};
- \node [heads] (LaUbLa1) at (5mm,-20mm) {}
- edge[<-] (UbLa1)
- node [labr] at (10mm,-20mm) {La \hto Ub:La.1}
- node [labl] at (-5mm,-20mm) {\Ua\ accepts the request by setting the HEAD to \Ub's version};
- \end{tikzpicture}\vspace{5mm}
-
- \noindent Result: {\tt La \hto Ub:La.1 \eq \{Ub:La.1:Ma\}}
-
- \subsection{Scenario (2 Modules, 2 Users, no dependencies)}
-
- \Ua\ and \Ub\ are working on \La\\
- \Ua\ created module \Mb\\
- \Ub\ is working on \Mb\
-
- \vspace{-3mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- branchfrom/.style={circle},
- point/.style={circle,minimum size=0pt},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [heads] (UaLa1) at (0,0) {};
- \node [save] (UaLa2) at (0,-5mm) {}
- edge (UaLa1)
- node [labr] at (10mm,-5mm) {Ua:La.2 \eq \{Ua:La.1:Ma, Ua:La.2:Mb\}}
- node [labl] at (-5mm,-5mm) {\Ua\ adds a new module \Mb\ to \La};
- \node [heads] (LaUaLa2) at (0,-10mm) {}
- edge (UaLa2)
- node [labr] at (10mm,-10mm) {La \hto Ua:La.2}
- node [labl] at (-5mm,-10mm) {\Ua\ sets the HEAD};
- \node [branch] (UbLa0) at (5mm,-15mm) {}
- edge [bend right] (LaUaLa2)
- node [labr] at (10mm,-15mm) {Ub:La.0 \eq \{Ua:La.1:Ma, Ua:La.2:Mb\}}
- node [labl] at (-5mm,-15mm) {\Ub\ creates new branch};
- \node [save] (UbLa1) at (5mm,-20mm) {}
- edge (UbLa0)
- node [labr] at (10mm,-20mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}}
- node [labl] at (-5mm,-20mm) {\Ub\ modifies \Mb}
- node [labl] at (-5mm,-25mm) {\Ub\ sends request to \Ua\ to upgrade \La}
- node [point] (p1) at (5mm,-30mm) {} edge [-] (UbLa1);
- \node [save] (UaLa3) at (0,-30mm) {}
- edge (LaUaLa2)
- node [labr] at (10mm,-30mm) {Ua:La.3 \eq \{Ua:La.3:Ma, Ua:La.2:Mb\}}
- node [labl] at (-5mm,-30mm) {\Ua\ modifies \Ma};
- \node [branch] (UaLa4) at (0,-35mm) {}
- edge (UaLa3)
- edge [bend right] (p1)
- node [labr] at (10mm,-35mm) {Ua:La.4 \eq \{Ua:La.3:Ma, Ub:La.1:Mb\}}
- node [labl] at (-5mm,-35mm) {\Ua\ acepts \Ub's request, upgrades \La};
- \node [heads] (LaUaLa4) at (0,-40mm) {}
- edge [<-] (UaLa4)
- node [labr] at (10mm,-40mm) {La \hto Ua:La.4}
- node [labl] at (-5mm,-40mm) {\Ua\ sets the HEAD};
- \end{tikzpicture}\vspace{4mm}
-
- \noindent Result: {\tt La \hto Ua:La.4 \eq \{Ua:La.3:Ma, Ub:La.1:Mb\}}
-
- \subsection{Scenario (2 Modules, 2 Users, no dependencies)}
-
- \Ua\ and \Ub\ are working on \La\\
- \Ub\ created module \Mb\
-
- \vspace{5mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- branchfrom/.style={circle},
- point/.style={circle,minimum size=0pt},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [heads] (UaLa1) at (0,0) {};
- \node [branch] (UbLa0) at (5mm,-5mm) {}
- edge [bend right] (UaLa1)
- node [labr] at (10mm,-5mm) {Ub:La.0 \eq \{Ua:La.1:Ma\}}
- node [labl] at (-5mm,-5mm) {\Ub\ creates new branch};
- \node [save] (UaLa2) at (0,-10mm) {}
- edge (UaLa1)
- node [labr] at (10mm,-10mm) {Ua:La.2 \eq \{Ua:La.2:Ma\}}
- node [labl] at (-5mm,-10mm) {\Ua\ modifies \Ma};
- \node [save] (UbLa1) at (5mm,-15mm) {}
- edge (UbLa0)
- node [labr] at (10mm,-15mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ua:La.1:Mb\}}
- node [labl] at (-5mm,-15mm) {\Ub\ adds a new module \Mb\ to \La};
- \node [save] (UbLa2) at (5mm,-20mm) {}
- edge (UbLa1)
- node [labr] at (10mm,-20mm) {Ub:La.2 \eq \{Ua:La.1:Ma, Ub:La.2:Mb\}}
- node [labl] at (-5mm,-20mm) {\Ub\ modifies \Mb}
- node [labl] at (-5mm,-25mm) {\Ub\ sends request to \Ua\ to upgrade \La}
- node [point] (p1) at (5mm,-25mm) {} edge [-] (UbLa2);
- \node [branch] (UaLa3) at (0,-30mm) {}
- edge (UaLa2)
- edge [bend right] (p1)
- node [labr] at (10mm,-30mm) {Ua:La.3 \eq \{Ua:La.2:Ma, Ub:La.2:Mb\}}
- node [labl] at (-5mm,-30mm) {\Ua\ acepts \Ub's request};
- \node [heads] (LaUaLa3) at (0,-35mm) {}
- edge [<-] (UaLa3)
- node [labr] at (10mm,-35mm) {La \hto Ua:La.3}
- node [labl] at (-5mm,-35mm) {\Ua\ sets the HEAD};
- \end{tikzpicture}\vspace{5mm}
-
- \noindent Result: {\tt La \hto Ua:La.3 \eq \{Ua:La.2:Ma, Ub:La.2:Mb\}}
-
- \subsection{Scenario with conflict (2 Modules, 2 Users, no dependencies)}
-
- \Ua\ and \Ub\ are working on \La\\
- \Ua\ created module \Mb\\
- \Ua\ and \Ub\ are working on \Mb\\
- Conflict arises...
-
-
-
- \vspace{5mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- conflict/.style={rectangle,draw=red,fill=red,minimum size=1.5mm},
- branchfrom/.style={circle},
- point/.style={circle,minimum size=0pt},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,15mm) {\bf Steps leading to the conflict:};
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [heads] (UaLa1) at (0,0) {};
- \node [save] (UaLa2) at (0,-5mm) {}
- edge (UaLa1)
- node [labr] at (10mm,-5mm) {Ua:La.2 \eq \{Ua:La.1:Ma, Ua:La.2:Mb\}}
- node [labl] at (-5mm,-5mm) {\Ua\ adds a new module \Mb\ to \La};
- \node [heads] (LaUaLa2) at (0,-10mm) {}
- edge (UaLa2)
- node [labr] at (10mm,-10mm) {La \hto Ua:La.2}
- node [labl] at (-5mm,-10mm) {\Ua\ sets the HEAD};
- \node [branch] (UbLa0) at (5mm,-15mm) {}
- edge [bend right] (LaUaLa2)
- node [labr] at (10mm,-15mm) {Ub:La.0 \eq \{Ua:La.1:Ma, Ua:La.2:Mb\}}
- node [labl] at (-5mm,-15mm) {\Ub\ creates new branch};
- \node [save] (UbLa1) at (5mm,-20mm) {}
- edge (UbLa0)
- node [labr] at (10mm,-20mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}}
- node [labl] at (-5mm,-20mm) {\Ub\ modifies \Mb};
- \node [save] (UaLa3) at (0mm,-25mm) {}
- edge (LaUaLa2)
- node [labr] at (10mm,-25mm) {Ua:La.3 \eq \{Ua:La.1:Ma, Ua:La.3:Mb\}}
- node [labl] at (-5mm,-25mm) {\Ua\ modifies \Mb};
-
- \end{tikzpicture}\vspace{5mm}
-
- \noindent Libraries {\tt Ub:La.1} and {\tt Ua:La.3} are {\bf conflicted} because {\tt Ub:La.1:Mb} and
- {\tt Ua:La.3:Mb} are both an evolution of the {\tt Ua:La.2:Mb}. From that moment many scenarios may
- happen. Just a few of them will follow.
-
- \subsubsection{\Ua\ sets HEAD and \Ub's revision is outdated}
-
- \La's manager --- \Ua\ has chosen the HEAD. At that moment he doesn't know about \Ub's changes to \Mb.
-
- \vspace{5mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- conflict/.style={rectangle,draw=red,fill=red,minimum size=1.5mm},
- branchfrom/.style={circle},
- point/.style={circle,minimum size=0pt},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [save] (UbLa1) at (5mm,0mm) {}
- node [labr] at (10mm,-0mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}};
- \node [save] (UaLa3) at (0mm,-5mm) {}
- node [labr] at (10mm,-5mm) {Ua:La.3 \eq \{Ua:La.1:Ma, Ua:La.3:Mb\}};
- \node [heads] (LaUaLa3) at (0,-10mm) {}
- edge (UaLa3)
- node [labr] at (10mm,-10mm) {La \hto Ua:La.3}
- node [labl] at (-5mm,-10mm) {\Ua\ sets the HEAD}
- node [point] (p1) at (0,-20mm) {}
- edge [dotted] (LaUaLa3);
- \node [conflict] (CUbLa1) at (5mm,-15mm) {}
- edge (UbLa1)
- node [labl] at (-5mm,-15mm) {{\tt Ub:La.1} is marked as {\em conflicted}. Send update
- request disabled}
- node [labl] at (-5mm,-20mm) {\Ub\ receives info that his source is behind the HEAD}
- node [labr,red] at (1cm,-15mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}};
- \node [save] (UbLa2) at (5mm,-25mm) {}
- edge (CUbLa1)
- edge [dotted, bend left] (p1)
- node [labr] at (1cm,-25mm) {Ub:La.2 \eq \{Ua:La.1:Ma, Ub:La.2:Mb\}}
- node [labl] at (-5mm,-25mm) {\Ub\ manually solves conflict by editing \Mb}
- node [labl] at (-5mm,-30mm) {\Ub\ sets the conflict as resolved};
- \end{tikzpicture}\vspace{5mm}
-
- From that moment {\Ub:La.2} becomes a normal (not conflicted) PackageRevision. \Ub\ may send
- Package manager an upgrade request which could end by switching \La's HEAD to {\Ub:La.2}.
- It is important to note, that the {\tt Ub:La.2} is not an evolution of {\tt Ua:La.3}, it will not be
- originated from it.\footnote{Decide if this is the right thing to do.}
-
- \subsubsection{\Ub\ sends update request, \Ua\ decides to drop his changes}
-
- \Ub\ thinks his change to \Mb\ is finished and requests update of the Library from its manager --- \Ua.
- He accepts the request and marks his version of this module as discontinued. This mark prevents from
- the automatic set to conflicted revision.
-
- \vspace{5mm}\begin{tikzpicture}[
- save/.style={circle,draw,minimum size=1.5mm},
- branch/.style={circle,draw=red!80,fill=red!20,minimum size=1.5mm},
- heads/.style={circle,draw=green!80,fill=green!20,minimum size=1.5mm},
- conflict/.style={rectangle,draw=red,fill=red,minimum size=1.5mm},
- discontinued/.style={rectangle,draw=black,fill=black,minimum size=1.5mm},
- branchfrom/.style={circle},
- point/.style={circle,minimum size=0pt},
- labr/.style={anchor=west,font=\tt},
- labl/.style={anchor=east},
- bend angle=45,
- inner sep=0pt]
- \node at (0,5mm) [rotate=270] {\Ua};\node at (5mm,5mm) [rotate=270] {\Ub};
- \node [save] (UbLa1) at (5mm,0mm) {}
- node [labr] at (10mm,-0mm) {Ub:La.1 \eq \{Ua:La.1:Ma, Ub:La.1:Mb\}};
- \node [save] (UaLa3) at (0mm,-5mm) {}
- node [labr] at (10mm,-5mm) {Ua:La.3 \eq \{Ua:La.1:Ma, Ua:La.3:Mb\}};
- \node [labl] at (-5mm,-10mm) {\Ub\ sends request to \Ua\ to upgrade \La};
- \node [discontinued] (DUaLa3) at (0,-15mm) {}
- edge (UaLa3)
- node [labl] at (-5mm,-15mm) {\Ua\ marks the revision as discontinued (optional)}
- node [labr,gray] at (1cm,-15mm) {{Ua:La.3 \eq \{Ua:La.1:Ma, Ua:La.3:Mb\}}};
- \node [heads] (LaUbLa1) at (5mm,-20mm) {}
- edge (UbLa1)
- node [labr] at (1cm,-2cm) {La \hto Ub:La.1}
- node [labl] at (-5mm,-2cm) {\Ua\ sets \La's HEAD};
-
- \end{tikzpicture}\vspace{5mm}
-
-\section*{Draft/Ideas}
- \begin{description}
- \item[update Library] if Library HEAD has been changed something should tell the User that an update
- is possible. It should then (on request) change the versions of all Modules which are not in conflict
- with updating Library. In essence, if \\
- {\tt Ua:La.1 \eq \{Ua:La.1:Ma, Ub:La.2:Mb\}} is a Library to be updated and \\
- {\tt La \hto Uc:La.3 \eq \{Ub:La.1:Ma, Uc:La.3:Mb, Uc:La.1:Mc\}} is current HEAD, then\\
- {\tt Ub:La.2:Mb} should be updated to {\tt Uc:La.3:Mb} and {\tt Uc:La.1:Mc} should be added.\\
- User should receive a notification that {\tt Ua:La.1:Ma} is not in sync with HEAD.
- \end{description}
-
-\section*{To be continued\ldots}
-\end{document}
-
View
9 flightdeck/manage.py
@@ -1,10 +1,15 @@
#!/usr/bin/env python
from django.core.management import execute_manager
try:
- import settings # Assumed to be in the same directory.
+ import settings # Assumed to be in the same directory.
except ImportError:
import sys
- sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+ sys.stderr.write(' '.join([
+ "Error: Can't find the file 'settings.py' in the directory containing",
+ "%r. It appears you've customized things.\nYou'll have to run",
+ "django-admin.py, passing it your settings module.\n(If the file",
+ "settings.py does indeed exist, it's causing an ImportError",
+ "somehow.)\n"]) % __file__)
sys.exit(1)
if __name__ == "__main__":
View
17 flightdeck/settings.py
@@ -13,18 +13,8 @@
MANAGERS = ADMINS
-DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = '' # Or path to database file if using sqlite3.
-DATABASE_USER = '' # Not used with sqlite3.
-DATABASE_PASSWORD = '' # Not used with sqlite3.
-DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
-
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
-# although not all choices may be available on all operating systems.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
@@ -65,7 +55,7 @@
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
- 'django.template.loaders.eggs.load_template_source', # this was commented out
+ 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
@@ -90,9 +80,6 @@
ADDONS_HELPER_URL = 'https://addons.mozilla.org/firefox/downloads/latest/182410?src=external-builder'
TEMPLATE_DIRS = (
- # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
- # Always use forward slashes, even on Windows.
- # Don't forget to use absolute paths, not relative paths.
)
# Tests
@@ -129,7 +116,7 @@
# FlightDeck apps
'base', # basic flightdeck things (utils, urls)
'person', # user related stuff (profile etc.)
- 'amo', # addons.mozilla.org integration (authentication state updates)
+ 'amo', # currently addons.mozilla.org authentication
'jetpack', # Jetpack functionality
'api', # API browser
'tutorial' # Load tutorial templates
View
35 flightdeck/settings_local-default.py
@@ -1,19 +1,21 @@
import os.path
-FRAMEWORK_PATH = os.path.dirname(os.path.dirname(__file__)) +'/'
+FRAMEWORK_PATH = os.path.dirname(os.path.dirname(__file__)) + '/'
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.sqlite3', # Change 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': os.path.join(FRAMEWORK_PATH,'dev.db'), # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
- 'PASSWORD': '', # Not used with sqlite3.
- 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ 'ENGINE': 'django.db.backends.sqlite3',
+ # Change 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3'
+ 'NAME': os.path.join(FRAMEWORK_PATH, 'dev.db'),
+ # Or path to database file if using sqlite3.
+ 'USER': '',
+ 'PASSWORD': '',
+ 'HOST': '',
+ 'PORT': '',
}
}
@@ -28,8 +30,9 @@
INTERNAL_IPS = ('127.0.0.1',)
-MEDIA_ROOT = os.path.join(FRAMEWORK_PATH, 'flightdeck/media/')
-ADMIN_MEDIA_ROOT = os.path.join(FRAMEWORK_PATH, 'flightdeck/adminmedia/')
+MEDIA_ROOT = os.path.join(FRAMEWORK_PATH, 'flightdeck/media/')
+ADMIN_MEDIA_ROOT = os.path.join(FRAMEWORK_PATH,
+ 'flightdeck/adminmedia/')
#MEDIA_URL = '/sitemedia/'
#MEDIA_SERVER = ''
#ADMIN_MEDIA_PREFIX = ''.join([MEDIA_SERVER,'/adminmedia/'])
@@ -44,13 +47,13 @@
SDK_SOURCE_DIR = os.path.join(FRAMEWORK_PATH, 'sdk_versions/')
"""
-# uncomment if FlightDeck should authenticate against database and not scrape AMO
+# uncomment if FlightDeck should authenticate against database
AUTH_DATABASE = {
- 'NAME': '',
- 'TABLE': 'users',
- 'USER': '',
- 'PASSWORD': '',
- 'HOST': '',
- 'PORT': '' # Set to empty string for default.
+ 'NAME': '',
+ 'TABLE': 'users',
+ 'USER': '',
+ 'PASSWORD': '',
+ 'HOST': '',
+ 'PORT': ''
} # it's always MySQL!
"""
View
6 flightdeck/urls.py
@@ -10,7 +10,7 @@
urls = [
# home
- url(r'^$',base_views.homepage, name='home'),
+ url(r'^$', base_views.homepage, name='home'),
]
if settings.DEBUG:
@@ -24,8 +24,8 @@
urls.extend([
# static files
# this should be used only in development server
- # please refer to http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-media-files
- url(r'^media/(?P<path>.*)$', static.serve, {'document_root': settings.MEDIA_ROOT}, name='media'),
+ url(r'^media/(?P<path>.*)$', static.serve,
+ {'document_root': settings.MEDIA_ROOT}, name='media'),
# API Browser
(r'^api/', include('api.urls')),
View
7 flightdeck/urls_local-default.py
@@ -1,7 +0,0 @@
-from django.conf.urls.defaults import url, patterns, include
-
-urlpatterns = patterns('flightdeck.base.views',
- url(r'^$','placeholder', name='placeholder'),
-)
-
-
View
3 requirements/development.txt
@@ -25,3 +25,6 @@ mock
#editing
pylint
+
+# check before commit
+-e git://github.com/jbalogh/check.git#egg=check
View
15 tools/git-exclude
@@ -4,11 +4,7 @@
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
-.DS_Store
-logs
adminmedia
-dev.db
-pip-log.txt
flightdeckenv
flightdeck/media/jetpack
flightdeck/media/tutorial
@@ -17,16 +13,5 @@ flightdeck/media/codemirror
flightdeck/media/roar
flightdeck/media/api
flightdeck/jetpack/media/media
-sdk_versions
-*local.py
-*local.wsgi
-*local.sh
-*.pyc
-.*swp
-.log
-*.log
-*.aux
-*.log
-*.synctex.gz
upload

0 comments on commit 1233e39

Please sign in to comment.