Skip to content

Commit

Permalink
Deploying to gh-pages from main @ d0b05e2 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rugeli committed Jul 1, 2024
1 parent ce6a403 commit a83a34c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 24 deletions.
13 changes: 0 additions & 13 deletions _modules/cellpack/autopack/loaders/recipe_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,6 @@ <h1>Source code for cellpack.autopack.loaders.recipe_loader</h1><div class="high
<span class="n">format_version</span> <span class="o">=</span> <span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;format_version&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">format_version</span>

<div class="viewcode-block" id="RecipeLoader.get_only_recipe_metadata">
<a class="viewcode-back" href="../../../../cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata">[docs]</a>
<span class="k">def</span> <span class="nf">get_only_recipe_metadata</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">recipe_meta_data</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;format_version&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;format_version&quot;</span><span class="p">],</span>
<span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span>
<span class="s2">&quot;bounding_box&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;bounding_box&quot;</span><span class="p">],</span>
<span class="s2">&quot;composition&quot;</span><span class="p">:</span> <span class="p">{},</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">recipe_meta_data</span></div>


<span class="k">def</span> <span class="nf">_migrate_version</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">old_recipe</span><span class="p">):</span>
<span class="n">converted</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="n">old_recipe</span><span class="p">[</span><span class="s2">&quot;format_version&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;1.0&quot;</span><span class="p">:</span>
Expand Down
24 changes: 23 additions & 1 deletion _modules/cellpack/bin/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@ <h1>Source code for cellpack.bin.upload</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">cellpack.autopack.loaders.recipe_loader</span> <span class="kn">import</span> <span class="n">RecipeLoader</span>


<div class="viewcode-block" id="get_recipe_metadata">
<a class="viewcode-back" href="../../../cellpack.bin.html#cellpack.bin.upload.get_recipe_metadata">[docs]</a>
<span class="k">def</span> <span class="nf">get_recipe_metadata</span><span class="p">(</span><span class="n">loader</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Extracts and returns essential metadata from a recipe for uploading</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">recipe_meta_data</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;format_version&quot;</span><span class="p">:</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;format_version&quot;</span><span class="p">],</span>
<span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span>
<span class="s2">&quot;bounding_box&quot;</span><span class="p">:</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;bounding_box&quot;</span><span class="p">],</span>
<span class="s2">&quot;composition&quot;</span><span class="p">:</span> <span class="p">{},</span>
<span class="p">}</span>
<span class="k">if</span> <span class="s2">&quot;grid_file_path&quot;</span> <span class="ow">in</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">:</span>
<span class="n">recipe_meta_data</span><span class="p">[</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">recipe_data</span><span class="p">[</span><span class="s2">&quot;grid_file_path&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">recipe_meta_data</span>
<span class="k">except</span> <span class="ne">KeyError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Recipe metadata is missing. </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span></div>



<div class="viewcode-block" id="upload">
<a class="viewcode-back" href="../../../cellpack.bin.html#cellpack.bin.upload.upload">[docs]</a>
<span class="k">def</span> <span class="nf">upload</span><span class="p">(</span>
Expand All @@ -64,7 +86,7 @@ <h1>Source code for cellpack.bin.upload</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">FirebaseHandler</span><span class="o">.</span><span class="n">_initialized</span><span class="p">:</span>
<span class="n">recipe_loader</span> <span class="o">=</span> <span class="n">RecipeLoader</span><span class="p">(</span><span class="n">recipe_path</span><span class="p">)</span>
<span class="n">recipe_full_data</span> <span class="o">=</span> <span class="n">recipe_loader</span><span class="o">.</span><span class="n">_read</span><span class="p">(</span><span class="n">resolve_inheritance</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">recipe_meta_data</span> <span class="o">=</span> <span class="n">recipe_loader</span><span class="o">.</span><span class="n">get_only_recipe_metadata</span><span class="p">()</span>
<span class="n">recipe_meta_data</span> <span class="o">=</span> <span class="n">get_recipe_metadata</span><span class="p">(</span><span class="n">recipe_loader</span><span class="p">)</span>
<span class="n">recipe_db_handler</span> <span class="o">=</span> <span class="n">DBUploader</span><span class="p">(</span><span class="n">db_handler</span><span class="p">)</span>
<span class="n">recipe_db_handler</span><span class="o">.</span><span class="n">upload_recipe</span><span class="p">(</span><span class="n">recipe_meta_data</span><span class="p">,</span> <span class="n">recipe_full_data</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
1 change: 0 additions & 1 deletion cellpack.autopack.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<li class="toctree-l3"><a class="reference internal" href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader"><code class="docutils literal notranslate"><span class="pre">RecipeLoader</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.default_values"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.default_values</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_all_ingredients"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.get_all_ingredients()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.get_only_recipe_metadata()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.resolve_inheritance"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.resolve_inheritance()</span></code></a></li>
</ul>
</li>
Expand Down
6 changes: 0 additions & 6 deletions cellpack.autopack.loaders.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<span class="sig-name descname"><span class="pre">get_all_ingredients</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results_data_in</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/autopack/loaders/recipe_loader.html#RecipeLoader.get_all_ingredients"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_all_ingredients" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata">
<span class="sig-name descname"><span class="pre">get_only_recipe_metadata</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/autopack/loaders/recipe_loader.html#RecipeLoader.get_only_recipe_metadata"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="cellpack.autopack.loaders.recipe_loader.RecipeLoader.resolve_inheritance">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">resolve_inheritance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">objects</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/autopack/loaders/recipe_loader.html#RecipeLoader.resolve_inheritance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.resolve_inheritance" title="Link to this definition"></a></dt>
Expand Down Expand Up @@ -292,7 +287,6 @@ <h3><a href="index.html">Table of Contents</a></h3>
<li><a class="reference internal" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader"><code class="docutils literal notranslate"><span class="pre">RecipeLoader</span></code></a><ul>
<li><a class="reference internal" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.default_values"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.default_values</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_all_ingredients"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.get_all_ingredients()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.get_only_recipe_metadata()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.autopack.loaders.recipe_loader.RecipeLoader.resolve_inheritance"><code class="docutils literal notranslate"><span class="pre">RecipeLoader.resolve_inheritance()</span></code></a></li>
</ul>
</li>
Expand Down
7 changes: 7 additions & 0 deletions cellpack.bin.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ <h2>cellpack.bin.get-pdb-offset module<a class="headerlink" href="#cellpack-bin-
</section>
<section id="module-cellpack.bin.upload">
<span id="cellpack-bin-upload-module"></span><h2>cellpack.bin.upload module<a class="headerlink" href="#module-cellpack.bin.upload" title="Link to this heading"></a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="cellpack.bin.upload.get_recipe_metadata">
<span class="sig-prename descclassname"><span class="pre">cellpack.bin.upload.</span></span><span class="sig-name descname"><span class="pre">get_recipe_metadata</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">loader</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/bin/upload.html#get_recipe_metadata"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.bin.upload.get_recipe_metadata" title="Link to this definition"></a></dt>
<dd><p>Extracts and returns essential metadata from a recipe for uploading</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="cellpack.bin.upload.main">
<span class="sig-prename descclassname"><span class="pre">cellpack.bin.upload.</span></span><span class="sig-name descname"><span class="pre">main</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/cellpack/bin/upload.html#main"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#cellpack.bin.upload.main" title="Link to this definition"></a></dt>
Expand Down Expand Up @@ -317,6 +323,7 @@ <h3><a href="index.html">Table of Contents</a></h3>
</ul>
</li>
<li><a class="reference internal" href="#module-cellpack.bin.upload">cellpack.bin.upload module</a><ul>
<li><a class="reference internal" href="#cellpack.bin.upload.get_recipe_metadata"><code class="docutils literal notranslate"><span class="pre">get_recipe_metadata()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.bin.upload.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
<li><a class="reference internal" href="#cellpack.bin.upload.upload"><code class="docutils literal notranslate"><span class="pre">upload()</span></code></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions cellpack.html
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="cellpack.bin.html#module-cellpack.bin.upload">cellpack.bin.upload module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="cellpack.bin.html#cellpack.bin.upload.get_recipe_metadata"><code class="docutils literal notranslate"><span class="pre">get_recipe_metadata()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.bin.html#cellpack.bin.upload.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="cellpack.bin.html#cellpack.bin.upload.upload"><code class="docutils literal notranslate"><span class="pre">upload()</span></code></a></li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,6 @@ <h2 id="G">G</h2>
<li><a href="cellpack.autopack.html#cellpack.autopack.Analysis.Analysis.get_obj_dict">get_obj_dict() (cellpack.autopack.Analysis.Analysis method)</a>
</li>
<li><a href="cellpack.autopack.html#cellpack.autopack.MeshStore.MeshStore.get_object">get_object() (cellpack.autopack.MeshStore.MeshStore method)</a>
</li>
<li><a href="cellpack.autopack.loaders.html#cellpack.autopack.loaders.recipe_loader.RecipeLoader.get_only_recipe_metadata">get_only_recipe_metadata() (cellpack.autopack.loaders.recipe_loader.RecipeLoader method)</a>
</li>
<li><a href="cellpack.autopack.html#cellpack.autopack.Analysis.Analysis.get_packed_minimum_distance">get_packed_minimum_distance() (cellpack.autopack.Analysis.Analysis method)</a>
</li>
Expand Down Expand Up @@ -1678,6 +1676,8 @@ <h2 id="G">G</h2>
</li>
</ul></li>
<li><a href="cellpack.autopack.ingredient.html#cellpack.autopack.ingredient.Ingredient.Ingredient.get_rbNodes">get_rbNodes() (cellpack.autopack.ingredient.Ingredient.Ingredient method)</a>
</li>
<li><a href="cellpack.bin.html#cellpack.bin.upload.get_recipe_metadata">get_recipe_metadata() (in module cellpack.bin.upload)</a>
</li>
<li><a href="cellpack.autopack.html#cellpack.autopack.GeometryTools.GeometryTools.get_rectangle_cercle_area">get_rectangle_cercle_area() (cellpack.autopack.GeometryTools.GeometryTools method)</a>
</li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit a83a34c

Please sign in to comment.