Skip to content

Commit

Permalink
deprecate SmallData compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Jan 19, 2025
1 parent 8bbcd2f commit 17d5dcb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 92 deletions.
36 changes: 0 additions & 36 deletions python/src/addons/IntDictionaryCompilerSmallData.pyx

This file was deleted.

35 changes: 0 additions & 35 deletions python/src/addons/JsonDictionaryCompilerSmallData.pyx

This file was deleted.

18 changes: 0 additions & 18 deletions python/src/pxds/dictionary_compiler.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ cdef extern from "keyvi/dictionary/dictionary_types.h" namespace "keyvi::diction
void SetManifest(libcpp_utf8_string) except + # wrap-as:set_manifest
void WriteToFile(libcpp_utf8_string) except + # wrap-as:write_to_file

cdef cppclass IntDictionaryCompilerSmallData:
IntDictionaryCompilerSmallData() except +
IntDictionaryCompilerSmallData(libcpp_map[libcpp_utf8_string, libcpp_utf8_string] value_store_params) except +
void Add(libcpp_utf8_string, long) except + # wrap-as:add
void Compile() nogil # wrap-ignore
void Compile(callback_t, void*) nogil # wrap-ignore
void SetManifest(libcpp_utf8_string) except + # wrap-as:set_manifest
void WriteToFile(libcpp_utf8_string) except + # wrap-as:write_to_file

cdef cppclass KeyOnlyDictionaryCompiler:
KeyOnlyDictionaryCompiler() except +
KeyOnlyDictionaryCompiler(libcpp_map[libcpp_utf8_string, libcpp_utf8_string] value_store_params) except +
Expand All @@ -60,15 +51,6 @@ cdef extern from "keyvi/dictionary/dictionary_types.h" namespace "keyvi::diction
void SetManifest(libcpp_utf8_string) except + # wrap-as:set_manifest
void WriteToFile(libcpp_utf8_string) except + # wrap-as:write_to_file

cdef cppclass JsonDictionaryCompilerSmallData:
JsonDictionaryCompilerSmallData() except +
JsonDictionaryCompilerSmallData(libcpp_map[libcpp_utf8_string, libcpp_utf8_string] value_store_params) except +
void Add(libcpp_utf8_string, libcpp_utf8_string) except + # wrap-as:add
void Compile() nogil # wrap-ignore
void Compile(callback_t, void*) nogil # wrap-ignore
void SetManifest(libcpp_utf8_string) except + # wrap-as:set_manifest
void WriteToFile(libcpp_utf8_string) except + # wrap-as:write_to_file

cdef cppclass StringDictionaryCompiler:
StringDictionaryCompiler() except +
StringDictionaryCompiler(libcpp_map[libcpp_utf8_string, libcpp_utf8_string] value_store_params) except +
Expand Down
15 changes: 12 additions & 3 deletions python/src/py/keyvi/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,19 @@
'''

from keyvi._core import CompletionDictionaryCompiler, CompletionDictionaryMerger, IntDictionaryCompiler, IntDictionaryMerger
from keyvi._core import JsonDictionaryCompiler, JsonDictionaryCompilerSmallData, JsonDictionaryMerger
from keyvi._core import IntDictionaryCompilerSmallData
from keyvi._core import JsonDictionaryCompiler, JsonDictionaryMerger
from keyvi._core import KeyOnlyDictionaryCompiler, KeyOnlyDictionaryGenerator, KeyOnlyDictionaryMerger
from keyvi._core import StringDictionaryCompiler, StringDictionaryMerger
from keyvi._core import FloatVectorDictionaryCompiler
from keyvi._core import SecondaryKeyCompletionDictionaryCompiler, SecondaryKeyFloatVectorDictionaryCompiler, SecondaryKeyIntDictionaryCompiler
from keyvi._core import SecondaryKeyKeyOnlyDictionaryCompiler, SecondaryKeyStringDictionaryCompiler, SecondaryKeyJsonDictionaryCompiler
from keyvi._core import SecondaryKeyKeyOnlyDictionaryCompiler, SecondaryKeyStringDictionaryCompiler, SecondaryKeyJsonDictionaryCompiler

def JsonDictionaryCompilerSmallData(*args, **kwargs):
from warnings import warn
warn("JsonDictionaryCompilerSmallData is deprecated and will be removed in a future version. Use JsonDictionaryCompiler instead.")
return JsonDictionaryCompiler(*args, **kwargs)

def IntDictionaryCompilerSmallData(*args, **kwargs):
from warnings import warn
warn("IntDictionaryCompilerSmallData is deprecated and will be removed in a future version. Use IntDictionaryCompiler instead.")
return IntDictionaryCompiler(*args, **kwargs)

0 comments on commit 17d5dcb

Please sign in to comment.