Skip to content

Commit

Permalink
Added bumpversion config and made python packages be version of repo …
Browse files Browse the repository at this point in the history
…instead of library.
  • Loading branch information
mauvilsa committed Apr 10, 2020
1 parent 1bef7da commit 89dbfb6
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 41 deletions.
11 changes: 11 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[bumpversion]
current_version = 2020.02.10
commit = True
tag = True
tag_name = {new_version}

[bumpversion:file:py-pagexml/pagexml/__init__.py]


[bumpversion:file:py-textfeat/textfeat/__init__.py]

8 changes: 5 additions & 3 deletions docs/py-pagexml/_modules/pagexml.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ <h1>Source code for pagexml</h1><div class="highlight"><pre>
<span class="n">cv2</span> <span class="o">=</span> <span class="kc">False</span>


<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;2020.02.10&#39;</span>

<span class="n">PAGE_XSD_SEARCHINK</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="vm">__file__</span><span class="p">))</span><span class="o">+</span><span class="s1">&#39;/xsd/pagecontent_searchink.xsd&#39;</span>
<span class="n">PAGE_XSD_OMNIUS</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="vm">__file__</span><span class="p">))</span><span class="o">+</span><span class="s1">&#39;/xsd/pagecontent_omnius.xsd&#39;</span>
<span class="n">PAGE_XSD</span> <span class="o">=</span> <span class="n">PAGE_XSD_OMNIUS</span>
Expand All @@ -174,21 +176,21 @@ <h1>Source code for pagexml</h1><div class="highlight"><pre>

<span class="n">_PageXML</span> <span class="o">=</span> <span class="n">PageXML</span> <span class="c1"># pylint: disable=used-before-assignment</span>

<div class="viewcode-block" id="PageXML"><a class="viewcode-back" href="../api.html#pagexml.PageXML">[docs]</a><span class="k">class</span> <span class="nc">PageXML</span><span class="p">(</span><span class="n">_PageXML</span><span class="p">):</span> <span class="c1"># pylint: disable=function-redefined</span>
<span class="k">class</span> <span class="nc">PageXML</span><span class="p">(</span><span class="n">_PageXML</span><span class="p">):</span> <span class="c1"># pylint: disable=function-redefined</span>
<span class="sd">&quot;&quot;&quot;Python only additions to the PageXML class.&quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">if</span> <span class="s1">&#39;schema_path&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">kwargs</span><span class="p">:</span>
<span class="n">kwargs</span><span class="p">[</span><span class="s1">&#39;schema_path&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">PAGE_XSD</span>
<span class="nb">super</span><span class="p">(</span><span class="n">PageXML</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>

<div class="viewcode-block" id="PageXML.clone"><a class="viewcode-back" href="../api.html#pagexml.PageXML.clone">[docs]</a> <span class="k">def</span> <span class="nf">clone</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">clone</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># The c++ clone gives error, so reimplemented it in python</span>
<span class="n">pxml</span> <span class="o">=</span> <span class="n">PageXML</span><span class="p">()</span>
<span class="n">pxml</span><span class="o">.</span><span class="n">loadXmlString</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">toString</span><span class="p">(),</span> <span class="kc">False</span> <span class="p">)</span>
<span class="n">pxml</span><span class="o">.</span><span class="n">setImagesBaseDir</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">getImagesBaseDir</span><span class="p">()</span> <span class="p">)</span>
<span class="n">pxml</span><span class="o">.</span><span class="n">setXmlFilePath</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">getXmlFilePath</span><span class="p">()</span> <span class="p">)</span>
<span class="k">return</span> <span class="n">pxml</span></div></div>
<span class="k">return</span> <span class="n">pxml</span>


<div class="viewcode-block" id="imwrite"><a class="viewcode-back" href="../api.html#pagexml.imwrite">[docs]</a><span class="k">def</span> <span class="nf">imwrite</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">img</span><span class="p">,</span> <span class="n">params</span><span class="o">=</span><span class="p">[]):</span>
Expand Down
Loading

0 comments on commit 89dbfb6

Please sign in to comment.