-
Notifications
You must be signed in to change notification settings - Fork 63
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
Create .codeclimate.yml #84
Conversation
Copy the code climate settings from qutip
As this is the initial commit of codeclimate, I think we can merge this as-is and solve those climate issues later step by step? |
.codeclimate.yml
Outdated
exclude_patterns: | ||
- "doc/" | ||
- "dist/" | ||
- "**/tests/" |
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.
Should we include tests in CodeClimate? Tests are code too.
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.
Yeah I agree.
I would personally prefer not to use a tool run by a third party like CodeClimate and rather to just run these tools ourselves in CI (e.g. flake8), but qutip itself already uses CodeClimate and it's better to have something than nothing, so let's go for it. Aside: Reasons for not liking a third party tool here -- it's a real pain to run CodeClimate checks locally and CodeClimate maintains state about which "bad" bits of code should be ignored that is completely outside of our control and invisible in the repository. |
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 left a question about using CodeClimate on tests and some thoughts about CodeClimate itself, but I am also +1 on merging this as is.
That is true. I don't know a way to run it locally either. Codeclimate checks a few more things as flake8, like similar code block and too complicated logic etc. We could find something that works both for qutip and qutip-qip. |
Interestingly, now you can choose in codeclimate to approve the issues for this PR so that the tests will all pass. |
There is a radon plugin for flake8 that will check code complexity -- https://github.com/rubik/radon -- and which I usually use with flake8. |
Copy the code climate settings from qutip but also apply code climate to tests
Copy the code climate settings from qutip