Refactor library structure

This commit is contained in:
2024-03-08 22:20:38 +01:00
parent 5bec9d4d2f
commit 7534cba7e6
23 changed files with 22 additions and 152 deletions

View File

@@ -1,15 +1,15 @@
if(ENABLE_TESTING)
set(TEST_PYCLASSIFIERS "unit_tests_pyclassifiers")
include_directories(
${PyClassifiers_SOURCE_DIR}/src/
${PyClassifiers_SOURCE_DIR}
${PyClassifiers_SOURCE_DIR}/lib/Files
${PyClassifiers_SOURCE_DIR}/lib/mdlp
${PyClassifiers_SOURCE_DIR}/lib/json/include
${Python3_INCLUDE_DIRS}
${TORCH_INCLUDE_DIRS}
/usr/local/include/bayesnet
/usr/local/include
)
file(GLOB_RECURSE PyClassifiers_SOURCES "${PyClassifiers_SOURCE_DIR}/src/*.cc")
file(GLOB_RECURSE PyClassifiers_SOURCES "${PyClassifiers_SOURCE_DIR}/pyclfs/*.cc")
set(TEST_SOURCES_PYCLASSIFIERS TestPythonClassifiers.cc TestUtils.cc ${PyClassifiers_SOURCES})
add_executable(${TEST_PYCLASSIFIERS} ${TEST_SOURCES_PYCLASSIFIERS})
target_link_libraries(${TEST_PYCLASSIFIERS} PUBLIC "${TORCH_LIBRARIES}" ${Python3_LIBRARIES} ${LIBTORCH_PYTHON} Boost::boost Boost::python Boost::numpy ArffFiles mdlp Catch2::Catch2WithMain)

View File

@@ -1,17 +1,17 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <vector>
#include <map>
#include <string>
#include "STree.h"
#include "SVC.h"
#include "RandomForest.h"
#include "XGBoost.h"
#include "ODTE.h"
#include "TestUtils.h"
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <nlohmann/json.hpp>
#include "pyclfs/STree.h"
#include "pyclfs/SVC.h"
#include "pyclfs/RandomForest.h"
#include "pyclfs/XGBoost.h"
#include "pyclfs/ODTE.h"
#include "TestUtils.h"
const std::string ACTUAL_VERSION = "1.0.4";

View File

@@ -1,5 +1,5 @@
#include "TestUtils.h"
#include "config.h"
#include "bayesnet/config.h"
class Paths {
public: