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 code formatter yapf to the tests and pre-commit #509

Merged
merged 9 commits into from
Jan 10, 2021

Conversation

akihironitta
Copy link
Contributor

@akihironitta akihironitta commented Jan 10, 2021

What does this PR do?

Adds yapf https://github.com/google/yapf to CI and pre-commit hooks and is part of #482.

TODO

  • add yapf to pre-commit hooks
  • add yapf to GitHub Actions
  • update flake8 and isort configs to avoid conflicts with yapf
    • As far as I looked through some issues and PRs, we don't need to change flake8/isort configs.
  • Apply yapf to other files than pl_bolts/ and tests/.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@akihironitta akihironitta added ci/cd Continues Integration and delivery refactoring labels Jan 10, 2021
@codecov
Copy link

codecov bot commented Jan 10, 2021

Codecov Report

Merging #509 (3452880) into master (c997f85) will decrease coverage by 0.50%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #509      +/-   ##
==========================================
- Coverage   79.58%   79.07%   -0.51%     
==========================================
  Files         102      102              
  Lines        5921     5921              
==========================================
- Hits         4712     4682      -30     
- Misses       1209     1239      +30     
Flag Coverage Δ
cpu 25.65% <ø> (ø)
pytest 25.65% <ø> (ø)
unittests 78.58% <ø> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pl_bolts/datasets/cifar10_dataset.py 71.73% <0.00%> (-26.09%) ⬇️
pl_bolts/datasets/base_dataset.py 81.81% <0.00%> (-13.64%) ⬇️

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 c997f85...3452880. Read the comment docs.

@akihironitta akihironitta changed the title Add code formatter yapf Add code formatter yapf to the tests and pre-commit Jan 10, 2021
@akihironitta akihironitta mentioned this pull request Jan 10, 2021
8 tasks
@akihironitta akihironitta marked this pull request as ready for review January 10, 2021 14:56
@akihironitta
Copy link
Contributor Author

Applied yapf in #510, and it looks neat.

@akihironitta akihironitta mentioned this pull request Jan 10, 2021
8 tasks
docs/source/conf.py Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
@Borda Borda merged commit 795b7b1 into Lightning-Universe:master Jan 10, 2021
@akihironitta akihironitta deleted the ci/add-yapf branch January 10, 2021 15:46
@Borda Borda added this to the v0.3 milestone Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Continues Integration and delivery refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants