-
Notifications
You must be signed in to change notification settings - Fork 35
Use numpy.typing.DTypeLike #594
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
Conversation
The test is failing due to some interaction between numpy.typing and scanpydoc. |
I think it is failing only on Python 3.7, since One fix might be to require Python >=3.8 for the doc build, so we could skip "Check for Sphinx doc warnings" in |
@@ -31,6 +31,7 @@ jobs: | |||
- name: Run pre-commit | |||
uses: pre-commit/action@v2.0.0 | |||
- name: Check for Sphinx doc warnings | |||
if: contains(matrix.python-version, '3.8') |
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.
👍
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.
@ravwojdyla thanks for your (offline) suggestion to do this. The workflow syntax works perfectly. But the build is failing on 3.8 too, so I need to look into that!
Codecov Report
@@ Coverage Diff @@
## main #594 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 35 35
Lines 2749 2762 +13
=========================================
+ Hits 2749 2762 +13
Continue to review full report at Codecov.
|
Various extra changes were needed to get Sphinx to build the docs. The type annotation is very off-putting for users though: I was expecting the annotation to be This problem was discussed in Pandas in pandas-dev/pandas#33025. It might be worth investigating further to see if we can improve this. |
@tomwhite nice, should we merge this and investigate/improve in a separate PR/issue? |
@ravwojdyla I'd rather wait and see if there's a way to avoid the off-putting type signatures in docs, as I don' think this is an improvement as it stands. |
This PR has conflicts, @tomwhite please rebase and push updated version 🙏 |
This fixes half of #452. NumPy's
ArrayLike
isn't a drop-in replacement for ours, since it represents something that can be converted to a NumPy array (including lists, for example), whereas we use it in the sense of "something that looks like an array" (which could be a Dask array, for example).