My first contribution was to SCIPY stubs their type annotation library.
i wanted to improve the dimensional accuracy making the input accept 2d, 3d arrays.
Three statistical result classes — bootstrapresult,
permutationtestresult,
and Montecarlotestresult they were storing their distribution arrays as a plain untyped array its shape information was being lost.
A 1D/2D input looked identical to the type checker.
So i introduced a second TypeVar _DistT to all three classes so the distribution array carries its actual shape through the type system.
After changes:
->A 1D bootstrap returns BootstrapResult[float, Array1D.
->A 2D bootstrap returns BootstrapResult[Array1D, Array2D].
-Maintainers asked me to test it out since no test were there verify my work. i learnt to create tests.My work got verified tbh i was so happy.
During this process i came from scratch , i knew python pretty well and my knowledge about usage of libraries/my academics came into play.
I was so overwhelmed when i got my first reply it was from jorenhmam(numpy type testing maintainer and author of Scipy stubs).
felt like an achievement. he helped me learn many things his guidance was really hepful.
OUTCOMES:
My understanding about codebase how things actually flow, cross imports, structure and integrity, everything exists for a reason , github CI and many more.
One silly thing i learnt: Never to touch others code unless it has issues maintainers comments they get pretty mad in a beautiful way.
we all learn from our mistakes ;)
I explored other repo codebases eg: numpy,statsmodel,Scipy main and many more they have huge structures and everything maintained so properly.
Open source is really Beautiful.
Top comments (0)