refactor: reorganize dependencies following PEP 735#588
Conversation
- Remove unused dependencies (json5, ansicolors) - Move type stubs to typecheck group (types-requests, types-tqdm) - Move server components to optional server group (uvicorn, fastapi) - Move llm-sandbox to optional sandbox group - Move huggingface-hub to hf optional group - Create granite_retriever optional group (elasticsearch, pyarrow, sentence-transformers) - Split dev group into modular groups (lint, test, typecheck, build, release) - Add dev group using PEP 735 include-group syntax - Move langchain-community and ddgs to test group - Add langchain-core to tools group - Update CONTRIBUTING.md installation instructions Closes generative-computing#583 Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
|
@nrfulton @jakelorocco here's what I've come up with on cleaning up the dependencies. So far I've stuck to just cleaning up the pyproject for now. As noted in the description I only removed two unused dependencies, the rest were only moved around into different locations based on detected usage. I now plan to explore the optional follow up task of finding and cleaning up any imports in the code that may or may not need refactoring based on these updates. This should be thoroughly tested by multiple people on multiple envs before merge (@planetf1 @psschwei) |
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
This was simpler than I expected, pushed c0e45df addressing it In short, since dependencies only moved out of core and not into it there were no checks to be removed. The above commit addresses imports who changed groups. Lastly the imports moved into optional deps were already "wrapped" in existing checks (eg hf) So development is complete and this is ready for review and testing |
jakelorocco
left a comment
There was a problem hiding this comment.
Thank you for cleaning this up. I will try to run the tests today and make sure everything runs on a clean install. Left a few questions.
Adds 'backends' extra for installing just backend dependencies (watsonx, hf, vllm, litellm) without additional features. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
|
@jakelorocco I believe I've addressed all your comments if you could take a another look |
jakelorocco
left a comment
There was a problem hiding this comment.
tests passed locally on macos and on linux
Misc PR
Type of PR
Description
Summary
Reorganizes dependencies in `pyproject.toml` following PEP 735 standards for better modularity and lighter installs.
Changes
Benefits
Validation
Closes #583
Testing