mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
docs: say what catalog.json lists
index.json called the catalog every published file, while the one-item documents of emulators/, platforms/, systems/ and lookup/ are in none of its items. The description and the data page now say so.
This commit is contained in:
1 parent
225cdaff22
commit
00aac8dc72
2 files changed
+24
-1
No files matched your search
@@ -1804,7 +1804,9 @@ def generate_data_exports(
|
||||
# entry point is a document of its own, naming where to start.
|
||||
entry_points = [
|
||||
{"title": "Catalog", "url": "catalog.json",
|
||||
"description": "Every published file with its size, SHA256 and schema."},
|
||||
"description": "Each dataset, manifest, export and download with its size, "
|
||||
"SHA256 and schema. The one-item documents of emulators/, "
|
||||
"platforms/, systems/ and lookup/ are not listed."},
|
||||
{"title": "System ids", "url": "systems.json",
|
||||
"description": "Each system id with its name and the section holding its files."},
|
||||
{"title": "Core names", "url": "cores.json",
|
||||
@@ -2204,6 +2206,9 @@ def generate_data_page(exports: list[dict], measurements_sqlite: Path | None = N
|
||||
"when one is known, the `system_name` the site gives its system. "
|
||||
"[Find or check a file](files/index.md) reads it.",
|
||||
"",
|
||||
"`catalog.json` lists the datasets, manifests, exports and downloads. It "
|
||||
"does not list these one-item documents, which hold no SHA256 of their own.",
|
||||
"",
|
||||
"In a browser, the SHA1 of a file the reader picks finds its records when "
|
||||
"the collection holds that file. A list naming a file the collection lacks "
|
||||
"is filed under its MD5 or CRC32 alone, and Web Crypto has no MD5: "
|
||||
|
||||
@@ -649,6 +649,24 @@ class TheContractsValidate(unittest.TestCase):
|
||||
[e.message for e in envelope.iter_errors(json.loads((API / name).read_text()))], [])
|
||||
|
||||
|
||||
class TheIndexSaysWhatTheCatalogLists(unittest.TestCase):
|
||||
"""index.json called catalog.json every published file, while the 990
|
||||
one-item documents of emulators/, platforms/, systems/ and lookup/ are
|
||||
in none of its 80 items."""
|
||||
|
||||
def test_the_description_matches_the_items(self):
|
||||
index = json.loads(_built(API / "index.json").read_text())
|
||||
catalog = json.loads(_built(API / "catalog.json").read_text())
|
||||
described = next(i["description"] for i in index["items"] if i["url"] == "catalog.json")
|
||||
self.assertNotIn("Every published file", described)
|
||||
listed = {item["url"].split("/", 1)[0] for item in catalog["items"]}
|
||||
for folder in ("emulators", "platforms", "systems", "lookup"):
|
||||
with self.subTest(folder=folder):
|
||||
self.assertIn(f"{folder}/", described)
|
||||
self.assertNotIn(folder, listed)
|
||||
self.assertTrue(any((API / folder).glob("*.json")))
|
||||
|
||||
|
||||
class EveryEnvelopeCarriesTheCommit(unittest.TestCase):
|
||||
"""8.5: emulators/ and systems/ lacked `commit` (716 documents)."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user