Files
jobboard/pyproject.toml
WolfandClaude Opus 5.5 9f526356c0 Reader contract: READS declaration, Ask, Row with places and teaser, conformance test
plugins/readers/_contract.py holds Reads, Filters, Fields, Key, Ask, Place and
Row, and problems(), which checks a module's READS against its functions and
signatures. The package loader runs it for modules that declare READS and
lists the others with undeclared(); READERS holds every module, HOSTS the
boards and the undeclared, PROVIDERS the searches. The package docstring
documents the traits, Ask, facets, places, teaser and the robots.txt rule.

tests/test_readers_contract.py runs over every reader: READS declared (xfail
per module in UNDECLARED), declaration against functions, places="many"
and teaser fixtures, plus unit tests of the check with fake modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 08:55:47 +02:00

130 lines
4.7 KiB
TOML

[project]
name = "roledesk"
version = "0.1.0"
description = "A job-search engine: ATS boards in, roles scored per search agent, applications tracked."
readme = "README.md"
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"]
"plugins/readers/_contract.py" = ["RUF012"]
# The boilerplate's own test, adapted here but kept in its style.
"tests/test_coupling.py" = ["SIM102"]
# ------------------------------------------------------------ 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"