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
Create validate_transformer_code_style
function
#248
Comments
The current format of our However there is a bug in their library which produces |
Flake8 comes with a lot of different addons that we can use to adapt it to our codestyle and checking, here is a list of plugins that I found to be interesting for us: Addons that already pass
Addons that we want to add but require changes to our code
|
This may overlap with the |
@pvk-developer by looking at your PR it seems like some of these plugins do not require us to change anything in our code, but some others do.
|
A function should be implemented to automatically validate the code style of any new Transformer.
Function Name and Module
The function should be implemented inside
tests/contributing.py
and should be calledvalidate_transformer_code_style
Inputs
The function should accept a single input:
transformer (class or str)
: Transformer class or full Python name of the class (e.g.DatetimeTransformer
or"rdt.transformers.time.DatetimeTransformer"
)Outputs
The function should return a single
bool
value indicating whether the code style is correct or not.Behavior
The function should run all the third party code style checkers (
flake8
,isort
,pylint
...) as well custom code analysis checks and report whether all of them pass, as well as feedback about why they do not otherwise.List of Checks
The following validations must be performed and reported:
Transformer
(e.g.DatetimeTransformer
)tests/unit/transformers/<transformer_family>/<data_type>.py
test_<method_name>_<test_case_name>
Prints to console
The function prints several messages on the console indicating:
Usage Examples
Success
External tool failure
Custom validation failure
The text was updated successfully, but these errors were encountered: