[project] name = "roledesk" version = "0.1.0" description = "A job-search engine on the desk plugin contract and the pipeline queue." requires-python = ">=3.14" dependencies = [ # `desk` and `pipeline` are packaged by the news repo as part of the # newsdesk distribution. Imported from there and never edited here. "newsdesk", "fastapi>=0.110", "jinja2>=3.1", "pydantic>=2.6", "pyyaml>=6.0", "uvicorn[standard]>=0.29", ] [project.scripts] app = "app.cli:main" [build-system] requires = ["setuptools>=68"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] include = ["app*"] [tool.uv.sources] newsdesk = { path = "../news", editable = true } [dependency-groups] dev = [ "pytest>=9.1.1", "ruff>=0.14", "mypy>=1.18", "types-PyYAML>=6.0", ] # ----------------------------------------------------------------- linting [tool.ruff] line-length = 90 target-version = "py314" [tool.ruff.lint] # The same selection as news: bug-prone patterns, outdated idioms, # comprehensions and ruff's own checks. No import sorting. select = ["E", "F", "W", "B", "UP", "C4", "SIM", "RUF"] ignore = [ "E501", # line length: prose comments wrap by meaning "B008", # function call in a default argument, as FastAPI writes Depends "SIM108", # ternary instead of if/else ] [tool.ruff.lint.per-file-ignores] # Pydantic models whose base comes from `desk.models`; ruff only recognises a # pydantic subclass when it sees `BaseModel` in the same file. "app/models.py" = ["RUF012"] # ------------------------------------------------------------ type checking [tool.mypy] python_version = "3.14" files = ["app", "tests"] plugins = ["pydantic.mypy"] # The editable install of ../news is a setuptools import hook, which mypy # cannot follow. Pointed at the checkout instead, and told to type what it # imports from there without reporting on code that is not ours. mypy_path = "../news" warn_unused_ignores = true warn_redundant_casts = true warn_unreachable = true no_implicit_optional = true check_untyped_defs = true [[tool.mypy.overrides]] module = ["desk.*", "pipeline.*", "newsdesk.*"] follow_imports = "silent" [[tool.mypy.overrides]] # Optional extras of the news repo, only imported inside functions there. module = ["sklearn.*", "trafilatura.*", "feedparser.*", "anthropic.*", "claude_agent_sdk.*", "sentence_transformers.*", "webauthn.*", "cbor2.*"] ignore_missing_imports = true [[tool.mypy.overrides]] module = ["anthropic.*", "claude_agent_sdk.*", "sentence_transformers.*"] follow_imports = "skip" [tool.pytest.ini_options] testpaths = ["tests"]