What is the purpose of this Pull Request?
Make less repetitive importing a classifier. The result would be something like this:
Beforefrom rosie.chamber_of_deputies.classifiers.election_expenses_classifier import ElectionExpensesClassifierAfterfrom rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier
The idea is just don't make necessary repeat the classifier file and the classifier class in sequence. At the end of this PR the idea is have the same behaviour for all classifiers.
Beforefrom rosie.<app>.classifiers.<classifier_file> import <classifier class>Afterfrom rosie.<app>.classifiers import <classifier class>
What is the purpose of this Pull Request? Make less repetitive importing a classifier. The result would be something like this: Before
from rosie.chamber_of_deputies.classifiers.election_expenses_classifier import ElectionExpensesClassifier
Afterfrom rosie.chamber_of_deputies.classifiers import ElectionExpensesClassifier
The idea is just don't make necessary repeat the classifier file and the classifier class in sequence. At the end of this PR the idea is have the same behaviour for all classifiers. Before
from rosie.<app>.classifiers.<classifier_file> import <classifier class>
Afterfrom rosie.<app>.classifiers import <classifier class>
I changed a import on the test_election_expenses_classifier to show how it would look like in practice
What was done to achieve this purpose? I just used a trick on
__init__
file.How to test if it really works? You can run Rosie tests and check if everything keep working well with
python rosie.py test
Who can help reviewing it? @cuducos @anaschwendler
TODO