Skip to content

Commit

Permalink
Deploying to gh-pages from @ 8b934fe 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
frehburg committed Oct 8, 2024
1 parent c063a3a commit cd02f08
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 66 deletions.
47 changes: 30 additions & 17 deletions latest/_modules/phenopacket_mapper/data_standards/data_model.html

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions latest/_modules/phenopacket_mapper/pipeline/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ <h1>Source code for phenopacket_mapper.pipeline.input</h1><div class="highlight"
<span class="n">DataField</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;data_field_name&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">section</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;data_model_section&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">description</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;description&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">value_set</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;value_set&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">specification</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;value_set&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">required</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;required&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">specification</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;specification&#39;</span><span class="p">,</span>
<span class="n">DataField</span><span class="o">.</span><span class="n">ordinal</span><span class="o">.</span><span class="vm">__name__</span><span class="p">:</span> <span class="s1">&#39;ordinal&#39;</span>
<span class="p">}),</span>
<span class="n">parse_value_sets</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
Expand Down Expand Up @@ -178,23 +177,21 @@ <h1>Source code for phenopacket_mapper.pipeline.input</h1><div class="highlight"
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">df</span><span class="p">)):</span>
<span class="n">data_field_name</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">section</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">section</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">value_set</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">value_set</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">value_set</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">specification</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">description</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">description</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">required</span> <span class="o">=</span> <span class="nb">bool</span><span class="p">(</span><span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">required</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)))</span>
<span class="n">specification</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">specification</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
<span class="n">ordinal</span> <span class="o">=</span> <span class="n">loc_default</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">row_index</span><span class="o">=</span><span class="n">i</span><span class="p">,</span> <span class="n">column_name</span><span class="o">=</span><span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">ordinal</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>

<span class="k">if</span> <span class="n">remove_line_breaks</span><span class="p">:</span>
<span class="n">data_field_name</span> <span class="o">=</span> <span class="n">remove_line_breaks_if_not_none</span><span class="p">(</span><span class="n">data_field_name</span><span class="p">)</span>
<span class="n">section</span> <span class="o">=</span> <span class="n">remove_line_breaks_if_not_none</span><span class="p">(</span><span class="n">section</span><span class="p">)</span>
<span class="n">description</span> <span class="o">=</span> <span class="n">remove_line_breaks_if_not_none</span><span class="p">(</span><span class="n">description</span><span class="p">)</span>
<span class="n">specification</span> <span class="o">=</span> <span class="n">remove_line_breaks_if_not_none</span><span class="p">(</span><span class="n">specification</span><span class="p">)</span>

<span class="k">if</span> <span class="n">parse_ordinals</span><span class="p">:</span>
<span class="n">ordinal</span><span class="p">,</span> <span class="n">data_field_name</span> <span class="o">=</span> <span class="n">parse_ordinal</span><span class="p">(</span><span class="n">data_field_name</span><span class="p">)</span>

<span class="k">if</span> <span class="n">parse_value_sets</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">value_set</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">column_names</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">DataField</span><span class="o">.</span><span class="n">specification</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Value set column name must be provided to parse value sets.&quot;</span><span class="p">)</span>

<span class="n">value_set</span> <span class="o">=</span> <span class="n">parsing</span><span class="o">.</span><span class="n">parse_value_set</span><span class="p">(</span>
Expand All @@ -207,10 +204,9 @@ <h1>Source code for phenopacket_mapper.pipeline.input</h1><div class="highlight"
<span class="n">DataField</span><span class="p">(</span>
<span class="n">name</span><span class="o">=</span><span class="n">data_field_name</span><span class="p">,</span>
<span class="n">section</span><span class="o">=</span><span class="n">section</span><span class="p">,</span>
<span class="n">value_set</span><span class="o">=</span><span class="n">value_set</span><span class="p">,</span>
<span class="n">specification</span><span class="o">=</span><span class="n">value_set</span><span class="p">,</span>
<span class="n">description</span><span class="o">=</span><span class="n">description</span><span class="p">,</span>
<span class="n">required</span><span class="o">=</span><span class="n">required</span><span class="p">,</span>
<span class="n">specification</span><span class="o">=</span><span class="n">specification</span><span class="p">,</span>
<span class="n">ordinal</span><span class="o">=</span><span class="n">ordinal</span>
<span class="p">),</span>
<span class="p">)</span>
Expand Down
Loading

0 comments on commit cd02f08

Please sign in to comment.