diff --git a/scripts/build_port.py b/scripts/build_port.py index 3488d1135..9895def16 100644 --- a/scripts/build_port.py +++ b/scripts/build_port.py @@ -18,7 +18,7 @@ the applications folder, so its top folder is the application. install.py is copied from the repository root, and only when it is the installer the bootstraps pin, so every launcher runs the same bytes as the one-line command of the same commit. The site builds them at each deploy -and serves them under get/handheld/ (scripts/sitehandheld.py): they are no +and serves them under get/handheld/ (scripts/sitegen/handheld.py): they are no release files, and are written to tmp/handheld/ by default, away from the packs of dist/. Members are written as the packs write theirs: fixed timestamps, sorted names, the executable bit read from the diff --git a/scripts/check_release.py b/scripts/check_release.py index c1e7f04ca..de44f8060 100644 --- a/scripts/check_release.py +++ b/scripts/check_release.py @@ -8,7 +8,7 @@ size the README prints, and nothing else may be attached. The record holds one pack for each platform the registry marks release_pack, and no other pack. The installer, the file lists and the handheld launchers are not release files: a package pins the first two from the tag, and the site -serves the launchers built from its own commit (sitehandheld.py), so a +serves the launchers built from its own commit (sitegen/handheld.py), so a reader of the release page sees the packs and nothing to puzzle over. An upload that failed in the loop, or a part re-uploaded from an older build, otherwise publishes a release that `sha256sum --check` rejects for every user. diff --git a/scripts/model/guides.py b/scripts/model/guides.py index 51b0f5ec9..6992f95c4 100644 --- a/scripts/model/guides.py +++ b/scripts/model/guides.py @@ -407,7 +407,7 @@ def load_guides(path: Path = GUIDES_FILE, registry: dict | None = None) -> dict: _LOADED = load_guides() INSTALL_BASE: str = _LOADED["install_base"] -# The bootstraps the site serves (sitebootstrap.py writes them). +# The bootstraps the site serves (sitegen/bootstrap.py writes them). INSTALL_SH: str = f"{INSTALL_BASE}/{SH_NAME}" INSTALL_PS1: str = f"{INSTALL_BASE}/{PS1_NAME}" # The same installer from PyPI (scripts/build_pypi.py builds the package). diff --git a/scripts/model/systemnames.py b/scripts/model/systemnames.py index 7f4504ea9..a9ff77aca 100644 --- a/scripts/model/systemnames.py +++ b/scripts/model/systemnames.py @@ -56,7 +56,7 @@ def set_console_sections( ) # A reviewed parent under a maker the pages carry is a section even with # no folder of its own: the Atom's sets sit under bios/Arcade, and the - # system pages file them under Acorn (generate_site.arcade_board_sections). + # system pages file them under Acorn (sitegen.systempages.arcade_board_sections). makers = {mfr for mfr, _console in pairs} pairs |= {parent for parent in SYSTEM_PARENTS.values() if parent[0] in makers and parent[0] not in _PROGRAM_TOPS} @@ -161,7 +161,7 @@ def system_name(sys_id: str) -> str: if name is None: raise KeyError( f"system {sys_id!r} has no console section of its own and no " - "entry in siterender.SYSTEM_NAMES" + "entry in model.systemnames.SYSTEM_NAMES" ) return name diff --git a/scripts/sitegen/cards.py b/scripts/sitegen/cards.py index 17c0485f5..0bd39e172 100644 --- a/scripts/sitegen/cards.py +++ b/scripts/sitegen/cards.py @@ -732,7 +732,7 @@ def _card_title(text: str, anchor: str, searchable: bool = True, weight: int = 1 pasted md5 to the top of a page of a hundred cards. Level 3, under the console or the Files heading: a level 4 after a level 2 skipped one for screen readers on 551 pages. The table of contents of a page - of cards stops above it (sitestarlight.py), and a card without an + of cards stops above it (sitegen/starlight.py), and a card without an anchor keeps the id the toc gives it. """ if markup.starlight(): diff --git a/scripts/sitegen/emulatorcards.py b/scripts/sitegen/emulatorcards.py index 0627e47b2..a719e9068 100644 --- a/scripts/sitegen/emulatorcards.py +++ b/scripts/sitegen/emulatorcards.py @@ -346,7 +346,7 @@ class CardLayout: """Where a file card lands. `alias` is a second id the card answers to, `data_href` links the data folder an app reads the entry under, from the page the card lands on. `badges_apart`: the title holds the name alone, - for a table whose Status column shows the badges (siteentries.py).""" + for a table whose Status column shows the badges (sitegen/entries.py).""" alias: str = "" data_href: str = "#data-folder" diff --git a/scripts/sitegen/emulatorpage.py b/scripts/sitegen/emulatorpage.py index a0326ebdf..99f81a721 100644 --- a/scripts/sitegen/emulatorpage.py +++ b/scripts/sitegen/emulatorpage.py @@ -302,7 +302,7 @@ def _data_tree_page(ref: str, entry: dict, pages: list[tuple[str, list[str]]], # written before them. At 400 a part of MAME's cards was 805 KB of HTML. EMULATOR_CARDS_PER_PAGE = 220 # The most cards a part of a split page holds. Each card is a table row -# since siteentries.py, about five elements and 60 bytes more: at 220 a +# since sitegen/entries.py, about five elements and 60 bytes more: at 220 a # part, MAME's first was 612 KB and 9,777 elements. EMULATOR_CARDS_PER_PART = 180 # The words a part's rows may show, every card closed. A count of cards @@ -390,7 +390,7 @@ def emulator_parts(name: str, files: list, profile: dict | None = None, # From this many entries an emulator page lists them as one table, each -# row opening to its card (siteentries.py). Below it the page is one +# row opening to its card (sitegen/entries.py). Below it the page is one # screen of open cards. A summary table above folded cards listed every # file twice: PCSX-ReARMed's seven, once in the table and once in a closed # "7 files" block. A split emulator's card pages always use the table. diff --git a/scripts/sitegen/guides.py b/scripts/sitegen/guides.py index f6659e250..ff10fe18b 100644 --- a/scripts/sitegen/guides.py +++ b/scripts/sitegen/guides.py @@ -39,7 +39,7 @@ def terminal_tabs( the terminal there. Tab labels are shared across the site, so the reader's choice carries from page to page. *how* replaces the shared text of a tab for one setup. *under_steps* and *under_command* add lines to a tab - after its text and after its command (sitesteps.install_box).""" + after its text and after its command (sitegen.steps.install_box).""" items = [] for key in tabs: label, shared, shell = TERMINALS[key] diff --git a/scripts/sitegen/handheld.py b/scripts/sitegen/handheld.py index d54a62e3d..954eb3b00 100644 --- a/scripts/sitegen/handheld.py +++ b/scripts/sitegen/handheld.py @@ -4,7 +4,7 @@ The four archives scripts/build_port.py writes carry install.py pinned by SHA-256, so they change with the installer, not with the BIOS packs. The site builds them from the commit it is built from and serves them under get/handheld/, beside the bootstraps that pin the same installer -(sitebootstrap.py). build_archive refuses an install.py that install.sh +(sitegen/bootstrap.py). build_archive refuses an install.py that install.sh does not pin: a stale pin stops the site build, the last good archives staying served. diff --git a/scripts/sitegen/starlight.py b/scripts/sitegen/starlight.py index 090b51886..1de2b9ce6 100644 --- a/scripts/sitegen/starlight.py +++ b/scripts/sitegen/starlight.py @@ -322,7 +322,7 @@ OG_DIR = REPO_ROOT / "docs_assets" / "og" # An emulator page's card is that of the maker of the first system it runs, # by page path: "emulators/mgba.mdx" -> "nintendo". One card per emulator # would be some 900 images in the repository, and the maker's names the -# consoles. Filled by generate_site.record_emulator_page. +# consoles. Filled by sitegen.structured.record_emulator_page. EMULATOR_CARDS: dict[str, str] = {} @@ -428,7 +428,7 @@ _page_aliases_built = [False] def page_aliases(rel: str) -> list[str]: """The names the platforms file the consoles of a system page under - (psx, dreamcast, gba), from siterender.system_search_aliases(): "psx + (psx, dreamcast, gba), from sitegen.render.system_search_aliases(): "psx bios" finds the PlayStation page though the page never says psx.""" if not _page_aliases_built[0]: from sitegen import render as siterender diff --git a/scripts/sitegen/systempages.py b/scripts/sitegen/systempages.py index a509c0d2e..55341b0b0 100644 --- a/scripts/sitegen/systempages.py +++ b/scripts/sitegen/systempages.py @@ -166,12 +166,12 @@ def arcade_board_sections( The Arcade sections were the folders of bios/Arcade/: NAOMI, PGM and ZN-1 had no section, and their names stayed plain on 568 emulator - pages. Each archive goes to the board siterender.arcade_board() reads + pages. Each archive goes to the board sitegen.render.arcade_board() reads from the profiles, never from its folder, and a folder named after a board (Namco System 246) joins it, whatever maker's folder holds the - copy. A set a reviewed machine owns (siterender.archive_machine) goes + copy. A set a reviewed machine owns (sitegen.render.archive_machine) goes to that machine's section. Files neither claims stay in their - folders. Each board is recorded (siterender.record_board_section) before + folders. Each board is recorded (sitegen.render.record_board_section) before any page links one, and a system's install commands follow its link to the board's section. Call after reset_console_pages().""" from sitegen.render import arcade_boards, record_board_section @@ -535,7 +535,7 @@ def system_pages( systems//# still lands, and site.js sends a card anchor the page no longer holds to the card's new place. The pages each card and console went to are recorded for every other link - (siterender.record_console_pages). An arcade board has a page of its + (sitegen.render.record_console_pages). An arcade board has a page of its own, systems/arcade-/, under a heading of that id. """ maker = _MakerPages(manufacturer, consoles, consumers, installs or {}, budget) diff --git a/tests/test_site_system_names.py b/tests/test_site_system_names.py index 92b1bfbcd..79369ad43 100644 --- a/tests/test_site_system_names.py +++ b/tests/test_site_system_names.py @@ -69,7 +69,7 @@ class SystemNames(unittest.TestCase): unnamed.append(sys_id) continue self.assertTrue(name.strip(), sys_id) - self.assertEqual(unnamed, [], "add these to siterender.SYSTEM_NAMES") + self.assertEqual(unnamed, [], "add these to model.systemnames.SYSTEM_NAMES") def test_no_name_is_a_manufacturer_page_or_an_emulator(self) -> None: taken = {name.casefold() for name in self.manufacturers}