[project] name = "ragbits-workspace" version = "0.1.0" description = "Ragbits development workspace" readme = "README.md" requires-python = ">=3.10" dependencies = [ "ragbits-cli", "ragbits-core[chroma,fastembed,local,otel,logfire,qdrant,pgvector,weaviate,azure,gcs,hf,s3,google_drive]", "ragbits-document-search[unstructured,ray]", "ragbits-evaluate[relari]", "ragbits-guardrails[openai]", "ragbits-chat", "ragbits-agents[a2a,cli,mcp]", "mike>=2.1.3", ] [dependency-groups] dev = [ "aiosqlite>=0.21.0", "greenlet>=3.1.1", "pre-commit~=3.8.0", "pytest~=8.3.3", "pytest-cov~=5.0.0", "pytest-asyncio~=0.24.0", "pip-licenses>=5.0.0,<6.0.0", "mkdocs>=1.6.1", "mkdocs-autorefs>=1.2.0", "mkdocs-material>=9.5.39", "mkdocs-material-extensions>=1.3.1", "mkdocs-click>=0.8.1", "mkdocstrings>=0.26.1", "mkdocstrings-python>=1.11.1", "mike>=2.1.0", "griffe>=1.3.2", "griffe-typingdoc>=0.2.7", "types-PyYAML>=6.0.2", "types-requests>=2.32.0", "mypy>=1.13.0", "moto~=4.2.7", "testcontainers[postgres,weaviate]>=4.0.0", "ruff>=0.6.8", ] [tool.uv.sources] ragbits = { workspace = true } ragbits-cli = { workspace = true } ragbits-core = { workspace = true } ragbits-document-search = { workspace = true } ragbits-evaluate = {workspace = true} ragbits-guardrails = {workspace = true} ragbits-chat = {workspace = true} ragbits-agents = { workspace = true } [tool.uv.workspace] members = [ "packages/ragbits", "packages/ragbits-cli", "packages/ragbits-core", "packages/ragbits-document-search", "packages/ragbits-evaluate", "packages/ragbits-guardrails", "packages/ragbits-chat", "packages/ragbits-agents", ] [tool.pytest.ini_options] norecursedirs = ".git .tox .env dist build migrations docker config notebooks research scripts examples" python_files = "test_*.py" addopts = "--import-mode=importlib -ra --showlocals --strict-markers --ignore=docs/conf.py --ignore=setup.py --ignore=ci --ignore=.eggs --tb=short " #--doctest-modules --doctest-glob=*.rst asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" pythonpath = "./" [tool.coverage.run] omit = [ "config.py", "config-3.py", "/tmp/*", ] [tool.mypy] warn_unused_configs = true ignore_missing_imports = true warn_unused_ignores = false show_error_codes = true check_untyped_defs = true no_implicit_optional = true explicit_package_bases = true mypy_path = [ "packages/ragbits-cli/src", "packages/ragbits-core/src", "packages/ragbits-document-search/src", "packages/ragbits-evaluate/src", "packages/ragbits-guardrails/src", "packages/ragbits-chat/src", "packages/ragbits-agents/src", ] exclude = ["scripts", "examples"] [[tool.mypy.overrides]] module = "ragbits.*" disallow_untyped_defs = true [tool.ruff] exclude = [".venv"] extend-include = ["*.ipynb"] line-length = 120 [tool.ruff.lint] preview = true explicit-preview-rules = true select = [ # Default rules "E", # pycodestyle errors "F", # Pyflakes "C4", # flake8-comprehensions "C90", # mccabe complex structure "D", # pydocstyle "I", # isort "PT", # flake8-pytest-style "PL", # Pylint "SIM", # flake8-simplify "UP", # pyupgrade "W", # pycodestyle warnings "S", # flake8-bandit "ANN", # flake8-annotations "B", # flake8-bugbear "NPY", # NumPy-specific rules ] extend-select = [ "RUF022", # unsorted-dunder-all "PLR6301", # no-self-use ] ignore = [ "B024", "B028", # no-explicit-stacklevel, TODO confirm this "C901", # complex-structure, TODO confirm this "D100", "D104", "D105", "D107", "D415", "D200", "D205", "D212", "ANN002", "ANN003", "ANN101", "ANN102", "ANN204", "PLR0913", ] [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.flake8-annotations] allow-star-arg-any = true [tool.ruff.lint.per-file-ignores] "*.ipynb" = [ "PLR2004", "W293", "D101", # D*** - we should not require docs in every Jupyter notebook "D102", "D103", "D107" ] "**/tests/**/*.py" = [ "S101", # asserts allowed in tests... "ARG", # Unused function args "D101", # Missing docstring in public class "D102", # Missing docstring in public method "D103", # Missing docstring in public function "PT011", # we prefer assert at the end of the test instead of using "match" parameter in pytest.raises "ANN201", # Missing return type annotation "PLR2004", # Magic numbers are ok in tests ] [tool.ruff.format] docstring-code-format = true docstring-code-line-length = 120 [tool.ruff.lint.isort] known-first-party = ["ragbits"] known-third-party = [ "IPython", "PIL", "cv2", "dotenv", "editdistance", "fastapi", "fire", "hydra", "joblib", "loguru", "luigi", "matplotlib", "neptune", "neptune_config", "nltk", "numpy", "omegaconf", "pandas", "pqdm", "pydantic", "pytest", "pytorch_lightning", "requests", "scipy", "setuptools", "shapely", "skimage", "sklearn", "streamlit", "torch", "torchvision", "tqdm", "typer" ] [tool.setuptools.packages.find] exclude = ["ui"]