Litellm dev 01 10 2025 p2 (#7679)

* test(test_basic_python_version.py): assert all optional dependencies are marked as extras on poetry

Fixes https://github.com/BerriAI/litellm/issues/7677

* docs(secret.md): clarify 'read_and_write' secret manager usage on aws

* docs(secret.md): fix doc

* build(ui/teams.tsx): add edit/delete button for updating user / team membership on ui

allows updating user role to admin on ui

* build(ui/teams.tsx): display edit member component on ui, when edit button on member clicked

* feat(team_endpoints.py): support updating team member role to admin via api endpoints

allows team member to become admin post-add

* build(ui/user_dashboard.tsx): if team admin - show all team keys

Fixes https://github.com/BerriAI/litellm/issues/7650

* test(config.yml): add tomli to ci/cd

* test: don't call python_basic_testing in local testing (covered by python 3.13 testing)
This commit is contained in:
Krish Dholakia 2025-01-10 21:50:53 -08:00 committed by GitHub
parent 49d74748b0
commit c4780479a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 425 additions and 67 deletions

View file

@ -37,6 +37,51 @@ def test_litellm_proxy_server():
assert True
def test_package_dependencies():
try:
import tomli
import pathlib
import litellm
# Get the litellm package root path
litellm_path = pathlib.Path(litellm.__file__).parent.parent
pyproject_path = litellm_path / "pyproject.toml"
# Read and parse pyproject.toml
with open(pyproject_path, "rb") as f:
pyproject = tomli.load(f)
# Get all optional dependencies from poetry.dependencies
poetry_deps = pyproject["tool"]["poetry"]["dependencies"]
optional_deps = {
name.lower()
for name, value in poetry_deps.items()
if isinstance(value, dict) and value.get("optional", False)
}
print(optional_deps)
# Get all packages listed in extras
extras = pyproject["tool"]["poetry"]["extras"]
all_extra_deps = set()
for extra_group in extras.values():
all_extra_deps.update(dep.lower() for dep in extra_group)
print(all_extra_deps)
# Check that all optional dependencies are in some extras group
missing_from_extras = optional_deps - all_extra_deps
assert (
not missing_from_extras
), f"Optional dependencies missing from extras: {missing_from_extras}"
print(
f"All {len(optional_deps)} optional dependencies are correctly specified in extras"
)
except Exception as e:
pytest.fail(
f"Error occurred while checking dependencies: {str(e)}\n"
+ traceback.format_exc()
)
import os
import subprocess
import time