Skip to content

Commit

Permalink
Deploying to gh-pages from @ c585be9 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
JBris committed Sep 14, 2024
1 parent 7528a94 commit cb0c229
Show file tree
Hide file tree
Showing 14 changed files with 608 additions and 173 deletions.
37 changes: 26 additions & 11 deletions _modules/deeprootgen/data_model/simulation_data_models.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ <h1>Source code for deeprootgen.data_model.simulation_data_models</h1><div class
<span class="n">gravitropism</span><span class="p">:</span> <span class="nb">float</span>
<span class="n">origin_min</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1e-3</span>
<span class="n">origin_max</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1e-2</span>
<span class="n">enable_soil</span><span class="p">:</span> <span class="nb">bool</span>
<span class="n">soil_layer_height</span><span class="p">:</span> <span class="nb">float</span>
<span class="n">soil_layer_width</span><span class="p">:</span> <span class="nb">float</span>
<span class="n">soil_n_layers</span><span class="p">:</span> <span class="nb">int</span>
<span class="n">soil_n_cols</span><span class="p">:</span> <span class="nb">int</span>
<span class="n">enable_soil</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">bool</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">soil_layer_height</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">soil_layer_width</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">soil_n_layers</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">soil_n_cols</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">max_val_attempts</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">50</span>
<span class="n">simulation_tag</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;default&quot;</span>
<span class="n">no_root_zone</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1e-4</span>
Expand Down Expand Up @@ -262,18 +262,17 @@ <h1>Source code for deeprootgen.data_model.simulation_data_models</h1><div class



<div class="viewcode-block" id="RootCalibrationModel">
<a class="viewcode-back" href="../../../api_reference/data_model.html#deeprootgen.data_model.simulation_data_models.RootCalibrationModel">[docs]</a>
<span class="k">class</span> <span class="nc">RootCalibrationModel</span><span class="p">(</span><span class="n">BaseModel</span><span class="p">):</span>
<div class="viewcode-block" id="RootCalibrationIntervals">
<a class="viewcode-back" href="../../../api_reference/data_model.html#deeprootgen.data_model.simulation_data_models.RootCalibrationIntervals">[docs]</a>
<span class="k">class</span> <span class="nc">RootCalibrationIntervals</span><span class="p">(</span><span class="n">BaseModel</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The root system architecture calibration data model.</span>
<span class="sd"> The root system architecture calibration interval data model.</span>

<span class="sd"> Args:</span>
<span class="sd"> BaseModel (BaseModel):</span>
<span class="sd"> The Pydantic Base model class.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">random_seed</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span>
<span class="n">max_order</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">root_ratio</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">fine_root_threshold</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
Expand All @@ -295,7 +294,23 @@ <h1>Source code for deeprootgen.data_model.simulation_data_models</h1><div class
<span class="n">interbranch_distance</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">mechanical_constraints</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">root_tissue_density</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">gravitropism</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span>
<span class="n">gravitropism</span><span class="p">:</span> <span class="n">ParameterIntervalModel</span></div>



<div class="viewcode-block" id="RootCalibrationModel">
<a class="viewcode-back" href="../../../api_reference/data_model.html#deeprootgen.data_model.simulation_data_models.RootCalibrationModel">[docs]</a>
<span class="k">class</span> <span class="nc">RootCalibrationModel</span><span class="p">(</span><span class="n">BaseModel</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The root system architecture calibration data model.</span>

<span class="sd"> Args:</span>
<span class="sd"> BaseModel (BaseModel):</span>
<span class="sd"> The Pydantic Base model class.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">random_seed</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span>
<span class="n">parameter_intervals</span><span class="p">:</span> <span class="n">RootCalibrationIntervals</span>
<span class="n">calibration_parameters</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">bool</span> <span class="o">|</span> <span class="nb">float</span> <span class="o">|</span> <span class="nb">int</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span>
<span class="n">summary_statistics</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="n">SummaryStatisticsModel</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">observed_data</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="n">RootNodeModel</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span>
Expand Down
10 changes: 5 additions & 5 deletions _modules/deeprootgen/form/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,15 +646,15 @@ <h1>Source code for deeprootgen.form.components</h1><div class="highlight"><pre>
<span class="sd"> dict | None:</span>
<span class="sd"> The calibration parameters for workflow submission</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">form_inputs</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">form_inputs</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;parameter_intervals&quot;</span><span class="p">:</span> <span class="p">{}}</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">get_app</span><span class="p">()</span>
<span class="n">form_model</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">settings</span><span class="p">[</span><span class="n">form_name</span><span class="p">]</span>

<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="nb">input</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">form_model</span><span class="o">.</span><span class="n">components</span><span class="p">[</span><span class="s2">&quot;parameters&quot;</span><span class="p">][</span><span class="s2">&quot;children&quot;</span><span class="p">]):</span>
<span class="n">k</span> <span class="o">=</span> <span class="nb">input</span><span class="p">[</span><span class="s2">&quot;param&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">parameter_values</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
<span class="n">lower_bound</span><span class="p">,</span> <span class="n">upper_bound</span> <span class="o">=</span> <span class="n">parameter_values</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;parameter_intervals&quot;</span><span class="p">][</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;lower_bound&quot;</span><span class="p">:</span> <span class="n">lower_bound</span><span class="p">,</span>
<span class="s2">&quot;upper_bound&quot;</span><span class="p">:</span> <span class="n">upper_bound</span><span class="p">,</span>
<span class="s2">&quot;data_type&quot;</span><span class="p">:</span> <span class="nb">input</span><span class="p">[</span><span class="s2">&quot;data_type&quot;</span><span class="p">],</span>
Expand All @@ -679,9 +679,9 @@ <h1>Source code for deeprootgen.form.components</h1><div class="highlight"><pre>

<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;statistics_comparison&quot;</span><span class="p">][</span><span class="s2">&quot;stat_by_soil_layer&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">stat_by_layer</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;statistics_comparison&quot;</span><span class="p">][</span><span class="s2">&quot;stat_by_soil_column&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">stat_by_col</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;observed_data&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">observed_data</span> <span class="c1"># type: ignore</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;summary_statistics&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">summary_statistics</span> <span class="c1"># type: ignore</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;observed_data_content&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">observed_data_content</span> <span class="c1"># type: ignore</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;observed_data&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">observed_data</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;summary_statistics&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">summary_statistics</span>
<span class="n">form_inputs</span><span class="p">[</span><span class="s2">&quot;observed_data_content&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">observed_data_content</span>

<span class="k">return</span> <span class="n">form_inputs</span></div>

Expand Down
7 changes: 3 additions & 4 deletions _modules/deeprootgen/io/simulation_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ <h1>Source code for deeprootgen.io.simulation_data</h1><div class="highlight"><p
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
<span class="kn">from</span> <span class="nn">adbnx_adapter</span> <span class="kn">import</span> <span class="n">ADBNX_Adapter</span>
<span class="kn">from</span> <span class="nn">arango</span> <span class="kn">import</span> <span class="n">ArangoClient</span>
<span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">task</span>

<span class="kn">from</span> <span class="nn">..model</span> <span class="kn">import</span> <span class="n">RootSystemSimulation</span>

Expand Down Expand Up @@ -121,8 +122,7 @@ <h1>Source code for deeprootgen.io.simulation_data</h1><div class="highlight"><p



<div class="viewcode-block" id="save_graph_to_db">
<a class="viewcode-back" href="../../../api_reference/io.html#deeprootgen.io.simulation_data.save_graph_to_db">[docs]</a>
<span class="nd">@task</span>
<span class="k">def</span> <span class="nf">save_graph_to_db</span><span class="p">(</span>
<span class="n">simulation</span><span class="p">:</span> <span class="n">RootSystemSimulation</span><span class="p">,</span> <span class="n">task</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">simulation_uuid</span><span class="p">:</span> <span class="nb">str</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
Expand Down Expand Up @@ -170,8 +170,7 @@ <h1>Source code for deeprootgen.io.simulation_data</h1><div class="highlight"><p
<span class="p">]</span>

<span class="n">adapter</span> <span class="o">=</span> <span class="n">ADBNX_Adapter</span><span class="p">(</span><span class="n">db</span><span class="p">)</span>
<span class="n">adapter</span><span class="o">.</span><span class="n">networkx_to_arangodb</span><span class="p">(</span><span class="n">collection</span><span class="p">,</span> <span class="n">G</span><span class="p">,</span> <span class="n">graph_definitions</span><span class="p">)</span></div>

<span class="n">adapter</span><span class="o">.</span><span class="n">networkx_to_arangodb</span><span class="p">(</span><span class="n">collection</span><span class="p">,</span> <span class="n">G</span><span class="p">,</span> <span class="n">graph_definitions</span><span class="p">)</span>


<div class="viewcode-block" id="load_data_from_file">
Expand Down
4 changes: 4 additions & 0 deletions _modules/deeprootgen/model/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,10 @@ <h1>Source code for deeprootgen.model.root</h1><div class="highlight"><pre>

<span class="n">min_sec_root_num</span> <span class="o">=</span> <span class="n">input_parameters</span><span class="o">.</span><span class="n">min_sec_root_num</span>
<span class="n">max_sec_root_num</span> <span class="o">=</span> <span class="n">input_parameters</span><span class="o">.</span><span class="n">max_sec_root_num</span>

<span class="k">if</span> <span class="n">min_sec_root_num</span> <span class="o">==</span> <span class="n">max_sec_root_num</span><span class="p">:</span>
<span class="n">max_sec_root_num</span> <span class="o">+=</span> <span class="mi">1</span>

<span class="k">if</span> <span class="n">min_sec_root_num</span> <span class="o">&gt;</span> <span class="n">max_sec_root_num</span><span class="p">:</span>
<span class="n">min_sec_root_num</span><span class="p">,</span> <span class="n">max_sec_root_num</span> <span class="o">=</span> <span class="n">max_sec_root_num</span><span class="p">,</span> <span class="n">min_sec_root_num</span>

Expand Down
Loading

0 comments on commit cb0c229

Please sign in to comment.