-
Notifications
You must be signed in to change notification settings - Fork 358
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
ci: set up lint job using pre-commit/action #238
Conversation
I'm alright with handling that in this PR since it's not that big yet but since it's your PR, you can choose! |
If you are alright with having one commit in the repository with failed CI, I suggest merging this PR and having another PR to handle the lint issues. That way, you can ignore the commit as suggested in bertopic by @freddyheppell. |
I think it would potentially be easier to enable the precommit CI and switch to Ruff all in this PR. Although Ruff and Black/Flake8 will theoretically have quite similar standards, they won't be precisely the same, so I don't see the point of fixing before switching to Ruff. Also, the blame ignore thing isn't absolute. It will still attribute changes to an ignored commit if the code was genuinely introduced by that commit (e.g. the lint workflow I added to BERTopic will still be attributed to that commit, as there is no alternative). So it's fine to do it all in one PR. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@@ -89,3 +89,27 @@ Repository = "https://github.com/MaartenGr/KeyBERT.git" | |||
[tool.setuptools.packages.find] | |||
include = ["keybert*"] | |||
exclude = ["tests"] | |||
|
|||
[tool.ruff] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the same config settings as in Bertopic to achieve similar results.
Could you insert the descriptions in the docstrings @MaartenGr? You know best what these parameters are supposed to be. |
Added suggestions to the |
Co-authored-by: Maarten Grootendorst <[email protected]>
Co-authored-by: Maarten Grootendorst <[email protected]>
Co-authored-by: Maarten Grootendorst <[email protected]>
Co-authored-by: Maarten Grootendorst <[email protected]>
Co-authored-by: Maarten Grootendorst <[email protected]>
If it is alright with you, this can be squashed and merged. |
@afuetterer Awesome, thank you for the work on this. It is greatly appreciated 😄 |
This is also in preparation of replacing flake8 and black with ruff (#232).
There are a few issues with the code base regarding its own pre-commit config.
black
and theend-of-file-fixer
want to fix a few files.Should these changes be a separate PR?