Skeleton: roledesk on desk and pipeline from ../news
Package layers models, config, storage, jobs, web, cli, held by tests/test_architecture.py with desk and pipeline as external trees and plugins/ limited to desk. roles.yaml is the default config, roledesk.db its own file, port 8790. create_app mounts pipeline.web.connect over Jobs(config.database); `roledesk job pull` drains a no-op pull and `roledesk db init` creates the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
36dbcbb29e
20 files changed
+2320
No files matched your search
@@ -0,0 +1,90 @@
|
||||
[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",
|
||||
"pydantic>=2.6",
|
||||
"pyyaml>=6.0",
|
||||
"uvicorn[standard]>=0.29",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
roledesk = "roledesk.cli:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=68"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["roledesk*"]
|
||||
|
||||
[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.
|
||||
"roledesk/models.py" = ["RUF012"]
|
||||
|
||||
# ------------------------------------------------------------ type checking
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.14"
|
||||
files = ["roledesk", "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"]
|
||||
Reference in new issue
Block a user