Merge seasons-ship-3 into nav-and-filters: the seasons ship and the places ship touched the same trail files; both sides kept
This commit is contained in:
commit
fd2e6fc6c7
122 files changed
+7437
-211
No files matched your search
@@ -5,11 +5,13 @@
|
||||
[[list]] which lists the home page shows, and in what order (olt/home.py)
|
||||
authors.toml [[author]] route authors, and the words about the people among them (olt/authors.py)
|
||||
places.toml [[place]] the parks, mountain ranges and wilderness areas records name
|
||||
tools/season_blind_test.json how the judged seasons did against the seasons pages state (olt/reference.py)
|
||||
|
||||
Each is checked by tools/validate.py and described in docs/schema.md. Like left-out.toml, a file
|
||||
is looked for in the repository being built and then in this one, so a test repository without
|
||||
one still builds.
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import tomllib
|
||||
|
||||
@@ -46,3 +48,14 @@ def places(repo_root):
|
||||
def lists(repo_root):
|
||||
"""The [[list]] entries of collections.toml: a list's key, and `home`, its place in the home page's row."""
|
||||
return load(repo_root, "collections.toml", "list")
|
||||
|
||||
|
||||
def blind_test(repo_root):
|
||||
"""The blind test of the judged seasons (tools/season_blind_test.json, written by
|
||||
tools/season_judge.py score), or None when there is none."""
|
||||
for base in (repo_root, REAL_ROOT):
|
||||
path = os.path.join(base or REAL_ROOT, "tools", "season_blind_test.json")
|
||||
if os.path.isfile(path):
|
||||
with open(path, encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
return None
|
||||
Reference in new issue
Block a user