Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass data as an option #218

Merged
merged 9 commits into from
Jul 1, 2023
Merged

Pass data as an option #218

merged 9 commits into from
Jul 1, 2023

Conversation

BUYT-1
Copy link
Collaborator

@BUYT-1 BUYT-1 commented May 21, 2023

This makes it easier to implement algorithms that accept anything other than a table.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

python_bindings/create_dataframe_reader.h Show resolved Hide resolved
python_bindings/get_py_type.h Show resolved Hide resolved
python_bindings/make_csv_parser.h Outdated Show resolved Hide resolved
python_bindings/py_to_any.h Show resolved Hide resolved
@BUYT-1 BUYT-1 changed the title Pass data as option Pass data as an option May 21, 2023
@BUYT-1 BUYT-1 force-pushed the data-as-option branch 6 times, most recently from f36d73b to c8ef7b3 Compare May 26, 2023 17:08
@BUYT-1 BUYT-1 force-pushed the data-as-option branch 15 times, most recently from dc2923d to 5721d0a Compare June 11, 2023 08:42
Copy link
Collaborator

@polyntsov polyntsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Теперь Algorithm::LoadData не принимает параметров, но все еще должен быть обязательно вызван перед Execute, что не всегда нужно. Cтоит подумать о том, чтобы разрешить вызывать Execute без LoadData перед этим.

python_bindings/create_dataframe_reader.cpp Outdated Show resolved Hide resolved
python_bindings/get_py_type.cpp Show resolved Hide resolved
python_bindings/get_py_type.cpp Outdated Show resolved Hide resolved
python_bindings/get_py_type.cpp Outdated Show resolved Hide resolved
src/util/config/relational_data/input_relation_type.h Outdated Show resolved Hide resolved
src/algorithms/aidfd/aid.cpp Outdated Show resolved Hide resolved
src/algorithms/algo_factory.h Outdated Show resolved Hide resolved
python_bindings/py_algorithm.cpp Outdated Show resolved Hide resolved
python_bindings/create_dataframe_reader.cpp Outdated Show resolved Hide resolved
python_bindings/py_algorithm.h Show resolved Hide resolved
This brings the tuple and the enum closer together to avoid confusion,
like in Desbordante#209
@BUYT-1 BUYT-1 force-pushed the data-as-option branch 2 times, most recently from 1c0b878 to 6571177 Compare June 20, 2023 19:37
@BUYT-1 BUYT-1 requested a review from polyntsov June 20, 2023 21:19
src/util/config/tabular_data/input_table/option.h Outdated Show resolved Hide resolved
src/algorithms/pli_based_fd_algorithm.cpp Outdated Show resolved Hide resolved
src/algorithms/fd_algorithm.cpp Outdated Show resolved Hide resolved
src/algorithms/cfd/cfd_discovery.cpp Outdated Show resolved Hide resolved
src/algorithms/ar_algorithm.cpp Outdated Show resolved Hide resolved
python_bindings/get_py_type.cpp Outdated Show resolved Hide resolved
python_bindings/get_py_type.cpp Show resolved Hide resolved
python_bindings/py_algorithm.h Show resolved Hide resolved
python_bindings/py_algorithm.cpp Outdated Show resolved Hide resolved
python_bindings/get_py_type.cpp Show resolved Hide resolved
`pybind11::object` manages reference counting, which is sometimes
unneeded. Also changes some `std::string` to `std::string_view`.
Allows to denote when multiple types can be accepted.
The files are structured this way because an algorithm may use several
tables (HyMD) or even a list of tables (Spider).
Those algorithms still need the `InputTable` type, but they will
register different options, which may become common later and will thus
be put in this directory as well.
Also includes some minor test rewrites. Makes it easier to implement
algorithms that take something other than a single table.
@BUYT-1 BUYT-1 force-pushed the data-as-option branch 2 times, most recently from 24ba80c to b054296 Compare June 26, 2023 19:16
@BUYT-1 BUYT-1 requested a review from polyntsov June 26, 2023 19:35
Uses a more robust way of getting the number of columns. Avoids the
reliance on `input_table_` being set to the table being processed now,
indirectly inherited from the old implementation. Previously, there was
a possibility that `input_table_` would not be set to the table being
processed in `PliBasedFdAlgorithm` because of its `LoadData` overload,
but the only scenario which used it was using `TypoMiner`, and that
class would always set the option correctly.
@polyntsov polyntsov merged commit d994703 into Desbordante:main Jul 1, 2023
4 checks passed
@BUYT-1 BUYT-1 deleted the data-as-option branch September 7, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants