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

Add pre-commit hooks for linting #3608

Merged
merged 20 commits into from
Jul 13, 2022
Merged

Add pre-commit hooks for linting #3608

merged 20 commits into from
Jul 13, 2022

Conversation

gsheni
Copy link
Contributor

@gsheni gsheni commented Jul 12, 2022

  • This makes it so that linting is automatically run right before you commit code:
  • We use this https://pre-commit.com/
  • Example of this:
    Screen Shot 2022-07-11 at 5 30 10 PM
  • More linting checks were added with the pre-commit-config
    • Strip out Jupyter notebook outputs
    • End of file fixer
    • removing trailing whitespaces
    • absolute important everywhere for EvalML
    • Add trailing commas
    • Run black[juypter] on py and jupyter files

@gsheni gsheni self-assigned this Jul 12, 2022
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #3608 (ac39882) into main (1b27e45) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main   #3608     +/-   ##
=======================================
- Coverage   99.7%   99.7%   -0.0%     
=======================================
  Files        335     335             
  Lines      33505   33504      -1     
=======================================
- Hits       33383   33382      -1     
  Misses       122     122             
Impacted Files Coverage Δ
evalml/automl/automl_algorithm/automl_algorithm.py 100.0% <ø> (ø)
evalml/automl/callbacks.py 100.0% <ø> (ø)
evalml/automl/engine/cf_engine.py 100.0% <ø> (ø)
evalml/automl/engine/dask_engine.py 100.0% <ø> (ø)
evalml/automl/engine/engine_base.py 100.0% <ø> (ø)
evalml/automl/engine/sequential_engine.py 100.0% <ø> (ø)
evalml/automl/pipeline_search_plots.py 100.0% <ø> (ø)
evalml/automl/utils.py 96.9% <ø> (ø)
evalml/data_checks/class_imbalance_data_check.py 100.0% <ø> (ø)
evalml/data_checks/data_check_action.py 100.0% <ø> (ø)
... and 308 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b27e45...ac39882. Read the comment docs.

@gsheni gsheni marked this pull request as ready for review July 12, 2022 17:43
pyproject.toml Show resolved Hide resolved
Copy link
Collaborator

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

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

awesome - thanks so much for doing this!

@gsheni gsheni enabled auto-merge (squash) July 13, 2022 14:39
@gsheni gsheni merged commit eb34a03 into main Jul 13, 2022
@gsheni gsheni deleted the prehooks branch July 13, 2022 15:10
@chukarsten chukarsten mentioned this pull request Jul 24, 2022
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.

None yet

3 participants