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>
This commit is contained in:
1 parent
73dec9028e
commit
9f526356c0
7 files changed
+849
-55
No files matched your search
@@ -16,7 +16,9 @@ from typing import Any, Protocol
|
||||
|
||||
import httpx
|
||||
|
||||
#: What every parser turns a feed into: one dict per row, with the keys
|
||||
#: What an undeclared module's parser turns a feed into; a module that
|
||||
#: declares `READS` returns `_contract.Row`, which adds `places` and `teaser`.
|
||||
#: One dict per row, with the keys
|
||||
#: `source_id`, `title`, `location`, `url`, `posted`, `department`,
|
||||
#: `description`, `remote` and `salary_text`, and, where a host states pay,
|
||||
#: `salary_min`, `salary_max` and `currency`.
|
||||
|
||||
Reference in new issue
Block a user