Open chadrik opened 1 month ago
Protocol
and TypedDict
are not available in the typing
module until python 3.8.
We have a few options:
typing_extensions
Protocol
and trick mypy
into using it which is safe because it has no runtime behavior. Doing the same thing for TypedDict
is more complicated, but possible.Attention: Patch coverage is 83.19328%
with 180 lines
in your changes missing coverage. Please review.
Project coverage is 58.26%. Comparing base (
e215a77
) to head (efcae39
). Report is 3 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I got bored and added lots more, particularly focused on the solver module. Once the solver module is complete, we can experiment with compiling it to a c-extension using mypyc, which could provide a big speed boost!
I now have rez.solver
compiling as a C-extension with all tests passing. I'm very interested to see how the performance compares. Does anyone want to volunteer to help put together a performance comparison? Are there any known complex collection of packages to test against?
I found rez-benchmark
. Interestingly, rez is slower with the compiled rez.solver
. It could be because there are many modules and classes used by rez.solver
which have not been compiled.
I probably won't have time to dig into this much more, but once this PR is merged I'll make a new PR with the changes necessary for people to test the compiled version of rez.
Note: this PR likely invalidates https://github.com/AcademySoftwareFoundation/rez/pull/1745
@instinct-vfx Can you or someone from the Rez group have a look at this, please?
@chadrik You need to sign the CLA before we can even start to look at the PR.
@JeanChristopheMorinPerso
@chadrik You need to sign the CLA before we can even start to look at the PR.
I work for Scanline, which is owned by Netflix, and I'm meeting with our CLA manager on Monday. I made this contribution on my own time: can choose individual vs corporate CLA on a per PR basis?
I made this contribution on my own time: can choose individual vs corporate CLA on a per PR basis?
I don't think you "can" but your account can be associated to an an ICLA and a CCLA. But I'm not a lawyer so I can't help more than that. If you and or your employer/CLA manager have questions, you can contact the LF support by following the link in the EasyCLA comment: https://github.com/AcademySoftwareFoundation/rez/pull/1761#issuecomment-2119309923.
CLA is signed!
This is a first pass at adding type annotations throughout the code-base. Mypy is not fully passing yet, but it's getting close.
Addresses https://github.com/AcademySoftwareFoundation/rez/issues/1631