Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
git-steven committed Feb 24, 2024
1 parent c7f7c83 commit 8b6d282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/csv_batcher/csv_splitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h1 class="modulename">
</span><span id="L-35"><a href="#L-35"><span class="linenos">35</span></a>
</span><span id="L-36"><a href="#L-36"><span class="linenos">36</span></a> <span class="c1"># write remainder</span>
</span><span id="L-37"><a href="#L-37"><span class="linenos">37</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lines</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
</span><span id="L-38"><a href="#L-38"><span class="linenos">38</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_write_chunk</span><span class="p">((</span><span class="n">count</span> <span class="o">//</span> <span class="bp">self</span><span class="o">.</span><span class="n">chunk_line_cnt</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">lines</span><span class="p">)</span>
</span><span id="L-38"><a href="#L-38"><span class="linenos">38</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_write_chunk</span><span class="p">(</span><span class="n">header</span><span class="p">,</span> <span class="p">(</span><span class="n">count</span> <span class="o">//</span> <span class="bp">self</span><span class="o">.</span><span class="n">chunk_line_cnt</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">lines</span><span class="p">)</span>
</span><span id="L-39"><a href="#L-39"><span class="linenos">39</span></a> <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Split (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">csv_filename</span><span class="si">}</span><span class="s2">) into </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">chunk_files</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
</span><span id="L-40"><a href="#L-40"><span class="linenos">40</span></a>
</span><span id="L-41"><a href="#L-41"><span class="linenos">41</span></a> <span class="k">def</span> <span class="nf">_write_chunk</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">header</span><span class="p">:</span><span class="nb">str</span><span class="p">,</span> <span class="n">part</span><span class="p">:</span><span class="nb">int</span><span class="p">,</span> <span class="n">lines</span><span class="p">:</span><span class="n">Sequence</span><span class="p">):</span>
Expand Down Expand Up @@ -183,7 +183,7 @@ <h1 class="modulename">
</span><span id="CSVSplitter-36"><a href="#CSVSplitter-36"><span class="linenos">36</span></a>
</span><span id="CSVSplitter-37"><a href="#CSVSplitter-37"><span class="linenos">37</span></a> <span class="c1"># write remainder</span>
</span><span id="CSVSplitter-38"><a href="#CSVSplitter-38"><span class="linenos">38</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lines</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
</span><span id="CSVSplitter-39"><a href="#CSVSplitter-39"><span class="linenos">39</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_write_chunk</span><span class="p">((</span><span class="n">count</span> <span class="o">//</span> <span class="bp">self</span><span class="o">.</span><span class="n">chunk_line_cnt</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">lines</span><span class="p">)</span>
</span><span id="CSVSplitter-39"><a href="#CSVSplitter-39"><span class="linenos">39</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_write_chunk</span><span class="p">(</span><span class="n">header</span><span class="p">,</span> <span class="p">(</span><span class="n">count</span> <span class="o">//</span> <span class="bp">self</span><span class="o">.</span><span class="n">chunk_line_cnt</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">lines</span><span class="p">)</span>
</span><span id="CSVSplitter-40"><a href="#CSVSplitter-40"><span class="linenos">40</span></a> <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Split (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">csv_filename</span><span class="si">}</span><span class="s2">) into </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">chunk_files</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
</span><span id="CSVSplitter-41"><a href="#CSVSplitter-41"><span class="linenos">41</span></a>
</span><span id="CSVSplitter-42"><a href="#CSVSplitter-42"><span class="linenos">42</span></a> <span class="k">def</span> <span class="nf">_write_chunk</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">header</span><span class="p">:</span><span class="nb">str</span><span class="p">,</span> <span class="n">part</span><span class="p">:</span><span class="nb">int</span><span class="p">,</span> <span class="n">lines</span><span class="p">:</span><span class="n">Sequence</span><span class="p">):</span>
Expand Down

0 comments on commit 8b6d282

Please sign in to comment.