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

Use black to format pipeline code #4005

Merged
merged 17 commits into from
Feb 22, 2023
Merged

Conversation

jeremyliweishih
Copy link
Contributor

Fixes #4004.

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #4005 (f818f17) into main (15c93c4) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main   #4005     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        347     347             
  Lines      36914   36954     +40     
=======================================
+ Hits       36793   36833     +40     
  Misses       121     121             
Impacted Files Coverage Δ
evalml/pipelines/utils.py 99.6% <100.0%> (+0.1%) ⬆️
evalml/tests/conftest.py 98.2% <100.0%> (+0.1%) ⬆️
evalml/tests/pipeline_tests/test_pipeline_utils.py 99.8% <100.0%> (+0.1%) ⬆️
evalml/tests/utils_tests/test_cli_utils.py 100.0% <100.0%> (ø)
evalml/utils/cli_utils.py 96.6% <100.0%> (+0.8%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jeremyliweishih jeremyliweishih marked this pull request as ready for review February 16, 2023 21:14
@@ -33,7 +33,7 @@ outputs:
- statsmodels >=0.12.2
- colorama >=0.4.4
- cloudpickle >=1.5.0
- click >=7.1.2
- click>=8.0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed for black.

Copy link
Contributor

@christopherbunn christopherbunn left a comment

Choose a reason for hiding this comment

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

Small q but otherwise LGTM

"from evalml.pipelines.binary_classification_pipeline import BinaryClassificationPipeline\n"
"pipeline = BinaryClassificationPipeline(component_graph={'Imputer': ['Imputer', 'X', 'y'], 'Random Forest Classifier': ['Random Forest Classifier', 'Imputer.x', 'y']}, "
"parameters={'Imputer':{'categorical_impute_strategy': 'most_frequent', 'numeric_impute_strategy': 'mean', 'boolean_impute_strategy': 'most_frequent', 'categorical_fill_value': None, 'numeric_fill_value': None, 'boolean_fill_value': None}, "
"'Random Forest Classifier':{'n_estimators': 100, 'max_depth': 6, 'n_jobs': -1}}, random_seed=0)"
"'Random Forest Classifier':{'n_estimators': 100, 'max_depth': 6, 'n_jobs': -1}}, random_seed=0)",
mode=black.Mode(target_versions={black.TargetVersion.PY39}, line_length=88),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is line_length=88 arbitrary? Wondering if it's worth making it a param or global variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's what we have in our black config. Let me see how I can clean it up!

Copy link
Contributor

@eccabay eccabay left a comment

Choose a reason for hiding this comment

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

Looks good pending pulling out the line_length=88 somehow!

@jeremyliweishih jeremyliweishih merged commit be98201 into main Feb 22, 2023
@jeremyliweishih jeremyliweishih deleted the js_generate_pipeline_code branch February 22, 2023 21:03
@chukarsten chukarsten mentioned this pull request Mar 15, 2023
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.

Enhance generate_pipeline_code to format code to follow lint standards
4 participants