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

Allow for multi-line class definitions in class_list.cpp.py #5027

Open
jonpsy opened this issue May 12, 2020 · 2 comments
Open

Allow for multi-line class definitions in class_list.cpp.py #5027

jonpsy opened this issue May 12, 2020 · 2 comments

Comments

@jonpsy
Copy link
Contributor

jonpsy commented May 12, 2020

Currently, our class_list.cpp.py seems to be very sensitive to spaces and new line chars, this causes potential mess-ups when class names tend to get bigger. An immediate example would be
class RandomFourierGaussPreproc: public RandomMixin<DensePreprocessor<float64_t>> , doing a clang-format does

	class RandomFourierGaussPreproc
	    : public RandomMixin<DensePreprocessor<float64_t>>
	{

our python code fails to register this class on class_list.cpp.

@karlnapf
Copy link
Member

thanks for reporting, I have noticed this a few times before as well

@karlnapf karlnapf changed the title Modify class_list.cpp.py to be more flexible Allow for multi-line class definitions in class_list.cpp.py May 12, 2020
@karlnapf
Copy link
Member

Context: class_list.py parses the C++ code to extract all class names used in the shogun codebase. We use this in factories to allow creating instances by name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants