Conversation
AlexWaygood
left a comment
There was a problem hiding this comment.
It looks like the only one of these projects that actually installs scipy-stubs in CI before running type checkers on their code is optuna. I think in general we try to have mypy_primer emulate the experience these projects get in CI when they actually run type checkers on their code. That said, I can totally see that having scipy-stubs installed for these projects would make things easier for you to test scipy-stubs in your CI!
I wonder if you could do something with MYPY_PATH (and/or the equivalent pyright setting, if you're using it with pyright?) in your CI's invocation of mypy_primer so that mypy considers scipy-stubs installed for the purposes of your CI, but not for other users of mypy_primer...?
Yea, most of these projects don't use scipy-stubs themselves. But most of them have
Hmm 🤔. I don't know enough about mypy_primer's implementation to say anything sensible here, I'm afraid. |
|
(I'm pretty new as a maintainer here; curious if the other maintainers have any thoughts!) |
There was a problem hiding this comment.
I'm potentially okay with this, given that we're not currently installing scipy for these projects at all...
...but if your goal is to add mypy_primer to the CI of scipy-stubs, you'll need to do a path munging thing (and adding the dep here will not help with that, in fact it may even confuse)
You can see how we set this up in numpy CI, via the --new-prepend-path and --old-prepend-path flags. Let me know it that works!
Thanks to your advice, I think I managed to get it to work now: scipy/scipy-stubs#824 edit: it indeed works :) scipy/scipy-stubs#827 |
|
I reverted the bokeh changes because they only use scipy in their examples, which is excluded in their mypy config. I also updated the description to make reviewing this a bit easier. |
c570d2c to
b9c79de
Compare
b9c79de to
6d83aa9
Compare
This adds the scipy-stubs as dependency to the following projects:
scipy-stubsas dev dependency dedupeio/dedupe#1225)