Skip to content

Commit 14346d6

Browse files
author
renaud gaudin
committed
Following rename of minClusterSize to clusterSize
1 parent 91c6984 commit 14346d6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

libzim/wrapper.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ cdef extern from "zim/writer/creator.h" namespace "zim::writer":
6060
cdef cppclass ZimCreator "zim::writer::Creator":
6161
void configVerbose(bint verbose)
6262
void configCompression(CompressionType comptype)
63-
void configMinClusterSize(int size)
63+
void configClusterSize(int size)
6464
void configIndexing(bint indexing, string language)
6565
void configNbWorkers(int nbWorkers)
6666
void startZimCreation(string filepath) nogil except +;

libzim/wrapper.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ cdef class Creator:
218218
self.c_creator.configCompression(comptype.value)
219219
return self
220220

221-
def config_minclustersize(self, int size) -> Creator:
221+
def config_clustersize(self, int size) -> Creator:
222222
if self._started:
223223
raise RuntimeError("ZimCreator started")
224-
self.c_creator.configMinClusterSize(size)
224+
self.c_creator.configClusterSize(size)
225225
return self
226226

227227
def config_indexing(self, bool indexing, str language) -> Creator:

tests/test_libzim_creator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def test_creator_compression(fpath, lipsum_item):
210210

211211

212212
@pytest.mark.parametrize("cluster_size", [0, 128, 512, 8196, 10240])
213-
def test_creator_minclustersize(fpath, cluster_size, lipsum_item):
213+
def test_creator_clustersize(fpath, cluster_size, lipsum_item):
214214
"""ensure we can create ZIM with arbitrary min-cluster-size"""
215-
with Creator(fpath).config_minclustersize(cluster_size) as c:
215+
with Creator(fpath).config_clustersize(cluster_size) as c:
216216
c.add_item(lipsum_item)
217217

218218

@@ -248,7 +248,7 @@ def test_creator_nbworkers(fpath, lipsum_item, nb_workers):
248248
def test_creator_combine_config(fpath, lipsum_item):
249249
with Creator(fpath).config_verbose(True).config_compression(
250250
"lzma"
251-
).config_minclustersize(1024).config_indexing(True, "eng").config_nbworkers(2) as c:
251+
).config_clustersize(1024).config_indexing(True, "eng").config_nbworkers(2) as c:
252252
c.add_item(lipsum_item)
253253

254254

@@ -257,7 +257,7 @@ def test_creator_combine_config(fpath, lipsum_item):
257257
[
258258
("verbose", (True,)),
259259
("compression", ("lzma",)),
260-
("minclustersize", (1024,)),
260+
("clustersize", (1024,)),
261261
("indexing", (True, "eng")),
262262
("nbworkers", (2,)),
263263
],

0 commit comments

Comments
 (0)