Skip to content

Commit

Permalink
Merge e225e0c into 03574fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik Muhs committed Nov 3, 2017
2 parents 03574fa + e225e0c commit 1ce3ffe
Show file tree
Hide file tree
Showing 204 changed files with 46 additions and 46 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Expand Up @@ -63,7 +63,7 @@ matrix:

before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./travis/setup_osx.sh ; fi
- ./travis/setup_pyenv.sh
- source ./travis/setup_pyenv.sh

install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
Expand Down Expand Up @@ -100,14 +100,14 @@ addons:
- libstdc++-4.8-dev

script:
- if [ "$BUILD_TYPE" == "linux" ]; then ./travis/build_linux.sh ; fi
- if [ "$BUILD_TYPE" == "manylinux" ]; then ./travis/build_manylinux_package.sh ; fi
- if [ "$BUILD_TYPE" == "sdist" ]; then ./travis/build_sdist_package.sh ; fi
- if [ "$BUILD_TYPE" == "osx" ]; then ./travis/build_osx_package.sh ; fi
- if [ "$BUILD_TYPE" == "linux" ]; then source ./travis/build_linux.sh ; fi
- if [ "$BUILD_TYPE" == "manylinux" ]; then source ./travis/build_manylinux_package.sh ; fi
- if [ "$BUILD_TYPE" == "sdist" ]; then source ./travis/build_sdist_package.sh ; fi
- if [ "$BUILD_TYPE" == "osx" ]; then source ./travis/build_osx_package.sh ; fi

after_success:
- if [ "$CC" = "gcc-4.8" ] && [ "$CONF" = "coverage" ]; then ./travis/coverage.sh ; fi
- if [ "$BUILD_TYPE" == "doc" ]; then ./travis/build_doc.sh ; fi
- if [ "$BUILD_TYPE" == "doc" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false"]; then source ./travis/build_doc.sh ; fi

deploy:
provider: script
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Expand Up @@ -36,7 +36,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif ()


include_directories(keyvi/src/cpp)
include_directories(keyvi/include/keyvi)
include_directories(keyvi/3rdparty/tpie)
include_directories(keyvi/3rdparty/utf8)
include_directories(keyvi/3rdparty/misc)
Expand All @@ -46,14 +46,14 @@ include_directories(keyvi/3rdparty/xchange/src)
include_directories(${CMAKE_BINARY_DIR}/keyvi/3rdparty/tpie)


FILE(GLOB_RECURSE UNIT_TEST_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} keyvi/tests/cpp/*.cpp)
FILE(GLOB_RECURSE UNIT_TEST_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} keyvi/tests/keyvi/*.cpp)

add_executable(keyvicompiler keyvi/src/cpp/keyvicompiler/keyvicompiler.cpp)
add_executable(keyviinspector keyvi/src/cpp/keyviinspector/keyviinspector.cpp)
add_executable(keyvimerger keyvi/src/cpp/keyvimerger/keyvimerger.cpp)
add_executable(units_test_all ${UNIT_TEST_SOURCES})
add_executable(keyvicompiler keyvi/bin/keyvicompiler/keyvicompiler.cpp)
add_executable(keyviinspector keyvi/bin/keyviinspector/keyviinspector.cpp)
add_executable(keyvimerger keyvi/bin/keyvimerger/keyvimerger.cpp)
add_executable(unit_test_all ${UNIT_TEST_SOURCES})

target_link_libraries(keyvicompiler tpie ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})
target_link_libraries(keyviinspector tpie ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})
target_link_libraries(keyvimerger tpie ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})
target_link_libraries(units_test_all tpie ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})
target_link_libraries(unit_test_all tpie ${Boost_LIBRARIES} ${ZLIB_LIBRARIES})
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -30,7 +30,7 @@ Precompiled binary wheels are available for OS X and Linux on [PyPi](https://pyp
The core part is a C++ header-only library, but the TPIE 3rdparty library needs to be compiled once. The commandline
tools are also part of the C++ code. For instructions check the [Readme](/keyvi/README.md) file.

For the python extension of keyvi check the [Readme](/pykeyvi/README.md) file in the pykeyvi subfolder.
For the python extension of keyvi check the [Readme](/python/README.md) file in the python subfolder.


## Usage
Expand Down
8 changes: 4 additions & 4 deletions doc/usage/Crashcourse.md
Expand Up @@ -98,7 +98,7 @@ Similarly with python, on the `keyvi.Dictionary` object `d` the call `d.GetStati

### Lookup and Extraction

Go to [lookup examples](/pykeyvi/examples/lookup)
Go to [lookup examples](/python/examples/lookup)

Compile cities.tsv and run the tester:

Expand All @@ -109,7 +109,7 @@ Try queries like: "Fahrradwerkstatt München", "Berlin Alexanderplatz", "San Fra

#### Build your own index

Try pykeyvi/scripts/compile_json.py and compile your own JSON. The format should be:
Try python/scripts/compile_json.py and compile your own JSON. The format should be:

key {"city": "Munich", "state": "Germany"}

Expand All @@ -133,7 +133,7 @@ With sharding (for distributed data indexes):
### Completion


Go to [completion examples](/pykeyvi/examples/completion)
Go to [completion examples](/python/examples/completion)

#### Prefix completion

Expand Down Expand Up @@ -185,7 +185,7 @@ Check questions:

### Normalization

Go to [normalization examples](/pykeyvi/examples/normalization)
Go to [normalization examples](/python/examples/normalization)

Compile with:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packaging/debian/rules
Expand Up @@ -9,16 +9,16 @@ DEB_DESTDIR=$(PWD)/debian/tmp

override_dh_auto_build:
cd keyvi && $(SCONS) mode=release
cd pykeyvi && python setup.py build
cd python && python setup.py build
override_dh_auto_clean:
dh_auto_clean
cd keyvi && $(SCONS) mode=release -c && rm -f .sconsign.dblite
cd pykeyvi && rm -rf build && rm -rf keyvi.egg-info
cd python && rm -rf build && rm -rf keyvi.egg-info
rm -rf $(DEB_DESTDIR)
rm -f debian/*.substvars
rm -f debian/files
rm -f debian/*.debhelper*

override_dh_auto_install:
cd keyvi && $(SCONS) mode=release install --prefix=$(DEB_DESTDIR)/usr
cd pykeyvi && python setup.py install --install-layout=deb --root $(DEB_DESTDIR)
cd python && python setup.py install --install-layout=deb --root $(DEB_DESTDIR)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pykeyvi/MANIFEST.in → python/MANIFEST.in
Expand Up @@ -2,7 +2,7 @@ recursive-include autowrap_includes *.hpp
graft src
include keyvi.cpp

recursive-include keyvi/src/cpp *.h
recursive-include keyvi/include/keyvi *.h

recursive-include keyvi/3rdparty *.h
recursive-include keyvi/3rdparty *.inl
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pykeyvi/setup.py → python/setup.py
Expand Up @@ -210,7 +210,7 @@ def run(self):
ext_modules = [Extension('keyvi',
include_dirs=[autowrap_data_dir,
tpie_include_dir,
path.join(dictionary_sources, 'src/cpp'),
path.join(dictionary_sources, 'include/keyvi'),
path.join(dictionary_sources, '3rdparty/rapidjson/include'),
path.join(dictionary_sources, '3rdparty/msgpack-c/include'),
path.join(dictionary_sources, '3rdparty/utf8'),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -12,7 +12,7 @@
#include <boost/variant.hpp>

namespace keyvi {
namespace pykeyvitionary {
namespace python {

class attributes_visitor : public boost::static_visitor<PyObject*>
{
Expand All @@ -33,7 +33,7 @@ inline PyObject* Convert (dictionary::Match& m, const std::string& key) {
return boost::apply_visitor( attributes_visitor(), result );
}

} /* namespace pykeyvitionary */
} /* namespace python */
} /* namespace keyvi */

#endif /* ATTRIBUTES_CONVERTER_H_ */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions travis/build_linux.sh
Expand Up @@ -5,9 +5,9 @@ mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=$CONF ..
make -j 4
./units_test_all
./unit_test_all

cd ../pykeyvi
cd ../python
python setup.py build --mode $CONF
python setup.py install --user
py.test tests
Expand Down
4 changes: 2 additions & 2 deletions travis/build_manylinux_package.sh
Expand Up @@ -3,5 +3,5 @@ set -ev

docker run -e "PYTHON_VERSION=$PYTHON_VERSION" --rm -v `pwd`:/keyvi $DOCKER_IMAGE /keyvi/travis/build_manylinux_wheels.sh

pip install pykeyvi/wheelhouse/keyvi*.whl
py.test pykeyvi/tests/
pip install python/wheelhouse/keyvi*.whl
py.test python/tests/
2 changes: 1 addition & 1 deletion travis/build_manylinux_wheels.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ev

cd /keyvi/pykeyvi/
cd /keyvi/python/

case "${PYTHON_VERSION}" in
27)
Expand Down
4 changes: 2 additions & 2 deletions travis/build_osx_package.sh
Expand Up @@ -5,7 +5,7 @@ mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=release ..
make -j 4
./units_test_all
./unit_test_all
cd ..

# use python from pyenv
Expand All @@ -14,7 +14,7 @@ PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"

export TMPDIR=/Volumes/ram-disk

cd pykeyvi
cd python
python setup.py bdist_wheel -d wheelhouse
sudo -H pip install wheelhouse/*.whl
py.test tests
Expand Down
2 changes: 1 addition & 1 deletion travis/build_sdist_package.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ev

cd pykeyvi
cd python
python setup.py sdist -d wheelhouse

pip uninstall -y autowrap
Expand Down
22 changes: 11 additions & 11 deletions travis/coverage.sh
Expand Up @@ -3,29 +3,29 @@ set -ev

coveralls -r . -b build/ -i keyvi \
--gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' \
-e build/keyvi/3rdparty -e keyvi/3rdparty -e pykeyvi \
-e build/keyvi/3rdparty -e keyvi/3rdparty -e python \
-E '.*/tests/*.cpp' \
-E '.*/src/cpp/keyvicompiler/keyvicompiler.cpp' \
-E '.*/src/cpp/keyviinspector/keyviinspector.cpp' \
-E '.*/src/cpp/keyvimerger/keyvimerger.cpp' \
-E '.*/bin/keyvicompiler/keyvicompiler.cpp' \
-E '.*/bin/keyviinspector/keyviinspector.cpp' \
-E '.*/bin/keyvimerger/keyvimerger.cpp' \
--dump keyvi.cov_report > /dev/null

# workaround for coverage measurement: symlink keyvi
cd pykeyvi/
cd python/
ln -s ../keyvi keyvi
cd ..

coveralls -r . -b pykeyvi/ -i pykeyvi \
coveralls -r . -b python/ -i python \
--gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' \
-e pykeyvi/keyvi/3rdparty -e build \
-e python/keyvi/3rdparty -e build \
-E '.*/autowrap_includes/autowrap_tools.hpp' \
-E '.*/src/extra/attributes_converter.h' \
-E '.*/keyvi.cpp' \
--dump pykeyvi.cov_report_tmp > /dev/null
--dump python.cov_report_tmp > /dev/null

# workaround: remove 'pykeyvi' from source path before merge
sed s/"pykeyvi\/keyvi"/"keyvi"/g pykeyvi.cov_report_tmp > pykeyvi.cov_report
# workaround: remove 'python' from source path before merge
sed s/"python\/keyvi"/"keyvi"/g python.cov_report_tmp > python.cov_report

export COVERALLS_REPO_TOKEN=${COVERALLS_REPO_TOKEN}

coveralls-merge keyvi.cov_report pykeyvi.cov_report
coveralls-merge keyvi.cov_report python.cov_report
2 changes: 1 addition & 1 deletion travis/setup_pyenv.sh
Expand Up @@ -53,5 +53,5 @@ python -c "import distutils.util; print(distutils.util.get_platform())"

# install other python deps
pip install --upgrade pip
pip install -r pykeyvi/requirements.txt
pip install --user -r python/requirements.txt
if [ "$CC" = "gcc" ] && [ "$CONF" = "coverage" ]; then pip install coveralls-merge cpp-coveralls ; fi
2 changes: 1 addition & 1 deletion travis/upload_packages.sh
Expand Up @@ -5,7 +5,7 @@ set -ev
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"

cd pykeyvi
cd python
if [ -n "$(ls -A wheelhouse)" ]; then
twine upload --config-file ../travis/pypirc -u $PYPI_USERNAME -p $PYPI_PASSWORD wheelhouse/*
fi

0 comments on commit 1ce3ffe

Please sign in to comment.