Complete configuration
This commit is contained in:
2
Makefile
2
Makefile
@@ -29,7 +29,7 @@ build: ## Build a debug version of the project
|
|||||||
@if [ -d $(f_debug) ]; then rm -rf $(f_debug); fi
|
@if [ -d $(f_debug) ]; then rm -rf $(f_debug); fi
|
||||||
@mkdir $(f_debug);
|
@mkdir $(f_debug);
|
||||||
conan install . -of $(f_debug) -s build_type=Debug -b missing
|
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)
|
cmake --build $(f_debug) -t $(test_targets) $(n_procs)
|
||||||
@echo ">>> Done";
|
@echo ">>> Done";
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ class FoldingConan(ConanFile):
|
|||||||
# Test dependencies
|
# Test dependencies
|
||||||
self.test_requires("catch2/3.8.1")
|
self.test_requires("catch2/3.8.1")
|
||||||
self.test_requires("arff-files/1.2.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):
|
def layout(self):
|
||||||
# Only use cmake_layout for conan packaging, not for development builds
|
# Only use cmake_layout for conan packaging, not for development builds
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <folding_config.h>
|
||||||
namespace folding {
|
namespace folding {
|
||||||
const std::string FOLDING_VERSION = "1.1.1";
|
|
||||||
class Fold {
|
class Fold {
|
||||||
public:
|
public:
|
||||||
inline Fold(int k, int n, int seed = -1) : k(k), n(n), seed(seed)
|
inline Fold(int k, int n, int seed = -1) : k(k), n(n), seed(seed)
|
||||||
|
@@ -9,10 +9,11 @@
|
|||||||
#include <catch2/generators/catch_generators.hpp>
|
#include <catch2/generators/catch_generators.hpp>
|
||||||
#include "TestUtils.h"
|
#include "TestUtils.h"
|
||||||
#include "folding.hpp"
|
#include "folding.hpp"
|
||||||
|
#include <folding_config.h>
|
||||||
|
|
||||||
TEST_CASE("Version Test", "[Folding]")
|
TEST_CASE("Version Test", "[Folding]")
|
||||||
{
|
{
|
||||||
std::string actual_version = "1.1.1";
|
std::string actual_version = FOLDING_VERSION;
|
||||||
auto data = std::vector<int>(100);
|
auto data = std::vector<int>(100);
|
||||||
folding::StratifiedKFold stratified_kfold(5, data, 17);
|
folding::StratifiedKFold stratified_kfold(5, data, 17);
|
||||||
REQUIRE(stratified_kfold.version() == actual_version);
|
REQUIRE(stratified_kfold.version() == actual_version);
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include "ArffFiles.hpp"
|
#include "ArffFiles.hpp"
|
||||||
#include "fimdlp/CPPFImdlp.h"
|
#include "fimdlp/CPPFImdlp.h"
|
||||||
|
#include "folding_config.h"
|
||||||
|
|
||||||
bool file_exists(const std::string& name);
|
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);
|
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:
|
public:
|
||||||
static std::string datasets()
|
static std::string datasets()
|
||||||
{
|
{
|
||||||
return "data/";
|
std::string result = { folding_data_path.begin(), folding_data_path.end() };
|
||||||
|
return result + "/";
|
||||||
}
|
}
|
||||||
static std::string csv()
|
static std::string csv()
|
||||||
{
|
{
|
||||||
return "../../tests/csv/";
|
return datasets() + "../csv/";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
class CSVFiles {
|
class CSVFiles {
|
||||||
|
Reference in New Issue
Block a user