Skip to content

Commit

Permalink
Add a file with datasets info for fd and ucc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vs9h committed Dec 4, 2023
1 parent f447dde commit 2e67bfd
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
36 changes: 36 additions & 0 deletions src/tests/all_datasets_info.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include "all_datasets_info.h"

namespace tests {
extern DatasetInfo const kWDC_astronomical{"WDC_astronomical.csv", ',', true};
extern DatasetInfo const kWDC_symbols{"WDC_symbols.csv", ',', true};
extern DatasetInfo const kWDC_science{"WDC_science.csv", ',', true};
extern DatasetInfo const kWDC_satellites{"WDC_satellites.csv", ',', true};
extern DatasetInfo const kWDC_appearances{"WDC_appearances.csv", ',', true};
extern DatasetInfo const kWDC_astrology{"WDC_astrology.csv", ',', true};
extern DatasetInfo const kWDC_game{"WDC_game.csv", ',', true};
extern DatasetInfo const kWDC_kepler{"WDC_kepler.csv", ',', true};
extern DatasetInfo const kWDC_planetz{"WDC_planetz.csv", ',', true};
extern DatasetInfo const kWDC_age{"WDC_age.csv", ',', true};
extern DatasetInfo const kTestWide{"TestWide.csv", ',', true};
extern DatasetInfo const kabalone{"abalone.csv", ',', false};
extern DatasetInfo const kiris{"iris.csv", ',', false};
extern DatasetInfo const kadult{"adult.csv", ';', false};
extern DatasetInfo const kbreast_cancer{"breast_cancer.csv", ',', true};
extern DatasetInfo const kCIPublicHighway10k{"CIPublicHighway10k.csv", ',', true};
extern DatasetInfo const kneighbors10k{"neighbors10k.csv", ',', true};
extern DatasetInfo const kneighbors50k{"neighbors50k.csv", ',', true};
extern DatasetInfo const kneighbors100k{"neighbors100k.csv", ',', true};
extern DatasetInfo const kCIPublicHighway700{"CIPublicHighway700.csv", ',', true};
extern DatasetInfo const kEpicVitals{"EpicVitals.csv", '|', true};
extern DatasetInfo const kEpicMeds{"EpicMeds.csv", '|', true};
extern DatasetInfo const kiowa1kk{"iowa1kk.csv", ',', true};
extern DatasetInfo const kfd_reduced_30{"fd-reduced-30.csv", ',', true};
extern DatasetInfo const kflight_1k{"flight_1k.csv", ';', true};
extern DatasetInfo const kplista_1k{"plista_1k.csv", ';', false};
extern DatasetInfo const kletter{"letter.csv", ',', false};
extern DatasetInfo const kCIPublicHighway{"CIPublicHighway.csv", ',', true};
extern DatasetInfo const kLegacyPayors{"LegacyPayors.csv", '|', true};
extern DatasetInfo const kTestEmpty{"TestEmpty.csv", ',', true};
extern DatasetInfo const kTestSingleColumn{"TestSingleColumn.csv", ',', true};
extern DatasetInfo const kTestLong{"TestLong.csv", ',', true};
} // namespace tests
38 changes: 38 additions & 0 deletions src/tests/all_datasets_info.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#pragma once

#include "datasets.h"

namespace tests {
extern DatasetInfo const kWDC_astronomical;
extern DatasetInfo const kWDC_symbols;
extern DatasetInfo const kWDC_science;
extern DatasetInfo const kWDC_satellites;
extern DatasetInfo const kWDC_appearances;
extern DatasetInfo const kWDC_astrology;
extern DatasetInfo const kWDC_game;
extern DatasetInfo const kWDC_kepler;
extern DatasetInfo const kWDC_planetz;
extern DatasetInfo const kWDC_age;
extern DatasetInfo const kTestWide;
extern DatasetInfo const kabalone;
extern DatasetInfo const kiris;
extern DatasetInfo const kadult;
extern DatasetInfo const kbreast_cancer;
extern DatasetInfo const kCIPublicHighway10k;
extern DatasetInfo const kneighbors10k;
extern DatasetInfo const kneighbors50k;
extern DatasetInfo const kneighbors100k;
extern DatasetInfo const kCIPublicHighway700;
extern DatasetInfo const kEpicVitals;
extern DatasetInfo const kEpicMeds;
extern DatasetInfo const kiowa1kk;
extern DatasetInfo const kfd_reduced_30;
extern DatasetInfo const kflight_1k;
extern DatasetInfo const kplista_1k;
extern DatasetInfo const kletter;
extern DatasetInfo const kCIPublicHighway;
extern DatasetInfo const kLegacyPayors;
extern DatasetInfo const kTestEmpty;
extern DatasetInfo const kTestSingleColumn;
extern DatasetInfo const kTestLong;
} // namespace tests
19 changes: 18 additions & 1 deletion src/tests/datasets.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#include <string>
#include <vector>

static const auto test_data_dir = std::filesystem::current_path() / "input_data";
#include "config/tabular_data/input_table_type.h"
#include "parser/csv_parser/csv_parser.h"

static auto const test_data_dir = std::filesystem::current_path() / "input_data";

struct Dataset {
std::string name;
Expand All @@ -13,6 +16,20 @@ struct Dataset {
bool has_header;
};

struct DatasetInfo {
std::string_view name;
char separator;
bool has_header;

std::filesystem::path GetPath() const {
return test_data_dir / name;
}

config::InputTable MakeInputTable() const {
return std::make_shared<CSVParser>(GetPath(), separator, has_header);
}
};

class LightDatasets {
public:
static inline const std::array<Dataset, 11> datasets_ = {
Expand Down

0 comments on commit 2e67bfd

Please sign in to comment.