### Install Desbordante from Source Source: https://github.com/desbordante/desbordante-core/blob/main/README_PYPI.md Install Desbordante from source after cloning the repository. This involves setting up a virtual environment and installing dependencies. ```bash python3 -m venv .venv source .venv/bin/activate python3 -m pip install . ``` -------------------------------- ### Install Desbordante and Dependencies Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_1_typo_miner.ipynb Installs the desbordante library, downloads a sample dataset, and installs colorama and jellyfish for text processing and visualization. ```python !pip install desbordante==2.3.2 !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/Workshop.csv !pip install colorama jellyfish ``` -------------------------------- ### Install Desbordante and Download Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_2_deduplication.ipynb Installs the Desbordante library and downloads a sample CSV file for deduplication. Ensure you have pip and wget installed. ```python !pip install desbordante==2.3.2 !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/duplicates.csv ``` -------------------------------- ### Install Desbordante from PyPI Source: https://github.com/desbordante/desbordante-core/blob/main/README_PYPI.md Install the Desbordante package using pip. This is the recommended method for most users. ```bash pip install desbordante ``` -------------------------------- ### Compile and Install Boost with Clang Source: https://github.com/desbordante/desbordante-core/wiki/Building Compile and install the Boost library using Clang. This ensures ABI compatibility when using Clang. ```sh ./bootstrap.sh sudo ./b2 install -a toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" ``` -------------------------------- ### Install Levenshtein Library Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Matching_Dependencies.ipynb Installs the Levenshtein library, which is used for calculating string distances and similarities. ```python !pip install Levenshtein ``` -------------------------------- ### Install Desbordante and Pandas Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Functional_Dependencies_Mining.ipynb Installs the necessary libraries for running AFD discovery. Ensure you have a stable internet connection for the download. ```python !pip install desbordante==2.3.2 !pip install pandas ``` -------------------------------- ### Download Example Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Inclusion_Dependencies Mining.ipynb Downloads the 'employee.csv' and 'project_assignments.csv' datasets required for the demonstration. These files are hosted on GitHub. ```python !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/employee.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/project_assignments.csv ``` -------------------------------- ### Install Desbordante and Download Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_3_anomaly_detection.ipynb Installs the Desbordante library and downloads necessary CSV datasets for anomaly detection. Ensure you have internet access and the necessary permissions to install packages and save files. ```python !pip install desbordante==2.3.2 !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/cargo_data_1.csv !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/cargo_data_2.csv !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/cargo_data_3.csv ``` -------------------------------- ### Install CMake and LLVM/Clang Source: https://github.com/desbordante/desbordante-core/wiki/Building Install CMake and the latest LLVM/Clang compiler suite. Sets Clang as the default compiler for the current session. ```sh sudo apt install cmake bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" export CXX=clang++ export CXXFLAGS="-stdlib=libc++" # libc++ is fully compatible with GCC's ABI, so you can omit the next line if you want to use libstdc++ ABI: export LDFLAGS="-lc++abi" ``` -------------------------------- ### Run Basic Mining FD Example Source: https://github.com/desbordante/desbordante-core/blob/main/examples/README.md Execute the basic mining FD example using Python 3. Ensure you are in the 'desbordante' folder when running this command, as it references datasets relative to the project root. ```bash python3 examples/basic/mining_fd.py ``` -------------------------------- ### Install Desbordante Library Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Association_Rules.ipynb Install the Desbordante library using pip. Ensure you have version 2.3.2 or compatible. ```python !pip install desbordante==2.3.2 ``` -------------------------------- ### Install LLVM Clang 17 with Homebrew Source: https://github.com/desbordante/desbordante-core/wiki/Building Install LLVM Clang version 17 using Homebrew. Replace 'llvm@17' with the desired version if needed. ```shell brew install llvm@17 ``` -------------------------------- ### Install Ubuntu Dependencies Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Installs necessary packages for building on Ubuntu, including GCC, CMake, Ninja, Boost, and Python. Sets GCC as the default C++ compiler. ```sh sudo apt update && sudo apt upgrade sudo apt install g++ cmake ninja-build libboost-all-dev python3 python3-venv export CXX=g++ ``` -------------------------------- ### Install Desbordante Core via Pip Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Use this command to install the Desbordante library from the Python Package Index. Ensure you have Python 3.8 or higher installed. ```sh $ pip install desbordante ``` -------------------------------- ### Install Boost on Older Ubuntu Versions Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Downloads, extracts, and installs a specific version of the Boost library from source on older Ubuntu systems where APT repositories may not have compatible versions. ```sh wget https://archives.boost.io/release/1.89.0/source/boost_1_89_0.tar.gz tar xzvf boost_1_89_0.tar.gz cd boost_1_89_0 && ./bootstrap.sh sudo ./b2 install --prefix=/usr/ ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://github.com/desbordante/desbordante-core/wiki/Building Install Xcode Command Line Tools if they are not already present on your system. This is a prerequisite for many development tasks on macOS. ```shell xcode-select --install ``` -------------------------------- ### Install Python Bindings Source: https://github.com/desbordante/desbordante-core/blob/main/src/python_bindings/CMakeLists.txt Installs the compiled Python bindings module to the root installation directory when DESBORDANTE_BINDINGS is set to 'INSTALL'. ```cmake if(DESBORDANTE_BINDINGS STREQUAL "INSTALL") # Install Python bindings module to system # Places the compiled library in the root installation directory install(TARGETS ${MODULE_NAME} LIBRARY DESTINATION .) endif() ``` -------------------------------- ### Execute SPLIT Algorithm and Get DDs Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Differential_Dependencies.ipynb This snippet shows how to initialize the SPLIT algorithm, load data, execute the dependency finding process, and retrieve the differential dependencies. ```python algo = desbordante.dd.algorithms.Split() algo.load_data(table=dataset) algo.execute(difference_table=dif_table) dds = algo.get_dds() for dd in dds: print(dd) ``` -------------------------------- ### Install CMake and Python with Homebrew Source: https://github.com/desbordante/desbordante-core/wiki/Building Use Homebrew to install CMake and Python 3. After installation, verify CMake version and ensure Homebrew packages are in your PATH. ```shell brew install cmake python3 ``` -------------------------------- ### Install GCC 14 with Homebrew Source: https://github.com/desbordante/desbordante-core/wiki/Building Install the GCC 14 compiler using the Homebrew package manager. This is required for building with GCC. ```shell brew install gcc@14 ``` -------------------------------- ### Install CMake and Boost on macOS using Homebrew Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Installs CMake and the Boost library on macOS using the Homebrew package manager. Includes instructions for adding Homebrew to the environment path if CMake is not found. ```sh brew install cmake boost ``` -------------------------------- ### Load and Run AC Mining Example Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Algebraic_Constraints.ipynb Loads the dataset using pandas and runs the AC mining algorithm with default parameters. Ensure the TABLE variable is set correctly. ```python table_for_example = pandas.read_csv(TABLE, sep=SEPARATOR, header=HEADER) run_ac_mining(table_for_example, ['Delivery date', 'Dispatch date']) ``` -------------------------------- ### Install Desbordante and Dependencies Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Inclusion_Dependencies Mining.ipynb Installs the desbordante library along with pandas and tabulate for data manipulation and display. Ensure you have a compatible Python environment. ```python !pip install desbordante==2.3.2 !pip install pandas !pip install tabulate ``` -------------------------------- ### Install Desbordante Type Stubs Source: https://github.com/desbordante/desbordante-core/blob/main/README_PYPI.md Install type stubs for Desbordante if type hints are not working in your IDE. Note that stubs may not always be up-to-date with the latest package version. ```sh pip install desbordante-stubs ``` -------------------------------- ### Executing Algebraic Constraint Algorithm Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Algebraic_Constraints.ipynb Runs the Default algorithm from desbordante.ac with specified parameters on Strength and Agility columns using addition. Requires the desbordante library to be installed. ```python operation, operation_name = OPERATIONS['+'] algo = desbordante.ac.algorithms.Default() df_without_id = table_for_example[['Strength', 'Agility']] algo.load_data(table=df_without_id) algo.execute(p_fuzz=P_FUZZ, fuzziness=FUZZINESS, bumps_limit=BUMPS_LIMIT, weight=WEIGHT, bin_operation='+', ac_seed=AC_SEED, iterations_limit=ITERATIONS_LIMIT) ``` -------------------------------- ### Create Small DataFrame Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Denial_Constraints.ipynb Creates a small Pandas DataFrame to illustrate the concept of denial constraints with a concrete example. ```python data = {'Name': ['Alice', 'Bob', 'Carol'], 'Grade': [3, 4, 4], 'Salary': [3000, 4000, 4000]} small_dataset = pd.DataFrame(data) small_dataset ``` -------------------------------- ### Download Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Algebraic_Constraints.ipynb Downloads the cargo_march.csv dataset using wget. This is a prerequisite for running the AC mining example. ```bash !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/cargo_march.csv TABLE = 'cargo_march.csv' ``` -------------------------------- ### Ar/Apriori Library Configuration Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/ar/apriori/CMakeLists.txt Configures the Ar/Apriori library by setting its name, adding sources, and linking necessary libraries. This setup is crucial for building the Apriori algorithm module. ```cmake set(NAME ar.apriori) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE apriori.cpp candidate_hash_tree.cpp) target_link_libraries( ${NAME} PRIVATE ${DESBORDANTE_PREFIX}::ar ${DESBORDANTE_PREFIX}::algos spdlog::spdlog_header_only magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Setup Pandas Display Options Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_2_deduplication.ipynb Configures pandas to display all columns, full column width, and without truncating row representations. This is useful for inspecting DataFrames. ```python from collections import defaultdict, deque import desbordante import pandas def setup_pandas_print(): pandas.set_option('display.max_columns', None) pandas.set_option('display.width', None) pandas.set_option('display.max_colwidth', None) pandas.set_option('display.expand_frame_repr', False) setup_pandas_print() ``` -------------------------------- ### Execute DES Algorithm and Get NARs Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Numerical_Association_Rules.ipynb Initializes the DES algorithm, loads data, executes the algorithm with specified parameters, and retrieves the found NARs. Ensure 'dataset' is loaded before execution. ```python algo = desbordante.nar.algorithms.DES() algo.load_data(table=dataset) algo.execute(minconf=0.7, minsup=0.1, population_size=500, seed=5854, max_fitness_evaluations=700) nars = algo.get_nars() for nar in nars: print(nar) ``` -------------------------------- ### Initialize and Run Deduplication Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_2_deduplication.ipynb Initializes the deduplication process by getting functional dependencies (FDs) from the dataset and then prompts the user for input to select columns for deduplication. It displays the original record count and FD information before user interaction. ```python print(f'Original records: {len(df)}') print() fds = get_1lhs_fds(df, ALGORITHM_TYPE, CONFIG) print_fd_info(df, fds) lhs_column = int(input('LHS column index: ')) fds = list(filter(lambda fd: fd[0] == lhs_column, fds)) if not fds: print('No FDs with this LHS!') else: print('RHS columns:') print(' '.join(f'{rhs}: {df.columns[rhs]}' for _, rhs in fds)) chosen_cols = sorted(set(map(int, input('RHS columns to use (indices): ').split()))) matches_required = int(input('Equal columns to consider duplicates: ')) new_rows = get_deduped_rows(df, chosen_cols, matches_required, fds) print() print(f'Resulting records: {len(new_rows)}. Duplicates found: {len(df) - len(new_rows)}') new_df = pandas.DataFrame(new_rows, columns=df.columns) print(new_df) new_df.to_csv(OUTPUT_FILE, index=False) ``` -------------------------------- ### Build Benchmarks Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/benchmark/README.md Command to build the benchmark executable. Use the --benchmark flag to include benchmarks in the build process. ```bash ./build.sh --benchmark ``` -------------------------------- ### Import Libraries and Load Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Functional_Dependencies_Mining.ipynb Imports the Desbordante and Pandas libraries and downloads a sample CSV dataset for demonstration. The dataset contains product information including ID, name, and price. ```python import desbordante as db import pandas as pd ``` ```python !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/inventory_afd.csv ``` ```python df = pd.read_csv("inventory_afd.csv") df ``` -------------------------------- ### Discover Exact Denial Constraints Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Denial_Constraints.ipynb Initializes the Desbordante Default algorithm, loads the dataset, and executes the discovery of exact denial constraints. The discovered constraints are then printed. ```python algo = desbordante.dc.algorithms.Default() algo.load_data(table=dataset) algo.execute(evidence_threshold=0, shard_length=0) exact_dcs = algo.get_dcs() print("Discovered DCs:") for dc in exact_dcs: print(dc) ``` -------------------------------- ### Discovering Matching Dependencies with Increased Minimum Support Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Matching_Dependencies.ipynb This snippet demonstrates how to increase the minimum support to find more reliable dependencies. It calculates the minimum support based on the dataset size and then executes the algorithm. ```python algo.execute(column_matches=column_matches, min_support=round(len(second_dataset) * 1.5)) mds = algo.get_mds() print('Found MDs:') print(*(f'{i + 1} {md}' for i, md in enumerate(mds)), sep='\n') ``` -------------------------------- ### Numerical Association Rules Examples Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Numerical_Association_Rules.ipynb Examples of numerical association rules found using the DES algorithm, illustrating relationships between various attributes and their associated support and confidence. ```plaintext NAR 1: Intelligence[4 - 10] Shedding[Moderate] | | V Friendliness[6 - 10] Life Span[9 - 16] support = 0.5660377358490566 confidence = 0.9574468085106383 NAR 2: Health Issues Risk[Moderate] Life Span[8 - 14] | | V Friendliness[5 - 8] support = 0.33962264150943394 confidence = 0.7714285714285715 NAR 3: Size[1 - 2] Intelligence[5 - 8] Grooming Needs[Moderate] Weight[15.246273 - 68.261820] | | V Shedding[Moderate] support = 0.05660377358490566 confidence = 0.9 NAR 4: Friendliness[5 - 10] Exercise Requirements[1.708423 - 2.261994] Type[Working] | | V Life Span[10 - 16] Training Difficulty[4 - 9] support = 0.08176100628930817 confidence = 0.7222222222222222 ``` -------------------------------- ### Configure and Build Boost with LLVM Clang 17 Source: https://github.com/desbordante/desbordante-core/wiki/Building Configure and build the Boost library using LLVM Clang 17. This involves creating a user-config.jam file specifying the clang++ path and running the b2 build script with specific flags. ```shell ./bootstrap.sh echo "using darwin : : $(brew --prefix llvm@17)/bin/clang++ ;" > user-config.jam sudo ./b2 install -a --prefix=/usr/local --user-config=user-config.jam \ cxxflags=\"-std=c++11 -I$(brew --prefix llvm@17)/include\" \ linkflags=\"-L$(brew --prefix llvm@17)/lib/c++\" export BOOST_ROOT=/usr/local/ ``` -------------------------------- ### Configure and Build Boost with GCC 14 Source: https://github.com/desbordante/desbordante-core/wiki/Building Configure and build the Boost library using GCC 14. This involves creating a user-config.jam file to specify the compiler and then running the b2 build script. ```shell ./bootstrap.sh echo "using darwin : : g++-14 ;" > user-config.jam sudo ./b2 install --user-config=user-config.jam --layout=versioned export BOOST_ROOT=/usr/local/ ``` -------------------------------- ### Get All Statistics as a String Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Simple_Statistics.ipynb This snippet retrieves all computed statistics for the dataset and formats them as a plain text string, suitable for direct printing. This is a convenient way to get a quick overview of the dataset's statistics. ```python print(data_stats.get_all_statistics_as_string()) ``` -------------------------------- ### CMakeLists.txt for Order Algorithm Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/od/order/CMakeLists.txt Defines the library name, adds it using desbordante_add_lib, specifies source files, and links necessary libraries including magic_enum, desbordante components, spdlog, and Boost. ```cmake set(NAME od.order) desbordante_add_lib(NAME) target_sources( ${NAME} PRIVATE dependency_checker.cpp list_lattice.cpp order.cpp order_utility.cpp sorted_partitions.cpp ) target_link_libraries(${NAME} PUBLIC magic_enum::magic_enum) target_link_libraries( ${NAME} PRIVATE ${DESBORDANTE_PREFIX}::config ${DESBORDANTE_PREFIX}::model::table spdlog::spdlog_header_only ${DESBORDANTE_PREFIX}::algos Boost::headers ) ``` -------------------------------- ### Configure ASan Build Options Source: https://github.com/desbordante/desbordante-core/blob/main/CMakeLists.txt Sets up AddressSanitizer (ASan) options, including '-fsanitize=address'. Includes a specific workaround for Ubuntu with libc++ that may cause false positives. ```cmake if(ASAN) set(ASAN_OPTS "-fsanitize=address") execute_process(COMMAND grep -q "Ubuntu" /etc/os-release RESULT_VARIABLE IS_UBUNTU) if(IS_UBUNTU EQUAL 0 AND CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\+\+") message( WARNING "Running on Ubuntu with libc++. ASAN is broken in Ubuntu package with libc++15-19. If you are using \"these versions of libc++, set ASAN_OPTIONS=alloc_dealloc_mismatch=0 to suppress alloc-dealloc-mismatch " "check or consider using another distro or higher libc++ version for full ASAN coverage" ) endif() string( JOIN ";" DEBUG_BUILD_OPTS "${DEBUG_BUILD_OPTS}" "-Wno-error" "${ASAN_OPTS}" ) set(DEBUG_LINK_OPTS "${ASAN_OPTS}") elseif(UBSAN) string( JOIN ";" UBSAN_OPTS "-fsanitize=undefined" "-fsanitize=float-divide-by-zero" "-Wno-error" "-fno-sanitize=signed-integer-overflow" "-fno-sanitize=shift" "-fno-sanitize-recover=all" ) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_HOST_APPLE) string(JOIN ";" UBSAN_OPTS ${UBSAN_OPTS} "-fsanitize-ignorelist=${CMAKE_SOURCE_DIR}/ub_sanitizer_ignore_list.txt" ) endif() string(JOIN ";" DEBUG_BUILD_OPTS "${DEBUG_BUILD_OPTS}" "${UBSAN_OPTS}") set(DEBUG_LINK_OPTS "${UBSAN_OPTS}") endif() ``` -------------------------------- ### Executing Inclusion Dependencies Discovery Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Inclusion_Dependencies_Mining.ipynb Initializes the Default algorithm, loads the specified tables, executes the discovery process, and retrieves the discovered INDs. The `tables` variable should be a list of tuples, where each tuple contains the file path, delimiter, and a boolean indicating if the first row is a header. ```python TABLES = [(f'{table_name}.csv', ',', True) for table_name in ['course', 'department', 'instructor', 'student', 'teaches']] algo = desbordante.ind.algorithms.Default() algo.load_data(tables=TABLES) algo.execute() inds = algo.get_inds() ``` -------------------------------- ### Download and Extract Boost Source: https://github.com/desbordante/desbordante-core/wiki/Building Download and extract the Boost source code. This is a prerequisite for building with Clang on Ubuntu. ```sh curl https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2 --output "boost_1_86_0.tar.bz2" tar xvjf boost_1_86_0.tar.bz2 && rm boost_1_86_0.tar.bz2 cd boost_1_86_0 ``` -------------------------------- ### Calculating Levenshtein Similarity Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Matching_Dependencies.ipynb Demonstrates the usage of the LevenshteinSimilarity function to compare strings. It shows examples of identical strings and strings with a small difference. ```python print(LevenshteinSimilarity("lion","lion")) print(LevenshteinSimilarity("bear","beer")) ``` -------------------------------- ### Configure Utility Bindings Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/python_bindings/CMakeLists.txt Defines and configures the 'bindlib.util' library, listing its source files and linking required libraries. ```cmake set(NAME bindlib.util) desbordante_add_lib(NAME OBJECT) target_sources( ${NAME} PRIVATE py_util/create_dataframe_reader.cpp py_util/dataframe_reader.cpp py_util/get_py_type.cpp py_util/iterable_sequence_stream.cpp py_util/logging.cpp py_util/opt_to_py.cpp py_util/py_to_any.cpp py_util/table_serialization.cpp py_util/value_to_py.cpp ) target_link_libraries( ${NAME} PRIVATE magic_enum::magic_enum spdlog::spdlog_header_only Boost::headers pybind11::pybind11 ) set_target_properties(${NAME} PROPERTIES CXX_VISIBILITY_PRESET "hidden") ``` -------------------------------- ### Import Required Libraries Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Algebraic_Constraints.ipynb Imports the desbordante library along with pandas, operator, and tabulate for data manipulation and display. Ensure these libraries are installed before running. ```python import desbordante import pandas import operator from tabulate import tabulate ``` -------------------------------- ### Configure sd Binding Source: https://github.com/desbordante/desbordante-core/blob/main/src/python_bindings/CMakeLists.txt Adds the sd binding, focused on verification, and lists its required libraries. ```cmake desbordante_add_bind( sd SRCS sd/bind_sd_verification.cpp LIBS ${DESBORDANTE_PREFIX}::sd::verifier magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Create Benchmark Executable Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/benchmark/CMakeLists.txt Defines the benchmark executable, its source files, include directories, and links necessary libraries and dependencies. ```cmake set(NAME ${DESBORDANTE_PREFIX}.benchmark) add_executable(${NAME}) target_sources(${NAME} PRIVATE main.cpp benchmark_cli.cpp benchmark_comparer.cpp) target_include_directories(${NAME} PRIVATE ${DESBORDANTE_COMMON_INCLUDE_DIRS}) target_link_libraries( ${NAME} PRIVATE ${DESBORDANTE_PREFIX}::testlib::common ${DESBORDANTE_PREFIX}::dc::fastadc ${DESBORDANTE_PREFIX}::dd::split ${DESBORDANTE_PREFIX}::ind ${DESBORDANTE_PREFIX}::ind::mind ${DESBORDANTE_PREFIX}::fd::hy ${DESBORDANTE_PREFIX}::fd::pyro ${DESBORDANTE_PREFIX}::fd::tane ${DESBORDANTE_PREFIX}::fd::aid ${DESBORDANTE_PREFIX}::md::hy ${DESBORDANTE_PREFIX}::md::hy::preprocessing ${DESBORDANTE_PREFIX}::nar::des Boost::program_options magic_enum::magic_enum spdlog::spdlog_header_only ) add_dependencies( ${NAME} Desbordante.zip.datasets Desbordante.zip.highway-neighbors Desbordante.zip.performance-tests ) ``` -------------------------------- ### Download Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Functional_Dependencies_Mining.ipynb Download the sample datasets required for functional dependency discovery. These files contain the data to be analyzed. ```python !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/duplicates_short.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/university_fd.csv ``` -------------------------------- ### Configure Util Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/util/CMakeLists.txt Defines the 'util' library, adds its source files, and links necessary external libraries. ```cmake set(NAME util) desbordante_add_lib(NAME OBJECT) target_sources( ${NAME} PRIVATE convex_hull.cpp create_dd.cpp levenshtein_distance.cpp qgram_vector.cpp worker_thread_pool.cpp ) target_link_libraries(${NAME} PUBLIC magic_enum::magic_enum) target_link_libraries(${NAME} PRIVATE spdlog::spdlog_header_only Boost::headers) ``` -------------------------------- ### Executing Dependency Analysis with Custom Minimum Support Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Matching_Dependencies.ipynb Executes the dependency analysis algorithm with a specified minimum support value. This allows for the discovery of dependencies that might otherwise be pruned due to low support. The discovered dependencies are then retrieved and printed. ```python algo.execute(column_matches=column_matches, min_support=6) mds = algo.get_mds() print('Found MDs:') print(*(f'{i + 1} {md}' for i, md in enumerate(mds)), sep=' ') ``` -------------------------------- ### Setup Pandas Display Options Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_3_anomaly_detection.ipynb Configures pandas display options to ensure that all columns, rows, and content are visible when printing dataframes. This is useful for inspecting large or complex datasets. ```python import desbordante import pandas def setup_pandas_print(): pandas.set_option('display.max_columns', None) pandas.set_option("display.max_rows", None) pandas.set_option('display.width', None) pandas.set_option('display.max_colwidth', None) pandas.set_option('display.expand_frame_repr', False) setup_pandas_print() ``` -------------------------------- ### Downloading Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Algebraic_Constraints.ipynb Downloads the 'player_stats.csv' dataset using wget. Ensure you have internet connectivity. ```bash !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/86085bbe5fb310795a8da70c63978f07b5d96a3b/examples/datasets/player_stats.csv ``` -------------------------------- ### Import Libraries and Setup Pandas Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_1_typo_miner.ipynb Imports necessary libraries including functools, itertools, operator, colorama, jellyfish, desbordante, and pandas. It also configures pandas display options for better readability of DataFrames. ```python from functools import reduce from itertools import groupby, islice import operator from colorama import Style, Fore from jellyfish import levenshtein_distance import desbordante import pandas def setup_pandas_print(): pandas.set_option('display.max_columns', None) pandas.set_option('display.width', None) pandas.set_option('display.max_colwidth', None) pandas.set_option('display.expand_frame_repr', False) setup_pandas_print() ``` -------------------------------- ### Download Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Association_Rules.ipynb Download the transactional datasets required for association rule mining using wget. ```bash !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/rules_book_rows.csv !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/rules_book.csv ``` -------------------------------- ### FastADC Main Library Configuration Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/dc/FastADC/CMakeLists.txt Defines the main 'dc.fastadc' library, adds its source file, and links it with project-specific and external libraries. ```cmake set(NAME dc.fastadc) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE fastadc.cpp) target_link_libraries( ${NAME} PUBLIC ${DESBORDANTE_PREFIX}::config ${DESBORDANTE_PREFIX}::model::table PRIVATE ${DESBORDANTE_PREFIX}::dc::fastadc::structs spdlog::spdlog_header_only magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Find Matching Dependencies using HyMD Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Matching_Dependencies.ipynb Initializes the HyMD algorithm, loads data, defines column matches using Levenshtein similarity against self, executes the algorithm, and prints the found matching dependencies (MDs). Requires the 'desbordante' library and pandas. ```python import desbordante.md.algorithms import desbordante.md.column_matches Levenshtein = desbordante.md.column_matches.Levenshtein algo = desbordante.md.algorithms.HyMD() algo.load_data(left_table=first_dataset) column_matches = [Levenshtein(i, i) for i in range(len(first_dataset.columns))] algo.execute(column_matches=column_matches) mds = algo.get_mds() print('Found MDs:') print(*(f'{i + 1} {md}' for i, md in enumerate(mds)), sep='\n') ``` -------------------------------- ### Import and Use Desbordante Python Module Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Demonstrates how to import the Desbordante Python module after building it and how to control its logging level. ```python import logging import desbordante # Get the logger provided by the library log = logging.getLogger("desbordante") # Set the desired log level using standard logging constants log.setLevel(logging.INFO) # Or logging.DEBUG, logging.TRACE, etc. ``` -------------------------------- ### Download Dataset Files Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Inclusion_Dependencies_Mining.ipynb Downloads several CSV files containing relational data necessary for demonstrating inclusion dependency mining. These files include course, department, instructor, student, and teaches information. ```bash !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/course.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/department.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/instructor.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/student.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/teaches.csv ``` -------------------------------- ### Download Sample Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Unique_Column_Combinations_Mining.ipynb Downloads the necessary CSV files for AUCC mining demonstration. ```python !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ucc_datasets/aucc.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ucc_datasets/aucc_correct.csv ``` -------------------------------- ### Verify [id] -> [name] FD Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_and_Exact_Functional_Dependencies_Verification.ipynb Initializes the FD verification algorithm, loads the dataset, and executes the verification for the FD [id] -> [name]. This snippet demonstrates the basic workflow for checking a specific FD. ```python algo = db.afd_verification.algorithms.Default() algo.load_data(table=("duplicates_short.csv", ",", True)) algo.execute(lhs_indices=[0], rhs_indices=[2]) print_results_for_fd(algo, data, 0, 2) ``` -------------------------------- ### CMakeLists.txt for Pyro Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/fd/pyro/CMakeLists.txt Configures the build for the Pyro library, including setting the library name, adding source files, and linking necessary dependencies. ```cmake set(NAME fd.pyro) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE pyro.cpp) target_link_libraries( ${NAME} PRIVATE spdlog::spdlog_header_only ${DESBORDANTE_PREFIX}::fd::pyro::common ${DESBORDANTE_PREFIX}::fd::pli magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Configure Euler FD Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/fd/eulerfd/CMakeLists.txt This snippet sets up the Euler FD library using CMake. It defines the library name, adds it as a library, specifies source files, and links necessary libraries. ```cmake set(NAME fd.euler) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE cluster.cpp eulerfd.cpp mlfq.cpp search_tree.cpp) target_link_libraries( ${NAME} PUBLIC ${DESBORDANTE_PREFIX}::config PRIVATE ${DESBORDANTE_PREFIX}::fd Boost::headers ) ``` -------------------------------- ### Set Release Build Options Source: https://github.com/desbordante/desbordante-core/blob/main/CMakeLists.txt Initializes release build options based on general build options. ```cmake set(RELEASE_BUILD_OPTS ${BUILD_OPTS}) ``` -------------------------------- ### Download Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Denial_Constraints.ipynb Downloads the 'taxes.csv' dataset from a GitHub repository. This dataset will be used for demonstrating denial constraints. ```python !wget https://raw.githubusercontent.com/Desbordante/desbordante-core/refs/heads/main/examples/datasets/taxes.csv ``` -------------------------------- ### Configure fd.fun Library with CMake Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/fd/fun/CMakeLists.txt This snippet sets up the fd.fun library using CMake. It defines the library name, adds its source files, and links necessary external libraries. ```cmake set(NAME fd.fun) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE fun.cpp) target_link_libraries( ${NAME} PRIVATE ${DESBORDANTE_PREFIX}::fd::pli spdlog::spdlog_header_only Boost::headers ) ``` -------------------------------- ### CMakeLists.txt for cind.verifier Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/cind/cind_verifier/CMakeLists.txt Configures the cind.verifier library, specifying its sources and linking necessary dependencies. ```cmake set(NAME cind.verifier) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE cind_verifier.cpp) target_link_libraries( ${NAME} PUBLIC ${DESBORDANTE_PREFIX}::config PRIVATE ${DESBORDANTE_PREFIX}::util magic_enum::magic_enum spdlog::spdlog_header_only Boost::headers ) ``` -------------------------------- ### Download Dataset Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Simple_Statistics.ipynb Download the 'Workshop.csv' dataset from a specified URL using wget. This dataset will be used for statistical analysis. ```bash !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/Workshop.csv ``` -------------------------------- ### Download Dataset Files Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_and_Exact_Inclusion_Dependencies_Verification.ipynb Downloads the necessary CSV files (orders.csv, products.csv, customers.csv) from a GitHub repository. These datasets are used in the demonstrations of IND and AIND verification. ```bash !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/orders.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/products.csv !wget -q https://raw.githubusercontent.com/Desbordante/desbordante-core/main/examples/datasets/ind_datasets/customers.csv ``` -------------------------------- ### Add 'model.bitset' Test Suite Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/unit/CMakeLists.txt Configures the 'model.bitset' unit test suite with its source file and libraries. ```cmake desbordante_add_test( model.bitset SRCS test_bitset.cpp LIBS spdlog::spdlog_header_only Boost::headers ) ``` -------------------------------- ### Configure PFD Verifier Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/fd/pfd_verifier/CMakeLists.txt Sets the library name, adds source files, and links necessary libraries for the PFD Verifier. Includes configuration, model table, and magic enum dependencies. ```cmake set(NAME fd.pfd_verifier) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE pfd_verifier.cpp) target_link_libraries( ${NAME} PUBLIC ${DESBORDANTE_PREFIX}::config PRIVATE ${DESBORDANTE_PREFIX}::model::table magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Tane Library Configuration Source: https://github.com/desbordante/desbordante-core/blob/main/src/core/algorithms/fd/tane/CMakeLists.txt Configures the main Tane library, including its sources and linking against TaneCommon, fd::pli, fd::afd_metric, and Boost. ```cmake set(NAME fd.tane) desbordante_add_lib(NAME) target_sources(${NAME} PRIVATE afd_measures.cpp tane.cpp) target_link_libraries(${NAME} PUBLIC magic_enum::magic_enum) target_link_libraries( ${NAME} PRIVATE ${DESBORDANTE_PREFIX}::fd::tane::common ${DESBORDANTE_PREFIX}::fd::pli ${DESBORDANTE_PREFIX}::fd::afd_metric Boost::headers ) ``` -------------------------------- ### Run Benchmarks Locally Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/benchmark/README.md Executes the compiled benchmark suite. Optionally, specify files for comparing previous results and saving new results. ```bash cd build/target ./Desbordante_benchmark ``` ```bash ./Desbordante_benchmark old-results.json new-results.json ``` -------------------------------- ### Configure Algorithm Parameters for Anomaly Detection Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_3_anomaly_detection.ipynb Sets up parameters for pandas.read_csv, exact and approximate FD algorithms, and a metric verifier. Includes configuration for metrics and their algorithms. ```python # Parameters for pandas.read_csv(...). HEADER = 0 SEPARATOR = "," # Algorithm that finds exact FDs and its config. EXACT_ALGORITHM_TYPE = desbordante.fd.algorithms.Default EXACT_ALGORITHM_CONFIG = {} # Algorithm that finds approximate FDs and its config. APPROXIMATE_ALGORITHM_TYPE = desbordante.afd.algorithms.Default ERROR = [0.01, 0.03, 0.05] APPROXIMATE_ALGORITHM_CONFIG = {'error': ERROR} METRIC_VERIFIER = "MetricVerifier" METRIC_VERIFIER_CONFIG = { "lhs_indices": [1], "rhs_indices": [3], "metric": "euclidean", "metric_algorithm": "brute", "parameter": 4, } # available metrics: euclidean, levenshtein, cosine # available metric algorithms: brute, approx, calipers # parameter: desired distance related to metric. e.g., for euclidean metric parameter=4 means that euclidean distance has to be no larger than 4 # Variables to simplify the configuration string construction below. EXACT_ALGORITHM = EXACT_ALGORITHM_TYPE.__name__ APPROXIMATE_ALGORITHM = APPROXIMATE_ALGORITHM_TYPE.__name__ CONFIG_STRING = f"""Starting anomaly detection scenario with parameters: {ERROR=} {HEADER=} {SEPARATOR=} {EXACT_ALGORITHM=} {APPROXIMATE_ALGORITHM=} {METRIC_VERIFIER=} """ ``` -------------------------------- ### Download and Extract Boost Source Source: https://github.com/desbordante/desbordante-core/wiki/Building Download the latest Boost library source code from the official website and extract it. This is a prerequisite for building Boost with GCC or LLVM Clang. ```shell cd ~/Downloads curl https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2 --output "boost_1_86_0.tar.bz2" tar xvjf boost_1_86_0.tar.bz2 && rm boost_1_86_0.tar.bz2 cd boost_1_86_0 ``` -------------------------------- ### Simple Benchmark Implementation Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/benchmark/README.md Registers a straightforward benchmark that executes an algorithm with specified parameters and an optional name suffix. Allows setting a custom time threshold. ```C++ void XXBenchmark(BenchmarkRunner& runner, BenchmarkComparer& comparer) { algos::StdParamsMap params = {/* algo parameters */}; // Arguments are: CSVConfig, other algo parameters and test name suffix // Returns generated benchmark name auto bench_name = runner.RegisterSimpleBenchmark(kHugeDataset, std::move(params), "simple"); // Next line is optional, default threshold is 10% // SetThreshold takes benchmark name and desired threshold comparer.SetThreshold(bench_name, 20); } ``` -------------------------------- ### Create Input Data Directory Source: https://github.com/desbordante/desbordante-core/blob/main/datasets/CMakeLists.txt Creates the input data directory within the runtime output. This is safe for incremental builds. ```cmake set(INPUT_DATA_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/input_data") file(MAKE_DIRECTORY ${INPUT_DATA_DIR}) ``` -------------------------------- ### Configure pfd Binding Source: https://github.com/desbordante/desbordante-core/blob/main/src/python_bindings/CMakeLists.txt Adds the pfd binding, focused on verification, and lists its required libraries. ```cmake desbordante_add_bind( pfd SRCS pfd/bind_pfd_verification.cpp LIBS ${DESBORDANTE_PREFIX}::fd::pfd_verifier magic_enum::magic_enum Boost::headers ) ``` -------------------------------- ### Initialize and Execute Statistics Algorithm Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Simple_Statistics.ipynb Initialize the Default statistics algorithm from Desbordante and load the pandas DataFrame into it. Then, execute the algorithm to compute statistics. ```python data_stats = db.statistics.algorithms.Default() data_stats.load_data(table=dataset) data_stats.execute() ``` -------------------------------- ### Build Desbordante Project Source: https://github.com/desbordante/desbordante-core/blob/main/README.md Compiles the Desbordante project, including tests. The `--pybind` flag can be used to also build the Python module. ```sh ./build.sh ``` ```sh ./build.sh --pybind ``` -------------------------------- ### Discover Approximate Inclusion Dependencies Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Approximate_Inclusion_Dependencies Mining.ipynb Initializes the Mind algorithm for IND discovery and loads the specified tables. It then executes the discovery process with an error threshold of 0.3 and prints all found INDs. ```python algo = desbordante.ind.algorithms.Mind() TABLES = [ ("employee.csv", ',', True), ("project_assignments.csv", ",", True), ] algo.load_data(tables=TABLES) algo.execute(error=0.3) for ind in algo.get_inds(): print("IND:", ind) ``` -------------------------------- ### Fetch and Unpack Datasets Source: https://github.com/desbordante/desbordante-core/blob/main/datasets/CMakeLists.txt Iterates through declared datasets, fetching and unpacking them into the input data directory if enabled. Includes error handling for missing dataset files. ```cmake foreach(name IN LISTS DATASETS) if(DESBORDANTE_FETCH_DATASETS) desbordante_fetch_datasets(NAME ${name} DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}) else() message(WARNING "There could be updates in dataset ${name} (Fetch disabled)") endif() set(FILE_PATH "${CMAKE_CURRENT_LIST_DIR}/${name}.zip") if(NOT EXISTS ${FILE_PATH}) message(FATAL_ERROR "Cannot access ${FILE_PATH}: no such file. Datasets are required for \n unit tests or benchmarks." ) endif() desbordante_unpack_datasets(STAMP_FILE PATH ${FILE_PATH} EXTRACT_DIR ${INPUT_DATA_DIR}) add_custom_target(Desbordante.zip.${name} DEPENDS ${STAMP_FILE}) endforeach() ``` -------------------------------- ### Import Libraries Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Association_Rules.ipynb Import the necessary libraries, Desbordante for association rule mining and Pandas for data manipulation. ```python import desbordante import pandas as pd ``` -------------------------------- ### Configure Data Bindings Library Source: https://github.com/desbordante/desbordante-core/blob/main/src/python_bindings/CMakeLists.txt Defines and configures the 'bindlib.data' library, specifying its source files and linking necessary dependencies. ```cmake set(NAME bindlib.data) desbordante_add_lib(NAME OBJECT) target_sources(${NAME} PRIVATE data/bind_data_types.cpp) target_link_libraries(${NAME} PRIVATE pybind11::pybind11) set_target_properties(${NAME} PROPERTIES CXX_VISIBILITY_PRESET "hidden") ``` -------------------------------- ### Typo Miner Configuration Parameters Source: https://github.com/desbordante/desbordante-core/blob/main/examples/notebooks/Desbordante_demo_scenario_1_typo_miner.ipynb Sets up various parameters for value cluster filtering, FD algorithms (exact and approximate), and pandas read_csv configuration. Includes assertions to validate error values for different algorithms. ```python # Value cluster filtering parameters. RADIUS = 3 RATIO = 0.1 # Algorithm that finds exact FDs and its config. EXACT_ALGORITHM_TYPE = desbordante.fd.algorithms.Default EXACT_ALGO_CONFIG = {} # Algorithm that finds approximate FDs and its config. APPROXIMATE_ALGORITHM_TYPE = desbordante.afd.algorithms.Default ERROR = 0.005 # Highest error for almost holding FDs. APPROXIMATE_ALGO_CONFIG = {'error': ERROR} # Parameters for pandas.read_csv(...). DATASET_PATH = 'Workshop.csv' HEADER = 0 SEPARATOR = ',' # Index of the almost holding FD. Chosen in advance purely for # demonstration purposes. In a real usage scenario this should be a # choice for the user. FD_INDEX = 2 assert APPROXIMATE_ALGO_CONFIG['error'] > 0.0, 'Typo mining relies on non-zero error' assert EXACT_ALGO_CONFIG.get('error', 0.0) == 0.0, 'Error must be 0 for precise algorithm' # Variables to simplify the configuration string construction below. EXACT_ALGORITHM = EXACT_ALGORITHM_TYPE.__name__ APPROXIMATE_ALGORITHM = APPROXIMATE_ALGORITHM_TYPE.__name__ # A message containing all variables used by this usage scenario, to be # displayed to the user. CONFIG_STRING = f""" Starting typo discovery scenario with parameters: {RADIUS=} {RATIO=} {ERROR=} {DATASET_PATH=} {EXACT_ALGORITHM=} {APPROXIMATE_ALGORITHM=} {HEADER=} {SEPARATOR=} """ ``` -------------------------------- ### Add 'ind.faida' Test Suite Source: https://github.com/desbordante/desbordante-core/blob/main/src/tests/unit/CMakeLists.txt Configures the 'ind.faida' unit test suite, specifying its source file and required libraries. ```cmake desbordante_add_test( ind.faida SRCS test_faida.cpp LIBS ${DESBORDANTE_PREFIX}::testlib::common ${DESBORDANTE_PREFIX}::ind ${DESBORDANTE_PREFIX}::ind::faida ${DESBORDANTE_PREFIX}::testlib::ind spdlog::spdlog_header_only magic_enum::magic_enum Boost::headers ) ```