-
Notifications
You must be signed in to change notification settings - Fork 4
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: add mypy configuration and pre-commit hook #48
Conversation
Draft for now because we need to see what configurations to add I'm not sure if we should add yet another config file, in this case |
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
- Coverage 83.07% 83.04% -0.04%
==========================================
Files 24 24
Lines 2618 2618
==========================================
- Hits 2175 2174 -1
- Misses 443 444 +1
|
f37b0fd
to
effe261
Compare
Run from anywhere with pre-commit run mypy --file . or from te main directory with mypy --config-file=tox.ini
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.
Good. We should keep in mind to write a small section in the docs about this as well, once we include this officially. Specifically how to config vs code.
Indeed. An attempt to improve the contribute pages was drafted in ComPWA/pycompwa#85, but that PR should probably be migrated to tensorwaves. Then the instructions can be simplified, we now only use:
All of that is automatised through pre-commit and Travis CI, just need to point out those four tools and their corresponding configs. The configs are important because they represent our (if necessary, evolving) coding conventions, so those conventions don't need to be written out in the documentation. Related to that, as you say, we may want to highly recommend contributors to work with VS code. There is currently no such assumption in the documentation. |
* ci: add mypy pre-commit hook * ci: add mypy configuration in `tox.ini` * fix: add more type hints to `interfaces.py` Run from anywhere with ```bash pre-commit run mypy --file . ``` or from te main directory with ```bash mypy --config-file=tox.ini ```
Closes #33
See also #47