Skip to content
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

feat: abstract interface for jit wrapped function and type hint enhancements #60

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Qazalbash
Copy link

No description provided.

@f0uriest
Copy link
Owner

Thanks for the PR!

I'm happy with the improved type hints in the .py files, but I haven't fully come around to having dedicated interface files .pyi. Can you say a little more about the motivation? Most type checkers can read type hints from the source code just fine so I don't see the need for the extra file.

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.92%. Comparing base (b9f7ba5) to head (32d567d).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   97.92%   97.92%           
=======================================
  Files           7        7           
  Lines         965      966    +1     
=======================================
+ Hits          945      946    +1     
  Misses         20       20           
Files with missing lines Coverage Δ
interpax/_fourier.py 100.00% <100.00%> (ø)
interpax/_ppoly.py 96.93% <100.00%> (ø)
interpax/_spline.py 97.73% <100.00%> (ø)

@Qazalbash
Copy link
Author

I'm so sorry, I opened this PR late at night and forgot to add the details.

I recently had a chance to explore your projects, interpax, and quadax, and every time I hover over a function or class to see their parameters, it shows jit wrapped like in the screenshot below. By adding an abstract interface, it is easier to see the signature of a function or details of the class. With the help of these suggestions, I don't have to constantly look into documentation.

Without interface

image

With interface

image

I have also noticed for many functions, you haven't specified the return type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants