Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv16806/doc/UserGuide
Modified Files:
DefiningaModel.tex
Log Message:
Added doc for PyModel.Model.version
Index: DefiningaModel.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** DefiningaModel.tex 26 Aug 2003 18:53:45 -0000 1.24
--- DefiningaModel.tex 26 Aug 2003 19:38:35 -0000 1.25
***************
*** 780,783 ****
--- 780,819 ----
\subsubsection{Model's {\tt version}\label{pymodel-model-props-version}}
+ A special property, \code{version}, should be set in every PyModel, and it
+ should be equal to \code{PyModel.Model.VERSION}, currently \code{'0.1'} (a
+ string value).
+
+
+ Its purpose is to track changes in the PyModel mechanisms, especially to warn
+ you when some defaults have changed. When this happens, the file
+ \file{MIGRATION} shipped along with the source distribution, and located in
+ the top-level directory of the distribution, this file will contain details
+ about the changes, such as: the defaults that should be checked, how to update
+ your existing PyModels, etc.
+
+
+ How does this work? When a PyModel is interpreted, its \code{version} is
+ checked; if they do not correspond, you will get an exception
+ \exception{PyModel.IncompatibleVersionError} (a subclass of
+ \exception{RuntimeError}).
+
+
+ We highly recommend that you use the literate string value of \code{version}
+ and that you do not directly assign \code{PyModel.Model.VERSION} to it; you'll
+ supply it as a property, like in:
+
+ \begin{verbatim}
+ >>> model=PyModel.Model('ModelName')
+ >>> model.version='0.1'
+ \end{verbatim}
+
+ or:
+ \begin{verbatim}
+ >>> model=PyModel.Model('<ModelName>', version='0.1')
+ \end{verbatim}
+
+ This way, you are sure that you'll be warned when the default behaviour of
+ PyModels changes.
+
\subsection{Entity\label{pymodel-entity-props}}
|