-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ci: added typechecking #1537
ci: added typechecking #1537
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d7310d1
to
d84cbc7
Compare
d84cbc7
to
2df9c8c
Compare
f35541d
to
afc3e7d
Compare
This is now passing and ready to merge! |
Hey @ErikBjare this shows an empty file. Is that expected? Sorry it took me so long to get to this PR |
@krrishdholakia Yes, see https://peps.python.org/pep-0561/ for the spec defining its purpose/meaning. |
Just reading this PR, @krrishdholakia just to share for your knowledge, the |
@@ -55,6 +58,14 @@ litellm = 'litellm:run_server' | |||
flake8 = "^6.1.0" | |||
black = "^23.12.0" | |||
pytest = "^7.4.3" | |||
mypy = "^1.8.0" |
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.
hey @ErikBjare @jamesbraza is it necessary to add mypy and types in our core dependencies?
for context i'm looking at openai's dependencies and i don't see this there - https://github.com/openai/openai-python/blob/54a5911f5215148a0bdeb10e2bcfb84f635a75b9/pyproject.toml#L10
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.
So these are not the core deps, they're dev
(developer) deps. Also, #4136 added mypy
to the dev
group already, so if this PR were rebased atop main this particular line would go away.
However, the below type stubs added need to stay in dev group dependencies.
Tho I don't think the type stubs should be so specifically pinned, it's okay with something like >=
instead of ^
Any plans to get something like this merged? I am still not using LiteLLM in my projects due to the poor typing. |
Closing this pr, as litellm already has a py.typed file - Line 2 in 16c0307
|
@krrishdholakia This PR did much more than simply add the For the file to make any sense you have to also typecheck your code, which you still do not seem to do? |
Hi @ErikBjare yep we do - Line 92 in 16c0307
Let me know if i'm missing anything |
I see!
But omg, that CI config is horrendous. Why aren't you using dependency
groups and lock files?
…On Thu, Sep 26, 2024, 19:23 Krish Dholakia ***@***.***> wrote:
Hi @ErikBjare <https://github.com/ErikBjare> yep we do -
https://github.com/BerriAI/litellm/blob/16c0307eab601b238f21021b9cba04b6957ad34c/.circleci/config.yml#L92
Let me know if i'm missing anything
—
Reply to this email directly, view it on GitHub
<#1537 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKXDOTNGQGUJML53XK3VTTZYQ7KHAVCNFSM6AAAAABCDIMV22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXGUZDIOJTHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
While integrating LiteLLM into gptme (ErikBjare/gptme#14), I found that it doesn't properly support typechecking (no
py.typed
marker file present).This fixes that, and adds a typechecking workflow to CI.
It also adds a bunch of
types-*
packages as dev deps. If this is really not wanted (although I don't see why not), it can be replaced by a call tomypy --install-types
in CI (but this would require contributors to run the same locally if they want to typecheck).