From 2dbb31275dac47dd39381e8d65648cb5d4ad8ba9 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 21 Nov 2018 16:34:12 +0100 Subject: [PATCH] version 000 de la doc catalogue --- docCataWriter/.oper_and_proc.rst.swp | Bin 0 -> 12288 bytes docCataWriter/.structure_rules.rst.swp | Bin 0 -> 16384 bytes docCataWriter/Makefile | 153 +++++++++++++++ docCataWriter/bloc.rst | 70 +++++++ docCataWriter/conf.py | 247 +++++++++++++++++++++++++ docCataWriter/fact.rst | 67 +++++++ docCataWriter/first_notions.rst | 28 +++ docCataWriter/index.rst | 28 +++ docCataWriter/oper_and_proc.rst | 85 +++++++++ docCataWriter/python_rules.rst | 51 +++++ docCataWriter/simp.rst | 157 ++++++++++++++++ docCataWriter/structure_rules.rst | 139 ++++++++++++++ docCataWriter/vimp_presentation.rst | 40 ++++ 13 files changed, 1065 insertions(+) create mode 100644 docCataWriter/.oper_and_proc.rst.swp create mode 100644 docCataWriter/.structure_rules.rst.swp create mode 100644 docCataWriter/Makefile create mode 100644 docCataWriter/bloc.rst create mode 100644 docCataWriter/conf.py create mode 100644 docCataWriter/fact.rst create mode 100644 docCataWriter/first_notions.rst create mode 100644 docCataWriter/index.rst create mode 100644 docCataWriter/oper_and_proc.rst create mode 100644 docCataWriter/python_rules.rst create mode 100644 docCataWriter/simp.rst create mode 100644 docCataWriter/structure_rules.rst create mode 100644 docCataWriter/vimp_presentation.rst diff --git a/docCataWriter/.oper_and_proc.rst.swp b/docCataWriter/.oper_and_proc.rst.swp new file mode 100644 index 0000000000000000000000000000000000000000..10cedadf6154d3d69f241a029664c379dfdfc7e6 GIT binary patch literal 12288 zcmeI2&u<(x6vtgazfVRnkDAR4ea{H#;yp9>$)g zi=y_%0SO976>#Ja;O7Ny2oAJJNQeV)03>dJglNTYC`f$mncd9hM{oCO`~rRkKY<^?58w>=0(=fW0;j?2;5G0pkRSkiz)r9p ze7AwIZ^1XGFV^4zx za2V_Yo4~m%;1~E1d;s18FN2rBi{J(DJU9uS1oNNCOyeA;uy{zJZGjxFRIT(}Vak%A0 z*_{oUe~rvnhV@a+m)@&twU8L;#;m6cCvjf>mCy4*vFUJtYaRRbM2i6gbYNU4H})fw z2XXz!WnsV*4W0zrv^G3k(S{;i0l9}16jI}#)t9X%Wx7my>i zFGoc@iUf~wgpH=4x|s9B&}fJj=7!mq8OS;1(5w~J2r1xTh>-bOQR*~QaA-=xk*t~a zTcVuCfp{!Pv?AShmIus)jg1>mSBP6bgL?gC^N9#bC2GbjRcU5&YJXq)GOHq!mCYEd zrD>el>8qdM|e|>%!=zQmZd=)?K@~sn>uH}grA4Gx?Rj!hpI)hlQVkZZuE|a=W|<+Qto3D8 zS8`FWIF+GgQCEH|3G8IY?9qXVN$>pW%Gn$C8LUCn)~KjaIg){%vHXJH5drsSQ&*Q;HUC7|UgH93vAAq&*-* za-^r0(Su^4lh|ehb1zNdsA#R(iU_C)jM*D5utWr5Z#ur&iU_$XH1drsNi*zD5sH`x zq}upRa1`}xwy+s{4GnA=C44{PN@x=r({~UE*ZzV)PAi!XN)8F`Hq*{*CF=yOMSvxSkRu1jqA6g*RGx223{SaDM5~idO}j=Q q=N)Run8ZrBq;&Xzr<=-F{6EC-8V!s0;-45IU literal 0 HcmV?d00001 diff --git a/docCataWriter/.structure_rules.rst.swp b/docCataWriter/.structure_rules.rst.swp new file mode 100644 index 0000000000000000000000000000000000000000..07058dfb19d3954ca6549200cd7357bf2678f425 GIT binary patch literal 16384 zcmeI2O>87b8HS6%l7u81*dVx}igW08H12hlup119jP0>C!JctuJgf#MK+y0iGr>K4D?Jjif-nz0{_{_*XfKJpg(m(5uD%jXx*Jwy+V zKfGkHc;Wo{3lE+@KHO6(!Lv0n@}ln9uA90SV?Rwrd^SnrVK*Jdq8$$dkvMUZ9-o$Z zY7{UE%%H$9?JYcX7yIJ52No&TeRKEnd(O0GNWcU&3K#{90!9I&fKk9GU=%P47zIA+ z3Z#Qu*wZM)ExI5heg4?Q`Q!Tfv-*5x;<>&wC!>H-z$jo8FbWt2i~>dhqkvJsC}0#Y z3K#|c4;64d#_mSGZlwhP?Eh!;|G(hohu}T%F8CF=3SI#(gFWDY4^K1pXYhOQK6nqj z3$B6J!E4}W;0NIQ;CtX1kb=*E)8K=<5DxqVJPA7BG4L&L3f#Dpu^)jJ*a6=FE8uT; zF!o3AOYk)C!7jK6?g3}O^-nSOJXiy-@IV(l1|9{c!26$M?6=@5coD?F1&@QTgTJ3bKEZR~S?~-PfXBgU@TX5O z_B(I`d>8aU3+#Y(PyzqMBFr`L68IWe244jW;0xd#)Zwe(W$--s5|{&@2cHAC0a?#D z9~?V-O#Znk?+Z6fIA3Cn)8RPId`bN)uhmcfRxB>zYmH@_Z#OE`OAuT371)V8;$B3=gWM(yt-p2shbYdWvgeE*wT`GF>)#Rcf|fE zioJy6N5tGuWS;%-Qg0YIG6a1;q6?Dlp-g^{r--;-Z8UeX=oBvzf#{~fE6K+Z!o&%8 zV-Z>@cY`1r3D02*g@YAK2?>$0`+2p;@dA}z!aGQcuQw`>wzsOalK!u}%efnR>T0{( zEOC@}bF)Gjx$FkM=kRH1MPaa?OY0!cFub`~Ez0>g>k$61^~g#)!iMlHt9BKPAF?E^wQXfu!i?0v<=yOGC~3`;a8e{y z$p5VY?YWl)Pb1zDFrp-yw4jBt3F+b;V?*^ub)#M0tw_Vcc@~?=;^yP{hiqoX%Gc&s zsCl%moK+^m<9;X`l!uSI5`mAnsCM)*-Jjs$QMOR2H7i>yn-$y23WS=66q(P^ub#Qe z!$|qM6Z}RLj&1))k8xy$vn=!4OVr83jQm8D_#^d|_FAh^-l^7Wl(25i3`$IT6X^j& z=(XMSaJ-XzKsfAoMBI*g?bPp!c9M$0?1^~8*iHQ?JUQl!=2TFjU{rN-dnCT{Kx3~R z#XO|jkSz1iTs0tVV6%Ih%I@lBt7%(VDPdnzRKs0W2btj&t8l{pqFkS)($DorCF+o- zlnrI-#=@QKkVX+XW$8^+m&A3S#8k>h`w!Kx>1LR-GKbsMy*?lLK>#&VK8T}1L=Bg! zPj|1p8v3b^ekqYvPg!n8!DZM|H5?47e?(TjeJ-x}Nt!s)1y8lyVmgPibdmw*UwUHX z8O@J^Pg4g&uB=b&50i0+SS$&KAKVsKy1_8<;qaq)z95kEpSZoO2W-{a+vUbq)wYW7 zv`XB{3!-gtz20cAZLeYAw6a-WwYyR1q3)s(H|Dw+el0Iscx=rbjH9v_a5+?pI)RU2 zn5=#|5vmhQCenFY*$g}k~vD4ZVNa=X|Sk}}GP9C||HO@E~91rP0V ztG!jP)|%~B%|^DSWN*HthDisd%+lm)q|LLTHp?ZZ45Syu7`4-&MwV=aMm$$QU(#Le8 zK4oX*W9q;=LqG5^GU2Mwuq0K8;xAhx6ICsp+Gs0rF9}Qu3x^Jbw4{FMEFFidFYFfr zwVE)lgD1elU;)g5djSV$0L|-v zgY;eiRX}N5z#K*aqkvJsC}0#Y3K#{90!9I&fKlM1pn#mh-_OUZxLi)>F$v8r-X31Q zJz`0M*38#v2Af;-(2;4%D3@XMMoe+*Os=D3x77BTT;j*Z8O?`pJ~_QHr!rEAJGqy` zWXX%`74jB-Cf4oM?QGq9ya{;ht{=t8R=)l#yNG41d+O;hEdX)lRw6r8hlgd1X!IcR_VM9axORrza&BzNW`Krhad3|4!On Hp}PMKk4|(< literal 0 HcmV?d00001 diff --git a/docCataWriter/Makefile b/docCataWriter/Makefile new file mode 100644 index 00000000..ad6d9390 --- /dev/null +++ b/docCataWriter/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 ' where 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/VIMMPdoc.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/VIMMPdoc.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/VIMMPdoc" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/VIMMPdoc" + @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/docCataWriter/bloc.rst b/docCataWriter/bloc.rst new file mode 100644 index 00000000..714eb760 --- /dev/null +++ b/docCataWriter/bloc.rst @@ -0,0 +1,70 @@ +Defining a conditional Group +============================= + +Definition and Usage +____________________ + +A conditional group appears (or not) depending on evaluation of a python condition (often parameter == value). This python condition is dynamically evaluated. +Otherwise, conditional group has the same syntax as non-conditional group. + +Syntax +______ + +General syntax +~~~~~~~~~~~~~~ + +Syntax is : +:: + myConditionalGroup = BLOC ( ( condition= " python statement", + ... #included keywords or others fact/bloc + ) + +Python statement is often <, >, == but this can be any expression returning True or False. + +BLOC can be seen as an 'if' statement +:: + print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','periodically','sometimes']), + frequency_every = BLOC ( condition= "print_frequency == 'every'", + particule_to_be_printed = SIMP(statut='o',typ='TXM', ), + ), + frequ_not_every = BLOC ( condition= "print_frequency != 'every'", + step_to_be_printed = SIMP(statut='o',typ=I, max ="**" ), + ), + + # this means : + # if frequency_every == 'every', particule_printed (only one) is requested + # else step_to_be_printed (list) is required. + + +Remember this is as python code. All "keywords" are arguments and in python, arguments are separated by comma "," and inside of parenthesis. note also that conditions are statement but also python string. use single quotes inside double quotes if needed. + + + +Cardinality +~~~~~~~~~~~ + - BLOC appears depanding on the evaluation of the conditional statement. it has no mandatory or optional status + - BLOC cannot be repeat. but FACT or SIMP included can + - if keywords inside the BLOC have a status. this status is applied within the BLOC + :: + wind_speed = SIMP(statut='o', typ = 'R'), + b_ask_wind_direction = BLOC ( condition= 'wind_speed > 0.5', + wind_direction = SIMP(statut='o', typ='TXM'), + rain_speed = SIMP(statut='f', typ='R', min_val = 1, max_val=20), + ), + + # this means : + # if wind_speed > 0.5, wind_direction is needed and rain_speed can be added + + + + +Other useful attributes +~~~~~~~~~~~~~~~~~~~~~~~ + +-------------+-------------------------------------------------+-----------+ + |*attribute* |*Description* |*default* | + +=============+=================================================+===========+ + |ang |short documentation | | + +-------------+-------------------------------------------------+-----------+ + + + diff --git a/docCataWriter/conf.py b/docCataWriter/conf.py new file mode 100644 index 00000000..1989792c --- /dev/null +++ b/docCataWriter/conf.py @@ -0,0 +1,247 @@ +# -*- coding: utf-8 -*- +# +# VIMMP documentation build configuration file, created by +# sphinx-quickstart on Thu Oct 1 10:55:47 2018. +# +# 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 = [] + +# 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'VIMMP' +copyright = u'2019, Pascale Noyret - Eric Fayolle' + +# 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.0' +# The full version, including alpha/beta/rc tags. +release = '0.0.alpha' + +# 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 --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +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 +# " v 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 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 = 'VIMMPDoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + # get rid off blank pages + 'classoptions': ',openany,oneside', + 'babel' : '\\usepackage[english]{babel}', + + + +# 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', 'Vimmp.tex', u'Vimmp Documentation', + u'Pascale Noyret - Eric Fayolle', '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', 'vimmpdoc', u'VIMMP Documentation', + [u'Pascale Noyret - Eric Fayolle'], 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', 'Vimmp', u'Vimmp Documentation', + u'Pascale Noyret - Eric Fayolle', 'Vimmp', '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/docCataWriter/fact.rst b/docCataWriter/fact.rst new file mode 100644 index 00000000..84317d46 --- /dev/null +++ b/docCataWriter/fact.rst @@ -0,0 +1,67 @@ +Defining a Group of Keywords +============================= + +Definition and Usage +____________________ + +|A group is a collection of elements, which together have a meaning for end-users. These elements can be keywords or other groups. +|A group has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact). + +Syntax +______ + +General syntax +~~~~~~~~~~~~~~ + +Syntax is : +:: + myGroup = FACT ( + ... #included keywords or others fact/bloc + ) + +"myGroup" is a python label. A group can not have the same name as its brothers. +It contains simple elements or groups.(No limit is defined for the recursivity height) +Source code : +:: + job_properties = FACT(statut='o', + job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0), + stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0), + print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','sometimes']), + close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0), + ), +Definition of FACT including others groups : +:: + + ThresholdExceedence = FACT ( + Event = FACT ( + Threshold = SIMP ( typ = "R", ang = "Failure threshold",), + ComparisonOperator = SIMP ( typ = "TXM", into = ( "Less", "LessOrEqual", "Equal", "GreaterOrEqual", "Greater" ),), + ), + Method = SIMP ( typ = "TXM", into = ( "Simulation", "FORM_SORM" ), ang = "Method",), + ), # + + +Cardinality +~~~~~~~~~~~ +It is possible to constrain the number of instances (cardinality) of a FACT. The cardinality is specified using the min and max attributes. +If min=max=1 (default), the FACT appears only once in a valid dataset. If max > 1, the group of parameters can appear more than once. min/max specifies the minimum/maximum number of repetitions. "**" means there is no upper limit for the maximal cardinality. +:: + species_parameters = FACT(statut='o', max="**", + species_name=SIMP(statut='o',typ='TXM'), + species_mass=SIMP(statut='o',typ='R',defaut=1.0), + species_is_frozen = SIMP(statut='f', typ=bool,), + ) + + +Note that a group can be mandatory or optional. It has optional and mandatory elements, independantly of its status. In the previous example, species_parameters has to be defined at least one time (in a valid dataset). Inside this group, species_is_frozen is not mandatory. For each instance of species_parameters, species_is_frozen may or may not appear + +Other useful attributes +~~~~~~~~~~~~~~~~~~~~~~~ + +-------------+-------------------------------------------------+-----------+ + |*attribute* |*Description* |*default* | + +=============+=================================================+===========+ + | statut |status 'o' if mandatory and 'f' if not | f | + +-------------+-------------------------------------------------+-----------+ + |ang |short documentation | | + +-------------+-------------------------------------------------+-----------+ + diff --git a/docCataWriter/first_notions.rst b/docCataWriter/first_notions.rst new file mode 100644 index 00000000..b31595de --- /dev/null +++ b/docCataWriter/first_notions.rst @@ -0,0 +1,28 @@ +First Notions of Catalogs +========================== + +Catalogs are a simple way to express data model. It organizes elements and specifies some relationship to one another. +it could be seen as a hierarchical model ordered in a tree structure. + +Catalogs have a python syntax :ref:`python-label` + +The 'root node' is called 'JdC'. it has to be defined as : +:: + JdC = JDC_CATA ( + code = 'MyCodeName', + ) + + +Apart of the root node, catalogs contains three natures of items : + - terminal leaves or "Simple Keyword" + - group of elements : + - inside elements are leaves or others groups. + - grouping these items has a meaning from the business data modelisation point of view. + - a set can be conditional : it is needed only if an other parameter has a specfic value. (ie wind_direction is needed only if wind_speed is not nul) + - commands : PROC (short for procedure) or OPER (short for operator). + - they are the second level of the hierachical tree (after root node). + - both "proc" and "oper" contain other elements (group or leaves). + - an OPER returns an object (which has to be named and typed), unlike PROC which returns nothing. + + + diff --git a/docCataWriter/index.rst b/docCataWriter/index.rst new file mode 100644 index 00000000..af370a87 --- /dev/null +++ b/docCataWriter/index.rst @@ -0,0 +1,28 @@ +.. VIMMP documentation master file, created by sphinx-quickstart on Wed Sep 14 11:40:32 2011. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to VIMMP's documentation! +================================== + +This documentation covers the usage of VIMMP as data setting tool. +This is intended for developers who want to write a datamodel and not for end-users. + + +Contents: + +.. toctree:: + :maxdepth: 1 + + vimp_presentation + first_notions + simp.rst + fact.rst + bloc.rst + oper_and_proc.rst + structure_rules.rst + python_rules + + + + diff --git a/docCataWriter/oper_and_proc.rst b/docCataWriter/oper_and_proc.rst new file mode 100644 index 00000000..09d89237 --- /dev/null +++ b/docCataWriter/oper_and_proc.rst @@ -0,0 +1,85 @@ +Defining a step +================== + +Definition and Usage +____________________ + +A Vimmp dataset is a collection of 'step'. each step is a process and is a coherent piece of the complete datastep. It helps to apprehend the whole scheme of the dataflow. +The treatment to study the behavior of a structure decomposes in operations, for example: + + * introduction of the geometry and the mesh of the structure; + * definition of the digital mesh; + * definition of materials; + * definition of the physical properties of the structure (material-element association of geometry); + * definition of the type of calculation (linear static, nonlinear static ...) + +each operation is a step for VIMMP Data Model + +Syntax +______ + +General syntax +~~~~~~~~~~~~~~ +A step can be : + + * PROC : a simple procedure + * OPER : a command returning a concept +:: +MonPROC = PROC (nom = MonOPER, .. + ); +MonOPER = OPER (nom = MonPROC, sd_prod= myUserClass, + ); + + +To describe a PROC, attribute 'nom' is mandatory and has to be the lvalue. Note that the name has to begin with a upper character. after that, inside elements are added. +:: + Solver_Input = PROC(nom = 'Solver_Input', + simulation_title = SIMP(statut='o', typ='TXM', defaut='Simple test'), + time_step = SIMP(statut='o', typ='R', defaut=0.01, val_min=0), + number_of_steps = SIMP(statut='o', typ='I', defaut=10000, val_min=1), + number_of_equilibration_steps = SIMP(statut='o', typ='I', defaut=1000, val_min=1), + job_properties= FACT(statut='o', + job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0), + stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0), + print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','sometimes']), + close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0), + ), +); + + +Defining user concept type +~~~~~~~~~~~~~~~~~~~~~~~~~~ +To describe an OPER , you have first to describe a user-defined type of concept. Declarations appears at the beginning of the catalogs. User classes inherits from ASSD. Most of the time, pass statement is all you need. +:: + from Accas import * + class myInteger(ASSD) : pass + class mesh(ASSD) : pass + class meshEntity(ASSD): pass + class meshNode(meshEntity) : pass + class meshEdges(meshEntity): pass + class field(ASSD) : pass + +OPERs return value. The return_type is a user-definded data type. +:: + class mesh(ASSD) : pass + ReadMesh = OPER (nom = 'ReadMesh', sd_prod = mesh, + MyFile= (typ=’Fichier’, statut ='o'), + ); + CalculateField = OPER( nom = 'CalculateField', sd_prod=field, + is_on_mesh=SIMP(typ=mesh, statut='o'), + calculFunction = FACT(...), + ); + + +End user can then define a mesh with ReadMesh OPER (This mesh will be named) and then uses this mesh in order to defined a Field.... + +Other useful attributes +~~~~~~~~~~~~~~~~~~~~~~~ + +-------------+-------------------------------------------------+-----------+ + |*attribute* |*Description* |*default* | + +=============+=================================================+===========+ + | statut |status 'o' if mandatory and 'f' if not | f | + +-------------+-------------------------------------------------+-----------+ + |ang |short documentation | | + +-------------+-------------------------------------------------+-----------+ + diff --git a/docCataWriter/python_rules.rst b/docCataWriter/python_rules.rst new file mode 100644 index 00000000..8f58042b --- /dev/null +++ b/docCataWriter/python_rules.rst @@ -0,0 +1,51 @@ +.. _python-label: + +=============================== +Rules for python syntax +=============================== + +Variable names and identifiers are similar to those in many other languages : +---------------------------------------------------------------------------- + +* They start with a letter (A_Z or a-z) or underscore "_"". +* They are followed by letters, numbers or underscores. +* They are case-sensitive. +* A string is a sequence of caracters enclosed by a matching pair of single or double quotes. + + + +Some identifiers are reserved words : +------------------------------------- + +* You can't use words of the python language as identifiers. +* Some identifiers are reserved words. For example, you can't use the following words, even if it would make some interesting names: + - ASSD, BLOC, EXCLUS, + - ENTITE, ETAPE, EVAL, , JDC + - OPER, PROC, + - REGLE, VALIDATOR + + +Python's way for assigning values to variables: +------------------------------------------------- + +* Keep in mind that in python files, the simplest form of assignement is : variable = value +* The hash character (#) starts a comment +* Tuples are enclosed in parentheses. +* Lists are enclosed in bracked. +* In tuples or lists, a ',' follows each item especially the last one. + +Catalogs are executable python files: +------------------------------------- + +* bracked have to be closed. +* if needed, classes or functions should be defined. +* arguments are separated with ',' + +.. code:: python +time_step = SIMP(statut='o', typ='R',) + +This is a instantiation operation. it creates an object of type SIMP. the SIMP __init__() is called with two arguments statut and typ. +You have to respect python syntax. + + + diff --git a/docCataWriter/simp.rst b/docCataWriter/simp.rst new file mode 100644 index 00000000..85fc3c2b --- /dev/null +++ b/docCataWriter/simp.rst @@ -0,0 +1,157 @@ +Defining a Keyword +=================== + +Definition and Usage +____________________ + +A keyword defines an input parameter. it specifies the information and some of the constraints about the value of this parameter. +It has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact). + +Syntax +______ + + +General syntax +~~~~~~~~~~~~~~ + +Source line code is : +:: + myKeyword = SIMP (typ = 'F') + +| Attribute "typ" defines the keyword type (in this case, float) +| "myKeyword" is the keyword name. it is a python label. A keyword can not have the same name as its brothers. +| Attribute typ is mandatory. Other attributes (see below) have default value and are optional. + + +Types +~~~~~~ + +The attribute typ can take several values : + + - A "simple "type : + * boolean (bool) + * integer (I), + * float (R) + * complex(C) + * text(TXM), + + Examples : + :: + number_of_species = SIMP( typ='I'), + YoungModulus = SIMP( typ='R'), + electrostatics_is_on = SIMP('o', typ=bool, ) + + + + Valid values for number_of_species : 1, -6, 128 + Valid values for YoungModulus : 1, 110.3, -6., 14.5×10−3 + Valid values for electrostatics_is_on : True, False , 0, 1 + + - A tuple of N elements (Tuple(3)). + + * Class Tuple must first be defined in the catalog. + :: + import types + class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: return None + if len(valeur) != self.ntuple: return None + return valeur + + def info(self): + return "Tuple of %s elements" % self.ntuple + + * Then, inside each tuple, each element has a specified type. + :: + pair_identification= SIMP(statut ='o', typ=Tuple(2),validators=VerifTypeTuple(('TXM','TXM')),), + simulation_box_sizes= SIMP(statut ='o', typ=Tuple(3),validators=VerifTypeTuple(('R','R','R')), + length= SIMP(statut ='o', typ=Tuple(2),validators=VerifTypeTuple(('R','TXM')),), + + means that pair_identification is a tuple of two strings, simulation_box_sizes a tuple of three floats and lenght a tuple which first parameter is a float and second a string. + :: + Valid values for pair_identification : ('A', 'A'), ('A','B') + Valid values for simulation_box_sizes : (1,1.,0), (2.,-2.5, 10+3) + Valid values for length : (1,'m'), (2., 'cm') but also (-500, 'Fahr') or (32, 'fareneit') + + Note that a tuple element is not seen as a list but as ONE element. (it is possible to define list of tuple) + + + - A directory or a file (existing or not) + + +-------------------------------------+--------------------------------------------------+ + | parameter is : | catalog's description is : | + +=====================================+==================================================+ + |an existing file | typ='Fichier' | + +-------------------------------------+--------------------------------------------------+ + |a directory | typ='Repertoire' | + +-------------------------------------+--------------------------------------------------+ + |an existing file with specific suffix| typ='Fichier','JDC Files (*.comm);;All Files (*) | + +-------------------------------------+--------------------------------------------------+ + |a non-allready existing file | typ=('Fichier',"",'Sauvegarde'), | + +-------------------------------------+--------------------------------------------------+ + |a file (existing or not) | typ='FichierNoAbs' | + +-------------------------------------+--------------------------------------------------+ + |a file or a directory | typ='FichierOuRepertoire' | + +-------------------------------------+--------------------------------------------------+ + + + | + - Or type previously defined in the catalog (for example a mesh) + + A user-defined class inherits from the class ASSD + :: + class mesh (ASSD) : pass + myMesh=SIMP(typ = 'mesh') + + In this case, myMesh is a keyword waiting a mesh instance. this instance has to be created with an OPER command. + (see XXX) + + +Cardinality +~~~~~~~~~~~ +It is possible to constrain the number of instances (cardinality) of a keyword. The cardinality is specified using the min and max attributes. +If min=max=1 (default), the keyword has a single value. if max > 1, parameter is a list. min/max specify the minimum/maximum number of occurence in the list. 'max= "**"' sets no upper limit for the maximal cardinality. +:: + scalar=SIMP(typ = 'R') + list_of_scalars=SIMP(typ = 'R',max="**") + list_of_3_to_5_scalars=SIMP(typ = 'R',max=5, min=3) + + Valid values for scalar : 1., 2., + Valid values for list_of_scalars: (1.,1.,0), (2.,5., 7.,8,.,... 999.), (1.,) + Valid values for list_of_3_to_5_scalars : (1.,1.,1), (1.,1.,1.,1.),(1.,1.,1.) + +Note that a list can be mandatory or optional. + + +Other useful attributes +~~~~~~~~~~~~~~~~~~~~~~~ + +-------------+-------------------------------------------------+-----------+ + |*attribute* |*Description* |*default* | + +=============+=================================================+===========+ + | statut |status 'o' if mandatory and 'f' if not | f | + +-------------+-------------------------------------------------+-----------+ + |into |finite set of value | | + +-------------+-------------------------------------------------+-----------+ + |val_min |minimal value |float(-inf)| + +-------------+-------------------------------------------------+-----------+ + |val_max |maximal value |float(inf) | + +-------------+-------------------------------------------------+-----------+ + |ang |short documentation | | + +-------------+-------------------------------------------------+-----------+ + |defaut |default value | | + +-------------+-------------------------------------------------+-----------+ + + And some examples : + :: + print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','10 steps']) + close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0), + number_of_steps= SIMP(statut='f', typ='I', defaut=100,val_min=0, val_max=1000) + + Valid values for print_frequency : 'every','never','10 steps' and no others + Valid values for close_time : positive float (not nul) + Valid values for number_of_steps : integer between 1 and 999 + + diff --git a/docCataWriter/structure_rules.rst b/docCataWriter/structure_rules.rst new file mode 100644 index 00000000..593c3a72 --- /dev/null +++ b/docCataWriter/structure_rules.rst @@ -0,0 +1,139 @@ +.. _rules-label: + +Defining rules +============== + +Definition and Usage +____________________ + +Sometimes, the dataset must comply with building rules. +They affects the structure of the dataset (not the value) +They can apply to any concepts ( OPER, PROC, JDC, SIMP or BLOC) + +Syntax +______ + +General syntax +~~~~~~~~~~~~~~ + +Syntax is : +:: + regles = (..list of rules), + + +AU_MOINS_UN +----------- +AU_MOINS_UN rule forces to create at least one concept in the list. More than one can be created. +:: + Structure = FACT ( statut ='f', + regles = (AU_MOINS_UN( 'Beam', 'Bar', 'Grid'),) + Beam = FACT (...), + Bar = FACT (...), + Grid = FACT (...), + ); + +If Structure is defined, one of the keyword 'Beam', 'Bar', 'Grid' is also defined. + * If none of these keywords is present, Structure is unvalid. + * If only Beam is present, Strucure is valid. + * If both Beam and Bar are present, Structure is valid. + +UN_PARMI +-------- +UN_PARMI rule obliges the user to create one and only one concept of the list. +:: + FOR_DPD = BLOC(condition = "code=='DPD'", + regles=(UN_PARMI('Initialisation', 'Solver_Input'), + ), + ...), + +The user must select Initialisation or (exclusive or) Solver_Input. + + * If the user doesn't select any of these keywords, the dataset is unvalid. + * If he selects only Solver_Input, the dataset is valid. + * If he selects only Initialisation, the dataset is valid. + * If he selects both, the dataset is unvalid. (Ihm will not proposed the keyword Initialisation if Solver_Input already exists.) + + +EXCLUS +------ +EXCLUS means that, if one of the keyword is created, the others won't be allowed. +:: + JOB_DURATION = FACT(statut='o', + regles=( EXCLUS('duration','number_of_time_step','end_at'), + ), + ...), + + +Only one of the keyword or none is allowed. + * If the user doesn't select any of these keywords, JOB_DURATION is valid. + * If he selects only duration, JOB_DURATION is valid. + * If he selects only number_of_time_step, JOB_DURATION is valid. + * If he selects only end_at, JOB_DURATION is valid. + * Otherwise, JOB_DURATION is unvalid + +ENSEMBLE +-------- +The rule means that if one keyword is selected, the others have to be also. +The keywords order is not meaningful. +:: + GRILLE = FACT(statut='f', + regles=( ENSEMBLE('ORIG_AXE','AXE'), + ), + ...), + +if GRILLE is used in the dataset + * If the user doesn't select any of these keywords, GRILLE is valid. + * If he selects only ORIG_AXE, GRILLE is invalid. + * If he selects both ORIG_AXE and AXE, GRILLE is valid. + + +PRESENT_PRESENT +--------------- +The rule means that if the FIRST keyword is selected, the others have to be also. +The keywords order is meaningful. +:: + FREQUENCE = FACT(statut='f', + regles=( PRESENT_PRESENT('FREQ_MIN','FREQ_MAX','FREQ_PAS') + ), + ...), + +That means : + + * If the user doesn't select any of these keywords, FREQUENCE is valid. + * If he selects only FREQ_MAX, FREQUENCE is valid. + * If he selects only FREQ_MIN, GRILLE is unvalid. + * If he selects both FREQ_MIN, FREQ_MAX and FREQ_PAS, GRILLE is valid. + + +PRESENT_ABSENT +-------------- +The rule means that if the FIRST keyword is selected, the others aren't allowed. +The keywords order is meaningful. +:: + GRID = FACT(statut='f', + regles=( PRESENT_ABSENT('GroupOfNodes','GroupOfFaces','GroupOfEdges'), + ), + ...), + +That means : + + * If the user doesn't select any of these keywords, GRID is valid. + * If he selects only GroupOfNodes, GRID is valid. + * If he selects both GroupOfFaces and GroupOfNodes, GRID is unvalid. + + +All rules can be combinated, creating more complicated rules. +:: + GRID = FACT(statut='f', + regles=( PRESENT_ABSENT('GroupOfNodes','GroupOfFaces','GroupOfEdges'), + ENSEMBLE('GroupOfFaces','GroupOfEdges'), + ), + ...), + + +That means : + + * If the user select 'GroupOfNodes', GRID is valid. + * If the user select 'GroupOfFaces' and 'GroupOfEdges', GRID is valid. + * If he selects none of these keywords GRID is valid. + * Otherwise Grid is unvalid diff --git a/docCataWriter/vimp_presentation.rst b/docCataWriter/vimp_presentation.rst new file mode 100644 index 00000000..e7115327 --- /dev/null +++ b/docCataWriter/vimp_presentation.rst @@ -0,0 +1,40 @@ +VIMMP dataModel +============== + +Definition and Usage +____________________ + +Vimmp data model is designed in order to help code developers : + * It generates automatically drivers for input parameters + * it allows users to write a parameter file for a code. It handles with syntax and semantic and insures integrity of the file. + * it provides an help to define calculation scheme + +Input parameter files could also be seen as a way to write a set of calculation steps (commands) with their arguments. +Building dataset consists of adding new 'commands', entering parameter values and if necessary naming return concepts. + +General Behaviour +_________________ + +In order to benefit of these features, data model has to be represented as : + - XSD (XML Schema Definition) respecting XXX ( eric que met-on ici ? il y a des restrictions si on veut automatiser la creation du noeud YACS ?) + - Eficas Catalog + + +Eficas transforms Catalog into XSD. + + +common data Model +_________________ + +adding specifics data +_________________ + +Outputs +_________________ + + - drivers + - un schema de noeud yacs ? + - ihm + + + -- 2.39.2