The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings EMULSION public releases
Summary Activity Surveys SCM Listes Sympa

SCM Repository

authorSébastien Picault <sebastien.picault@inra.fr>
Sun, 17 Mar 2019 20:42:53 +0000 (21:42 +0100)
committerSébastien Picault <sebastien.picault@inra.fr>
Sun, 17 Mar 2019 20:42:53 +0000 (21:42 +0100)
14 files changed:
README.md
doc/html/_modules/emulsion/tools/misc.html
doc/html/_static/documentation_options.js
doc/html/_static/models/features/data/moves.csv
doc/html/_static/models/features/hybrid_SIR_metapop_data.py
doc/html/index.html
doc/html/models.zip
doc/html/objects.inv
doc/html/pages/License.html
models/features/data/moves.csv
models/features/hybrid_SIR_metapop_data.py
src/emulsion/__init__.py
src/emulsion/__main__.py
src/emulsion/tools/misc.py

index f2d52cc..0bb709c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 EMULSION: Epidemiological Multi-Level Simulation framework
 ======================
 
-![Version](https://img.shields.io/badge/version-1.0.2-f16152.svg)
+![Version](https://img.shields.io/badge/version-1.0.3-f16152.svg)
 ![License](https://img.shields.io/badge/license-Apache--2.0-8cd0c3.svg)
 
 <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
@@ -36,7 +36,7 @@ individual-based models, metapopulations) and multiple scales (from
 individuals to metapopulations), thanks to recent research in
 Artificial Intelligence.
 
-- **Version 1.0.2**
+- **Version 1.0.3**
 - **License:** Apache-2.0
 - **Contributors and contact:**
   - Sébastien Picault (`sebastien.picault@inra.fr`)
index 9056b7f..6073c4d 100644 (file)
 
 <span class="sd">    &quot;&quot;&quot;</span>
     <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fil</span><span class="p">:</span>
-        <span class="n">description</span> <span class="o">=</span> <span class="n">yaml</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">fil</span><span class="p">)</span>
+        <span class="n">description</span> <span class="o">=</span> <span class="n">yaml</span><span class="o">.</span><span class="n">safe_load</span><span class="p">(</span><span class="n">fil</span><span class="p">)</span>
     <span class="k">return</span> <span class="n">description</span></div>
 
 
index 460773d..3c74319 100644 (file)
@@ -1,6 +1,6 @@
 var DOCUMENTATION_OPTIONS = {
     URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
-    VERSION: '1.0.2',
+    VERSION: '1.0.3',
     LANGUAGE: 'en',
     COLLAPSE_INDEX: false,
     FILE_SUFFIX: '.html',
index da4ecf7..a5683a7 100644 (file)
@@ -1,3 +1,4 @@
+date,source,dest,age,qty
 2018-01-04,0,10,J,7
 2018-01-05,10,8,J,6
 2018-01-08,0,7,J,5
index de8a96e..357c803 100644 (file)
@@ -33,9 +33,7 @@ class Metapopulation(MetapopProcessManager):
         moves = {}
         with open(Path(self.model.input_dir, DATA_FILE)) as csvfile:
             # read the CSV file
-            csvreader = csv.DictReader(csvfile,
-                                       fieldnames=['date','source','dest', 'age', 'qty'],
-                                       delimiter=',')
+            csvreader = csv.DictReader(csvfile, delimiter=',')
             for row in csvreader:
                 day = dup.parse(row['date'])
                 if day < origin:
index ec20178..2431fef 100644 (file)
@@ -83,7 +83,7 @@
             
   <div class="section" id="emulsion-manual">
 <h1>EMULSION Manual<a class="headerlink" href="#emulsion-manual" title="Permalink to this headline">¶</a></h1>
-<p><img alt="badge-license" src="https://img.shields.io/badge/license-Apache--2.0-8cd0c3.svg" /> <img alt="badge-release" src="https://img.shields.io/badge/version-1.0.2-f16152.svg" /></p>
+<p><img alt="badge-license" src="https://img.shields.io/badge/license-Apache--2.0-8cd0c3.svg" /> <img alt="badge-release" src="https://img.shields.io/badge/version-1.0.3-f16152.svg" /></p>
 <p>Framework EMULSION is intended for modellers in epidemiology, to help
 them design, simulate, and revise complex mechanistic stochastic
 models, without having to write or rewrite huge amounts of code.</p>
index ead2720..ce9226d 100644 (file)
Binary files a/doc/html/models.zip and b/doc/html/models.zip differ
index 09dce27..dfd24b1 100644 (file)
Binary files a/doc/html/objects.inv and b/doc/html/objects.inv differ
index f2c54ae..f49e719 100644 (file)
@@ -89,7 +89,7 @@
 <p>Framework EMULSION is deposited at the French <a class="reference external" href="https://www.app.asso.fr/en">APP (Agency for the
 Protection of Programs)</a> with reference:
 <code class="docutils literal notranslate"><span class="pre">IDDN.FR.001.280043.000.R.P.2018.000.10000</span></code>.</p>
-<p>EMULSION version 1.0.2 is released under the following license (Apache-2.0):</p>
+<p>EMULSION version 1.0.3 is released under the following license (Apache-2.0):</p>
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>
                                  <span class="n">Apache</span> <span class="n">License</span>
                            <span class="n">Version</span> <span class="mf">2.0</span><span class="p">,</span> <span class="n">January</span> <span class="mi">2004</span>
index da4ecf7..a5683a7 100644 (file)
@@ -1,3 +1,4 @@
+date,source,dest,age,qty
 2018-01-04,0,10,J,7
 2018-01-05,10,8,J,6
 2018-01-08,0,7,J,5
index de8a96e..357c803 100644 (file)
@@ -33,9 +33,7 @@ class Metapopulation(MetapopProcessManager):
         moves = {}
         with open(Path(self.model.input_dir, DATA_FILE)) as csvfile:
             # read the CSV file
-            csvreader = csv.DictReader(csvfile,
-                                       fieldnames=['date','source','dest', 'age', 'qty'],
-                                       delimiter=',')
+            csvreader = csv.DictReader(csvfile, delimiter=',')
             for row in csvreader:
                 day = dup.parse(row['date'])
                 if day < origin:
index edf8032..eb9221a 100644 (file)
@@ -54,5 +54,5 @@ EMULSION: Epidemiologic Multi-Level Simulation framework
 #    See the License for the specific language governing permissions and
 #    limitations under the License.
 
-__version__ = '1.0.2'
+__version__ = '1.0.3'
 __all__ = ['tools', 'agent', 'model', 'templates']
index c57c246..ef39a59 100644 (file)
@@ -182,7 +182,7 @@ from   emulsion.tools.misc          import load_class
 from   emulsion.tools.plot          import plot_outputs
 from   emulsion.tools.simulation    import MultiSimulation
 
-VERSION = '1.0.2'
+VERSION = '1.0.3'
 DEFAULT_VERSION = "1.0"
 LICENSE = 'Apache-2.0'
 DEFAULT_LICENSE = "Apache-2.0"
index a9ec11f..5670a12 100644 (file)
@@ -283,7 +283,7 @@ def read_from_file(filename: str):
 
     """
     with open(filename, 'r') as fil:
-        description = yaml.load(fil)
+        description = yaml.safe_load(fil)
     return description