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

Consider adding a linter #2022

Closed
freddyheppell opened this issue May 30, 2024 · 1 comment · Fixed by #2033
Closed

Consider adding a linter #2022

freddyheppell opened this issue May 30, 2024 · 1 comment · Fixed by #2033

Comments

@freddyheppell
Copy link
Contributor

When making my PR I noticed that BERTopic doesn't have a linter. I think it would make it easier to keep code well formatted with multiple contributors, as well as flagging up bad code practices, unused imports, out-of-date doc comments etc.

You no longer need multiple separate (and potentially conflicting) tools either, you can now use the all-in-one package Ruff, which has been adopted by various high-profile projects like scipy, pandas and huggingface. Its defaults tend to be pretty sensible -- scipy for one doesn't seem to have customised them at all.

Happy to PR adding Ruff and an actions workflow if you'd like.

@MaartenGr
Copy link
Owner

Thanks for the suggestion! A linter, although it should have been added from the start, was on my to-do list for a while but I haven't had the time to add it. So yes, if you could take the time to add Ruff where appropriate (indeed including the actions workflow), then that would be great! Note that it should then also be added to the CONTRIBUTING.md so that users know that they should use Ruff when developing.

Now that I think about it, that file should be added somewhere were it gets more visibility. Although a bit off-topic, curious to hear what you (or anyone else's) thoughts are.

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 a pull request may close this issue.

2 participants