-
Notifications
You must be signed in to change notification settings - Fork 139
Install pytest-sphinx from conda-forge and fix mypy errors #1599
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
84448c9
to
8f51ae8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1599 +/- ##
=======================================
Coverage 81.71% 81.71%
=======================================
Files 230 230
Lines 52924 52925 +1
Branches 9402 9402
=======================================
+ Hits 43248 43249 +1
Misses 7244 7244
Partials 2432 2432
🚀 New features to boost your workflow:
|
62a7dd0
to
50db190
Compare
f8ad8f2
to
1acb289
Compare
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.
Pull Request Overview
This PR simplifies the pytest-sphinx installation by moving it from pip to conda-forge, and resolves mypy type checking errors across multiple files. The changes enable removing pytensor/compile/sharedvalue.py
from the mypy exclusion list.
- Install pytest-sphinx from conda-forge instead of pip
- Fix mypy type annotation and casting errors in 8 files
- Remove pytensor/compile/sharedvalue.py from mypy-failing.txt
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
scripts/mypy-failing.txt | Removes pytensor/compile/sharedvalue.py from mypy exclusion list |
pytensor/tensor/rewriting/numba.py | Removes type ignore comments for proper type annotations |
pytensor/tensor/rewriting/blockwise.py | Removes type ignore comment for Blockwise type annotation |
pytensor/tensor/random/rewriting/numba.py | Removes type ignore comments for RandomVariable and ShapeFeature |
pytensor/tensor/einsum.py | Adds proper type annotations and casting for einsum path handling |
pytensor/scan/utils.py | Adds explicit type casting for Variable return type |
pytensor/npy_2_compat.py | Adds type ignore comment for NumPy 2 compatibility |
pytensor/link/numba/dispatch/vectorize_codegen.py | Replaces type ignore with pyright ignore comments |
pytensor/link/jax/linker.py | Moves scalar_shape_inputs type annotation to class level |
environment.yml | Moves pytest-sphinx from pip to conda-forge dependencies |
environment-osx-arm64.yml | Moves pytest-sphinx from pip to conda-forge dependencies |
.github/workflows/test.yml | Adds pytest-sphinx to micromamba install commands |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Nice
Thanks @ricardoV94! |
Description
pytest-sphinx is now available from conda-forge, so we should install it from there to simplify our environment specifications and installation process.
Updating the dependencies busts the micromamba cache on our CI. As noted in #1598, for such a fresh install, mypy was broken on main. This also fixes type errors in 8 files.
Afterwards, we are able to remove
pytensor/compile/sharedvalue.py
frommypy-failing.txt
.Related Issue
scipy-stubs
as development depedency #1598Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1599.org.readthedocs.build/en/1599/