Complete configuration

This commit is contained in:
2025-07-16 22:30:05 +02:00
parent 6b6a3fa49f
commit 8b2547aa02
5 changed files with 10 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ build: ## Build a debug version of the project
@if [ -d $(f_debug) ]; then rm -rf $(f_debug); fi
@mkdir $(f_debug);
conan install . -of $(f_debug) -s build_type=Debug -b missing
cmake -B $(f_debug) -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=$(f_debug)/build/Debug/generators/conan_toolchain.cmake -DENABLE_TESTING=ON
cmake -B $(f_debug) -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=$(f_debug)/conan_toolchain.cmake -DENABLE_TESTING=ON
cmake --build $(f_debug) -t $(test_targets) $(n_procs)
@echo ">>> Done";

View File

@@ -43,7 +43,7 @@ class FoldingConan(ConanFile):
# Test dependencies
self.test_requires("catch2/3.8.1")
self.test_requires("arff-files/1.2.1")
self.test_requires("fimdlp/2.1.0")
self.test_requires("fimdlp/2.1.1")
def layout(self):
# Only use cmake_layout for conan packaging, not for development builds

View File

@@ -10,8 +10,8 @@
#include <map>
#include <random>
#include <vector>
#include <folding_config.h>
namespace folding {
const std::string FOLDING_VERSION = "1.1.1";
class Fold {
public:
inline Fold(int k, int n, int seed = -1) : k(k), n(n), seed(seed)

View File

@@ -9,10 +9,11 @@
#include <catch2/generators/catch_generators.hpp>
#include "TestUtils.h"
#include "folding.hpp"
#include <folding_config.h>
TEST_CASE("Version Test", "[Folding]")
{
std::string actual_version = "1.1.1";
std::string actual_version = FOLDING_VERSION;
auto data = std::vector<int>(100);
folding::StratifiedKFold stratified_kfold(5, data, 17);
REQUIRE(stratified_kfold.version() == actual_version);

View File

@@ -8,6 +8,7 @@
#include <tuple>
#include "ArffFiles.hpp"
#include "fimdlp/CPPFImdlp.h"
#include "folding_config.h"
bool file_exists(const std::string& name);
std::pair<vector<mdlp::labels_t>, map<std::string, int>> discretize(std::vector<mdlp::samples_t>& X, mdlp::labels_t& y, std::vector<string> features);
@@ -44,11 +45,12 @@ class Paths {
public:
static std::string datasets()
{
return "data/";
std::string result = { folding_data_path.begin(), folding_data_path.end() };
return result + "/";
}
static std::string csv()
{
return "../../tests/csv/";
return datasets() + "../csv/";
}
};
class CSVFiles {
@@ -73,4 +75,4 @@ public:
return indices;
}
};
#endif //TEST_UTILS_H
#endif //TEST_UTILS_H