Rebuild pyproject on the boilerplate's, with no dependency on news
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>
This commit is contained in:
1 parent
7a63311714
commit
0627b74f03
2 files changed
+1103
-357
No files matched your search
+61
-27
@@ -1,31 +1,43 @@
|
||||
[project]
|
||||
name = "roledesk"
|
||||
version = "0.1.0"
|
||||
description = "A job-search engine on the desk plugin contract and the pipeline queue."
|
||||
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 = [
|
||||
# `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",
|
||||
# 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"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=68"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["app*"]
|
||||
|
||||
[tool.uv.sources]
|
||||
newsdesk = { path = "../news", editable = true }
|
||||
[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 = [
|
||||
@@ -35,11 +47,36 @@ dev = [
|
||||
"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,
|
||||
@@ -52,9 +89,12 @@ ignore = [
|
||||
]
|
||||
|
||||
[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.
|
||||
# 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
|
||||
|
||||
@@ -62,10 +102,6 @@ ignore = [
|
||||
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
|
||||
@@ -73,19 +109,17 @@ no_implicit_optional = true
|
||||
check_untyped_defs = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["desk.*", "pipeline.*", "newsdesk.*"]
|
||||
# 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 of the news repo, only imported inside functions there.
|
||||
module = ["sklearn.*", "trafilatura.*", "feedparser.*", "anthropic.*",
|
||||
"claude_agent_sdk.*", "sentence_transformers.*", "webauthn.*",
|
||||
"cbor2.*"]
|
||||
# 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"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
Reference in new issue
Block a user