Core is the boilerplate's plus what desk and the ats plugin import at module level: httpx, feedparser and numpy. Extras: embeddings (sentence-transformers), agent (anthropic, claude-agent-sdk) and passkeys (webauthn). Packages are app, pipeline, auth and desk, each without its tests; pytest runs tests/, pipeline/tests and auth/tests. ruff skips the boilerplate's copies, and mypy reads the copied modules silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
126 lines
4.5 KiB
TOML
126 lines
4.5 KiB
TOML
[project]
|
|
name = "roledesk"
|
|
version = "0.1.0"
|
|
description = "A job-search engine: ATS boards in, roles scored per search agent, applications tracked."
|
|
requires-python = ">=3.14"
|
|
# The boilerplate's core, plus what `desk` and the `ats` plugin import at
|
|
# module level. The package is `app` whatever this distribution is called:
|
|
# the deploy kit assumes it (see deploy/README.md).
|
|
dependencies = [
|
|
"fastapi>=0.110",
|
|
"jinja2>=3.1",
|
|
"pydantic>=2.6",
|
|
"pyyaml>=6.0",
|
|
# The IANA database `zoneinfo` reads, on the one platform that ships no
|
|
# copy of its own. Without it the scheduler's `daily at 06:00` falls back
|
|
# to the machine's zone on Windows.
|
|
"tzdata>=2024.1; sys_platform == 'win32'",
|
|
"uvicorn[standard]>=0.29",
|
|
# `desk.tools.http`, `desk.sources.rss` and every board fetch in `plugins/ats.py`.
|
|
"httpx>=0.27",
|
|
# `desk.sources.rss`, which `desk.sources` imports.
|
|
"feedparser>=6.0",
|
|
# `desk.tools.embedding` and roledesk's own vectors and scores.
|
|
"numpy>=2.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
app = "app.cli:main"
|
|
|
|
[project.optional-dependencies]
|
|
# The fit term of a score. Pulls in torch, so a few hundred megabytes; without
|
|
# it `embed` posts a notice and scores leave fit out. See desk/tools/embedding.py.
|
|
embeddings = ["sentence-transformers>=3.0"]
|
|
# Who answers `extract`: the Claude API with a key, or the Claude Agent SDK
|
|
# driving the `claude` CLI on a subscription. See desk/tools/agent.py. news
|
|
# splits these into `tagging` and `subscription`.
|
|
agent = ["anthropic>=0.40", "claude-agent-sdk>=0.2"]
|
|
# Passkeys and security keys - see `auth/passkeys.py`. Every import of
|
|
# `webauthn` is inside a function.
|
|
passkeys = ["webauthn>=2"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.1.1",
|
|
"ruff>=0.14",
|
|
"mypy>=1.18",
|
|
"types-PyYAML>=6.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["app*", "pipeline*", "auth*", "desk*"]
|
|
# A module folder's tests travel with the folder when it is copied into
|
|
# another project; they have no business in an installed app.
|
|
exclude = ["app.tests*", "pipeline.tests*", "auth.tests*", "desk.tests*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
"app" = ["templates/*.html", "static/*"]
|
|
# `<desk-jobs>` and `<desk-schedules>`, served by the queue's own router.
|
|
"pipeline.web" = ["static/*"]
|
|
# The login page, `passkey.js` and `<auth-account>`, served from auth's routes.
|
|
"auth" = ["templates/*.html", "static/*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
# The app's tests and each copied module's own. `desk` ships none here: its
|
|
# tests stay in news, which is its source of truth.
|
|
testpaths = ["tests", "pipeline/tests", "auth/tests"]
|
|
|
|
# ----------------------------------------------------------------- linting
|
|
|
|
[tool.ruff]
|
|
line-length = 90
|
|
target-version = "py314"
|
|
# The boilerplate's copies. The boilerplate does not run ruff, and a copy is
|
|
# not restyled here: a fix goes upstream first.
|
|
extend-exclude = ["pipeline", "auth", "deploy"]
|
|
|
|
[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 another file; ruff only recognises a
|
|
# pydantic subclass when it sees `BaseModel` in the same file. The desk
|
|
# entries are news's own, travelling with the copy.
|
|
"app/models.py" = ["RUF012"]
|
|
"desk/models.py" = ["RUF012"]
|
|
"desk/sources/spec.py" = ["RUF012"]
|
|
|
|
# ------------------------------------------------------------ type checking
|
|
|
|
[tool.mypy]
|
|
python_version = "3.14"
|
|
files = ["app", "tests"]
|
|
plugins = ["pydantic.mypy"]
|
|
warn_unused_ignores = true
|
|
warn_redundant_casts = true
|
|
warn_unreachable = true
|
|
no_implicit_optional = true
|
|
check_untyped_defs = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
# The copied modules: typed from what they declare, not reported on. Their
|
|
# source of truth checks them, or does not.
|
|
module = ["desk.*", "pipeline.*", "auth.*"]
|
|
follow_imports = "silent"
|
|
|
|
[[tool.mypy.overrides]]
|
|
# Optional extras, only imported inside functions.
|
|
module = ["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"
|