[project] name = "argilla-server" dynamic = ["version"] description = "Open-source tool for exploring, labeling, and monitoring data for NLP projects." readme = "README.md" requires-python = ">=3.9" license = { text = "Apache-2.0" } keywords = [ "data-science", "natural-language-processing", "text-labeling", "data-annotation", "artificial-intelligence", "knowledged-graph", "developers-tools", "human-in-the-loop", "mlops", ] authors = [{ name = "argilla", email = "contact@argilla.io" }] maintainers = [{ name = "argilla", email = "contact@argilla.io" }] dependencies = [ # Basic dependencies "fastapi ~= 0.115.0", "pydantic ~= 2.9.0", "pydantic-settings ~= 2.6.0", "uvicorn[standard] ~= 0.32.0", "opensearch-py ~= 2.0.0", "elasticsearch8[async] ~= 8.7.0", "brotli-asgi ~= 1.4.0", "backoff ~= 2.2.0", # Database dependencies "alembic ~= 1.13.0", "SQLAlchemy ~= 2.0.0", "greenlet ~= 3.1.0", # Async SQLite "aiosqlite == 0.20.0", # Statics server "aiofiles ~= 24.1.0", "PyYAML >= 5.4.1,< 6.1.0", # security dependencies "python-jose[cryptography] ~= 3.3.0", "bcrypt ~= 4.2.0", # required by fastapi "python-multipart ~= 0.0.16", # OAuth2 integration "httpx ~= 0.27.0", "oauthlib ~= 3.2.0", "social-auth-core ~= 4.5.0", # Background processing "rq ~= 1.16.2", # Info status "psutil ~= 5.8, <5.10", # For logging, tracebacks, printing, progressbars "rich != 13.1.0", # For CLI "typer >= 0.6.0, < 0.10.0", # spaCy only supports typer<0.10.0 "packaging>=23.2", # For Webhooks "standardwebhooks>=1.0.0", # For HF dataset import "datasets >= 3.0.1", "pillow >= 10.4.0", # For Telemetry "huggingface-hub>=0.26.2", "Jinja2>=3.1.4", # Used by huggingface-hub to render dataset card templates ] [project.optional-dependencies] postgresql = [ "psycopg2 ~= 2.9.0", # Async PostgreSQL "asyncpg ~= 0.30.0", ] [project.urls] homepage = "https://www.argilla.io" documentation = "https://docs.argilla.io" repository = "https://github.com/argilla-io/argilla" [build-system] requires = ["pdm-backend"] build-backend = "pdm.backend" [tool.pdm] distribution = true [tool.pdm.build] excludes = [".env.dev", ".env.test"] [tool.pdm.version] source = "file" path = "src/argilla_server/_version.py" [tool.pdm.dev-dependencies] test = [ "pytest>=7.4.4", "pytest-cov>=4.1.0", "pytest-mock>=3.12.0", # pytest-asyncio version 0.23.3 has a break change with how event loops are managed so we are setting it to use ~=0.21.1 "pytest-asyncio~=0.21.1", "pytest-env>=1.1.3", "factory-boy~=3.2.1", "httpx>=0.26.0", "pytest-randomly>=3.15.0", # For mocking httpx requests and responses "respx>=0.21.1", # pytest-randomly requires numpy < 2.0.0 "numpy<2.0.0", ] [tool.pytest.ini_options] log_format = "%(asctime)s %(name)s %(levelname)s %(message)s" log_date_format = "%Y-%m-%d %H:%M:%S" log_cli = "True" testpaths = ["tests"] env = ["HF_HUB_DISABLE_TELEMETRY=1"] [tool.coverage.run] concurrency = ["greenlet", "thread", "multiprocessing"] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "def __repr__", "def __str__", "raise AssertionError", "raise NotImplementedError", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "if _TYPE_CHECKING:", "if typing.TYPE_CHECKING:", ] [tool.isort] profile = "black" [tool.ruff] # Ignore line length violations ignore = ["E501"] # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", ] line-length = 120 [tool.ruff.per-file-ignores] # Ignore imported but unused; "__init__.py" = ["F401"] [tool.black] line-length = 120 [tool.pdm.scripts] _.env_file = ".env.dev" cli = { cmd = "python -m argilla_server.cli" } server = { cmd = "uvicorn argilla_server:app --port 6900 --reload" } migrate = { cmd = "alembic upgrade head" } worker = { cmd = "python -m argilla_server worker" } server-dev.composite = [ "migrate", "cli database users create_default", "server", ] test = { cmd = "pytest", env_file = ".env.test" } docker-build-argilla-server = { shell = "pdm build && cp -R dist docker/server && docker build -t argilla/argilla-server:local docker/server" } docker-build-argilla-hf-spaces = { shell = "pdm run docker-build-argilla-server && docker build --build-arg ARGILLA_VERSION=local -t argilla/argilla-hf-spaces:local docker/argilla-hf-spaces" }