Skip to content

Commit

Permalink
Update Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
res2df-github-action committed Aug 15, 2024
1 parent 67eaafc commit d7474c7
Show file tree
Hide file tree
Showing 103 changed files with 362 additions and 447 deletions.
4 changes: 2 additions & 2 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; res2df 1.1.3.dev1+gb1f6abd1 documentation</title>
<title>Overview: module code &mdash; res2df 1.1.3.dev5+gf4ad52d4 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css" />

Expand Down Expand Up @@ -35,7 +35,7 @@
<img src="../_static/equinor-logo2.jpg" class="logo" alt="Logo"/>
</a>
<div class="version">
1.1.3.dev1+gb1f6abd1
1.1.3.dev5+gf4ad52d4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down
27 changes: 15 additions & 12 deletions _modules/res2df/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>res2df.common &mdash; res2df 1.1.3.dev1+gb1f6abd1 documentation</title>
<title>res2df.common &mdash; res2df 1.1.3.dev5+gf4ad52d4 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css" />

Expand Down Expand Up @@ -35,7 +35,7 @@
<img src="../../_static/equinor-logo2.jpg" class="logo" alt="Logo"/>
</a>
<div class="version">
1.1.3.dev1+gb1f6abd1
1.1.3.dev5+gf4ad52d4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -627,17 +627,20 @@ <h1>Source code for res2df.common</h1><div class="highlight"><pre>
<span class="n">calling_module</span> <span class="o">=</span> <span class="n">inspect</span><span class="o">.</span><span class="n">getmodule</span><span class="p">(</span><span class="n">from_module</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="k">if</span> <span class="n">dataframe</span><span class="o">.</span><span class="n">empty</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Empty dataframe&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">consecutive</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">consecutive</span> <span class="ow">in</span> <span class="n">dataframe</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="p">(</span>
<span class="k">if</span> <span class="p">(</span>
<span class="n">consecutive</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="ow">and</span> <span class="n">consecutive</span> <span class="ow">in</span> <span class="n">dataframe</span>
<span class="ow">and</span> <span class="ow">not</span> <span class="p">(</span>
<span class="nb">min</span><span class="p">(</span><span class="n">dataframe</span><span class="p">[</span><span class="n">consecutive</span><span class="p">])</span> <span class="o">==</span> <span class="mi">1</span>
<span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">dataframe</span><span class="p">[</span><span class="n">consecutive</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">())</span> <span class="o">==</span> <span class="nb">max</span><span class="p">(</span><span class="n">dataframe</span><span class="p">[</span><span class="n">consecutive</span><span class="p">])</span>
<span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span>
<span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> inconsistent in input dataframe, got the values </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span>
<span class="n">consecutive</span><span class="p">,</span>
<span class="nb">str</span><span class="p">(</span><span class="n">dataframe</span><span class="p">[</span><span class="n">consecutive</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()),</span>
<span class="p">)</span>
<span class="k">raise</span> <span class="ne">ValueError</span>
<span class="p">)</span>
<span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span>
<span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> inconsistent in input dataframe, got the values </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span>
<span class="n">consecutive</span><span class="p">,</span>
<span class="nb">str</span><span class="p">(</span><span class="n">dataframe</span><span class="p">[</span><span class="n">consecutive</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()),</span>
<span class="p">)</span>
<span class="k">raise</span> <span class="ne">ValueError</span>

<span class="c1"># &quot;KEYWORD&quot; must always be in the dataframe:</span>
<span class="k">if</span> <span class="s2">&quot;KEYWORD&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">dataframe</span><span class="p">:</span>
Expand Down Expand Up @@ -903,7 +906,7 @@ <h1>Source code for res2df.common</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">inplace</span><span class="p">:</span>
<span class="n">dframe</span> <span class="o">=</span> <span class="n">dframe</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">tuplecolumns</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">sep</span><span class="p">)),</span> <span class="n">dframe</span><span class="o">.</span><span class="n">columns</span><span class="p">))</span>
<span class="n">tuplecolumns</span> <span class="o">=</span> <span class="p">[</span><span class="nb">tuple</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">sep</span><span class="p">))</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">dframe</span><span class="o">.</span><span class="n">columns</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">max</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">len</span><span class="p">,</span> <span class="n">tuplecolumns</span><span class="p">))</span> <span class="o">&lt;</span> <span class="mi">2</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;No columns to stack&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">dframe</span>
Expand Down
Loading

0 comments on commit d7474c7

Please sign in to comment.