Skip to content

Commit

Permalink
Rename data module
Browse files Browse the repository at this point in the history
  • Loading branch information
BUYT-1 committed Jun 5, 2024
1 parent 7ea4b8e commit 4c15f0d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
4 changes: 2 additions & 2 deletions cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@ def decorator(func: Callable) -> Callable:
in option_type_info.items():
arg = f'--{opt_name}'
if opt_main_type == list:
if opt_additional_types[0] == desbordante.data_types.Table:
if opt_additional_types[0] == desbordante.data.Table:
click.option(arg, type=(str, str, bool),
multiple=True)(func)
else:
click.option(arg, multiple=True,
type=opt_additional_types[0])(func)
elif opt_main_type == desbordante.data_types.Table:
elif opt_main_type == desbordante.data.Table:
click.option(arg, type=(str, str, bool))(func)
else:
click.option(arg, type=opt_main_type)(func)
Expand Down
4 changes: 2 additions & 2 deletions src/python_bindings/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ar/bind_ar.h"
#include "bind_main_classes.h"
#include "cfd/bind_cfd.h"
#include "data/bind_data_types.h"
#include "data/bind_data.h"
#include "dd/bind_split.h"
#include "fd/bind_fd.h"
#include "fd/bind_fd_verification.h"
Expand Down Expand Up @@ -41,7 +41,7 @@ PYBIND11_MODULE(desbordante, module) {
}

for (auto bind_func :
{BindMainClasses, BindDataTypes, BindFd, BindCfd, BindAr, BindUcc, BindAc, BindOd,
{BindMainClasses, BindDataModule, BindFd, BindCfd, BindAr, BindUcc, BindAc, BindOd,
BindFdVerification, BindMfdVerification, BindUccVerification, BindStatistics, BindInd,
BindGfdVerification, BindSplit}) {
bind_func(module);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
#include "bind_data_types.h"
#include "data/bind_data.h"

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include "config/tabular_data/input_table_type.h"
#include "model/table/column_combination.h"

namespace {
namespace py = pybind11;
} // namespace

namespace python_bindings {
void BindDataTypes(py::module_& main_module) {
auto data_module = main_module.def_submodule("data_types");
data_module.doc() = R"doc(
Contains the types of data supported by Desbordante.
Currently only used as tags for Algorithm.get_option_type
)doc";
py::class_<config::InputTable>(data_module, "Table");
void BindDataModule(py::module_& main_module) {
auto data_module = main_module.def_submodule("data");
data_module.doc() = "Contains everything related to data itself.";
auto table_tag = py::class_<config::InputTable>(data_module, "Table");
table_tag.doc() = "Tag type for tabular data.";

using namespace model;
py::class_<ColumnCombination>(data_module, "ColumnCombination")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#include <pybind11/pybind11.h>

namespace python_bindings {
void BindDataTypes(pybind11::module_& main_module);
void BindDataModule(pybind11::module_& main_module);
} // namespace python_bindings

0 comments on commit 4c15f0d

Please sign in to comment.