Skip to content

Commit

Permalink
add __version__ to Python bindings, get ready for 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gillins committed Dec 31, 2024
1 parent 1160c90 commit ffd5828
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ set (PROJECT_GDAL_DIR gdal)
# The version number.
set (LIBKEA_VERSION_MAJOR 1)
set (LIBKEA_VERSION_MINOR 6)
set (LIBKEA_VERSION_PATCH 0)
set (LIBKEA_VERSION_PATCH 1)
set (LIBKEA_VERSION "${LIBKEA_VERSION_MAJOR}.${LIBKEA_VERSION_MINOR}.${LIBKEA_VERSION_PATCH}")
set (LIBKEA_PACKAGE_VERSION "${LIBKEA_VERSION_MAJOR}.${LIBKEA_VERSION_MINOR}.${LIBKEA_VERSION_PATCH}")
set (LIBKEA_PACKAGE_STRING "LibKEA ${LIBKEA_VERSION_MAJOR}.${LIBKEA_VERSION_MINOR}.${LIBKEA_VERSION_PATCH}")
Expand Down
8 changes: 8 additions & 0 deletions Changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
1.6.1
-----

* Fixed memory leaks accessing the RAT in the Python bindings
* Fixed flushing of neighbours to disc - was not happening correctly in all circumstances
* Improved performance of building neighbours with the Python bindings
* add __version__ to the Python bindings

1.6.0
-----

Expand Down
4 changes: 2 additions & 2 deletions docs/python/kealib/build_neighbours.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h1 class="modulename">
</span><span id="L-99"><a href="#L-99"><span class="linenos"> 99</span></a> <span class="n">size</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getSize</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">)</span>
</span><span id="L-100"><a href="#L-100"><span class="linenos">100</span></a> <span class="n">histogram</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getField</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">,</span> <span class="n">fieldInfo</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span>
</span><span id="L-101"><a href="#L-101"><span class="linenos">101</span></a>
</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a> <span class="c1"># will through exception if not set, but we need a nodata otherwise</span>
</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a> <span class="c1"># will throw exception if not set, but we need a nodata otherwise</span>
</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a> <span class="c1"># we can&#39;t do a read with margin</span>
</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a> <span class="n">nodata</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getNoDataValue</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">)</span>
</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a>
Expand Down Expand Up @@ -459,7 +459,7 @@ <h1 class="modulename">
</span><span id="buildNeighbours-100"><a href="#buildNeighbours-100"><span class="linenos">100</span></a> <span class="n">size</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getSize</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">)</span>
</span><span id="buildNeighbours-101"><a href="#buildNeighbours-101"><span class="linenos">101</span></a> <span class="n">histogram</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getField</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">,</span> <span class="n">fieldInfo</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span>
</span><span id="buildNeighbours-102"><a href="#buildNeighbours-102"><span class="linenos">102</span></a>
</span><span id="buildNeighbours-103"><a href="#buildNeighbours-103"><span class="linenos">103</span></a> <span class="c1"># will through exception if not set, but we need a nodata otherwise</span>
</span><span id="buildNeighbours-103"><a href="#buildNeighbours-103"><span class="linenos">103</span></a> <span class="c1"># will throw exception if not set, but we need a nodata otherwise</span>
</span><span id="buildNeighbours-104"><a href="#buildNeighbours-104"><span class="linenos">104</span></a> <span class="c1"># we can&#39;t do a read with margin</span>
</span><span id="buildNeighbours-105"><a href="#buildNeighbours-105"><span class="linenos">105</span></a> <span class="n">nodata</span> <span class="o">=</span> <span class="n">extrat</span><span class="o">.</span><span class="n">getNoDataValue</span><span class="p">(</span><span class="n">ds</span><span class="p">,</span> <span class="n">band</span><span class="p">)</span>
</span><span id="buildNeighbours-106"><a href="#buildNeighbours-106"><span class="linenos">106</span></a>
Expand Down
4 changes: 2 additions & 2 deletions docs/python/kealib/extrat.html
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ <h1 class="modulename">
</div>
<a class="headerlink" href="#KEAFieldDataType.name"></a>

<div class="docstring"><p>name(self: handle) -> str</p>
<div class="docstring"><p>name(self: object) -> str</p>
</div>


Expand Down Expand Up @@ -961,7 +961,7 @@ <h1 class="modulename">
</div>
<a class="headerlink" href="#KEADataType.name"></a>

<div class="docstring"><p>name(self: handle) -> str</p>
<div class="docstring"><p>name(self: object) -> str</p>
</div>


Expand Down
2 changes: 2 additions & 0 deletions python/extrat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "awkward/LayoutBuilder.h"

#include "libkea/KEAImageIO.h"
#include "libkea/kea-config.h"

#ifdef WIN32
#define NOMINMAX // otherwise std::min won't work
Expand Down Expand Up @@ -1287,6 +1288,7 @@ bool IsFakeGDALFunction()

PYBIND11_MODULE(extrat, m) {
m.doc() = "Module that contains helpers for accessing kealib features not available from GDAL";
m.attr("__version__") = LIBKEA_VERSION;

m.def("IsFakeGDAL", &IsFakeGDALFunction);
m.def("getNeighbours", &getNeighbours,
Expand Down

0 comments on commit ffd5828

Please sign in to comment.