-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update openai
and test codemodder without it
#624
Conversation
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.
@clavedeluna up til now we have included openai
as an optional dependency so that users of OSS codemodder do not require the client if they're not using it. That's the reason for including it both in optional dependencies and in test dependencies since we do have unit tests that rely on it.
Until we have LLM codemods in this repo I might suggest keeping it that way.
I didn't say this outright in the PR description but the problem I see is that without openai getting installed as a project dependency, running codemodder fails
you can see this by not having openai in your environment and just running codemodder any way you like. Thankfully the issue is just a typing thing, but we weren't even aware of this because none of our environments test without openai installed. I can fix that typing issue but we'd have to test codemodder in a non-openai environment. But.... maybe just have it as a requirement? |
@clavedeluna I still think we shouldn't require OpenAI as a dependency for this project right now. You are correct that there is an issue and thank you for identifying it. I believe the right fix is to add this at the top of the file: from __future__ import annotations And maybe it's a good idea to add a separate pipeline test step that just installs the codemodder package and runs |
Quality Gate passedIssues Measures |
openai
and test codemodder without it
I noticed we had openai declared both as a project dependency ( but that was not defined inall = ...
and as a test dependency. I think just making it a project dependency this was is the correct way, but perhaps there was a different intention here?Fixes a bug in codemodder if openai is not installed and test in CI to prevent it. Also updated the dependency.
Can currently open dependabot PR if this is merged.