lint and automatic lint#413
Merged
wanghan-iapcm merged 4 commits intodeepmodeling:develfrom Jan 25, 2023
Merged
Conversation
Closed
for more information, see https://pre-commit.ci
Member
Author
The tests failed. I think the program should allow it...
Codecov ReportBase: 82.40% // Head: 82.41% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## devel #413 +/- ##
==========================================
+ Coverage 82.40% 82.41% +0.01%
==========================================
Files 67 67
Lines 5950 5955 +5
==========================================
+ Hits 4903 4908 +5
Misses 1047 1047
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Member
Author
|
@wanghan-iapcm if you think this resolution is ok, I also want to apply it to other projects. |
wanghan-iapcm
approved these changes
Jan 25, 2023
Contributor
wanghan-iapcm
left a comment
There was a problem hiding this comment.
It is a nice solution!
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix #344.
To lint codes, this PR uses a popular tool, pre-commit.
.pre-commit-config.yamlshows all hooks used, including black and some common fixes. It can add a git hook togit commit. Thus, everything committed can be already formatted. In addition, there is also a CI to fix PRs. This way, we can ensure that everything new will also be formatted.This PR introduces a huge change history to almost all files, but it's a necessary step to start linting our codes.