From 0b01bc6c0a8f9db0b3770e455fef2d0dc69122ee Mon Sep 17 00:00:00 2001 From: Lutz Klinkenberg <lutz.klinkenberg@cs.rwth-aachen.de> Date: Wed, 4 May 2022 12:32:07 +0200 Subject: [PATCH] name changed to pgyin --- CMakeLists.txt | 8 ++++---- python/bindings.cpp | 4 ++-- python/test.py | 6 +++--- setup.py | 8 ++++---- test/TestEquivalence.cpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed80f5b..2dfbfcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.4...3.18) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") -project(prodigy) +project(pygin) set(CMAKE_CXX_STANDARD 14) @@ -21,6 +21,6 @@ add_subdirectory(test) # python bindings add_subdirectory(lib/pybind11) -pybind11_add_module(prodigy python/bindings.cpp) -target_link_libraries(prodigy PUBLIC ${CMAKE_PROJECT_NAME}_lib) -target_compile_definitions(prodigy PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO}) +pybind11_add_module(pygin python/bindings.cpp) +target_link_libraries(pygin PUBLIC ${CMAKE_PROJECT_NAME}_lib) +target_compile_definitions(pygin PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO}) diff --git a/python/bindings.cpp b/python/bindings.cpp index 7a25f81..db7c186 100644 --- a/python/bindings.cpp +++ b/python/bindings.cpp @@ -26,8 +26,8 @@ string toString(const Dist& dist){ namespace py = pybind11; -PYBIND11_MODULE(prodigy, m) { - m.doc() = "python bindings of prodigy - a library for manipulating distributions through generating functions"; +PYBIND11_MODULE(pygin, m) { + m.doc() = "python bindings of pygin - a library for manipulating distributions through generating functions"; py::class_<Dist>(m, "Dist") .def(py::init()) diff --git a/python/test.py b/python/test.py index acd8d56..2d35dcc 100644 --- a/python/test.py +++ b/python/test.py @@ -1,8 +1,8 @@ -import prodigy +import pygin if __name__ == "__main__": - dist = prodigy.geometric("x", "1/2") + dist = pygin.geometric("x", "1/2") print(dist.E("x")) - dist = prodigy.Dist("1"); + dist = pygin.Dist("1"); diff --git a/setup.py b/setup.py index 2058f84..71d8849 100644 --- a/setup.py +++ b/setup.py @@ -123,14 +123,14 @@ class CMakeBuild(build_ext): # The information here can also be placed in setup.cfg - better separation of # logic and declaration, and simpler if you include description/version in a file. setup( - name="prodigy", + name="pygin", version="1.0", author="Tobias Winkler", author_email="tobias.winkler@cs.rwth-aachen.de", - description="python bindings of prodigy", + description="python bindings of pygin", long_description="", - ext_modules=[CMakeExtension("prodigy")], + ext_modules=[CMakeExtension("pygin")], cmdclass={"build_ext": CMakeBuild}, zip_safe=False, extras_require={"test": ["pytest"]}, -) \ No newline at end of file +) diff --git a/test/TestEquivalence.cpp b/test/TestEquivalence.cpp index 25f5f76..0c9a3bc 100644 --- a/test/TestEquivalence.cpp +++ b/test/TestEquivalence.cpp @@ -304,7 +304,7 @@ TEST(EquivalenceCheck, dep_bern){ l4 = l4.update("n", "n-t"); l5 = l4.update("c", "0"); l6 = l5.update("t", "0"); - l7 = l6 + (l0 - l1); + l7 = l6 + l0.filterLeq("c", "0"); Dist res1 = l7; /* -- GitLab