mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: move recipes and acquisition to packages
This commit is contained in:
1 parent
664776ae91
commit
0e4e5f450d
35 files changed
+2186
-2071
No files matched your search
@@ -11,7 +11,7 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
import archive_build
|
||||
from recipes import ledger
|
||||
import release_record
|
||||
from model import siteinputs
|
||||
from model.collection import _group_by_manufacturer, _slug
|
||||
@@ -24,7 +24,7 @@ from model.registry import list_registered_platforms
|
||||
from model.safeparse import yaml_load
|
||||
from model.systemnames import program_names, set_console_sections, system_name
|
||||
from packs.crossref import FileConsumers
|
||||
from provenance_report import build_report, profile_needs
|
||||
from acquire.provenance import build_report, profile_needs
|
||||
from resolve.cores import resolve_platform_cores
|
||||
from resolve.review import load_platform_hashes, load_profile_hashes
|
||||
from sitegen import (
|
||||
@@ -492,7 +492,7 @@ def _write_gap_pages(run: _SiteRun, provenance_report: dict) -> None:
|
||||
print("Generating the wanted page...")
|
||||
wanted = sitewanted.build_wanted(
|
||||
profiles, coverages, run.gap_report, db, placer, system_name,
|
||||
sitewanted.load_ledger(archive_build.ARCHIVES_FILE),
|
||||
sitewanted.load_ledger(ledger.ARCHIVES_FILE),
|
||||
_wanted_link(profiles),
|
||||
)
|
||||
(public / "data").mkdir(parents=True, exist_ok=True)
|
||||
@@ -547,7 +547,7 @@ def _write_wiki_pages(run: _SiteRun, measured: sitemeasurements.Built) -> None:
|
||||
recipes_page = _REPO_ROOT / ARCHIVE_RECIPES_PAGE
|
||||
if recipes_page.is_file():
|
||||
write_if_changed(str(recipes_page), with_archive_counts(
|
||||
recipes_page.read_text(encoding="utf-8"), archive_build.rebuild_counts()))
|
||||
recipes_page.read_text(encoding="utf-8"), ledger.rebuild_counts()))
|
||||
if wiki_src.is_dir():
|
||||
for src_file in wiki_src.glob("*.md"):
|
||||
shutil.copy2(src_file, wiki_dest / src_file.name)
|
||||
|
||||
@@ -19,7 +19,7 @@ from core.artifacts import json_text as _json_text
|
||||
from model import retired as model_retired
|
||||
from model.dumpcatalog import load_provenance_snapshots
|
||||
from packs.crossref import FileConsumers
|
||||
from provenance_report import build_report
|
||||
from acquire.provenance import build_report
|
||||
from sitegen.apiitems import _sha1_by_path, core_index_items, system_index_items
|
||||
from sitegen.config import DATA_LICENSE, REPO_URL, _REPO_ROOT, _timestamp
|
||||
from sitegen.install import _release_pack_platforms
|
||||
|
||||
@@ -7,7 +7,7 @@ import json
|
||||
from datetime import datetime
|
||||
|
||||
from model.composition import compute_composition, count_catalog_matched
|
||||
from provenance_report import distinct_missing
|
||||
from acquire.provenance import distinct_missing
|
||||
from sitegen import entries as siteentries, markup
|
||||
from sitegen.cards import _PROVENANCE_LABELS, _ROMSET_SOURCES
|
||||
from sitegen.config import _date_line
|
||||
|
||||
@@ -11,7 +11,7 @@ from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
|
||||
import archive_build
|
||||
from recipes import ledger
|
||||
import pr_checks
|
||||
import release_record
|
||||
from core.artifacts import write_if_changed
|
||||
@@ -728,7 +728,7 @@ def generate_readme(db: dict, platforms_dir: str, db_path: str = "database.json"
|
||||
" the file name for RetroArch, as their own code does",
|
||||
f"- **{len(system_ids)} systems**, {total_files:,} files in the collection,"
|
||||
f" [what is still missing]({SITE_URL}gaps/) named file by file",
|
||||
archive_line(archive_build.rebuild_counts()),
|
||||
archive_line(ledger.rebuild_counts()),
|
||||
f"- Public data: [JSON, CSV and SQLite]({SITE_URL}data/), the metadata under MIT",
|
||||
"",
|
||||
"<details>",
|
||||
|
||||
@@ -21,7 +21,7 @@ import urllib.parse
|
||||
from collections.abc import Callable, Iterable
|
||||
from pathlib import Path
|
||||
|
||||
import archive_build
|
||||
from recipes import ledger as recipes_ledger
|
||||
from resolve.layout import runs_standalone
|
||||
from model.profiles import unique_emulator_profiles
|
||||
from packs.crossref import _first_hash
|
||||
@@ -523,7 +523,7 @@ def _merge_named(records: dict[tuple, dict]) -> None:
|
||||
|
||||
def load_ledger(path: Path) -> list[dict]:
|
||||
"""The archive records of recipes/archives.json, empty when absent."""
|
||||
return list(archive_build.load_ledger(path).values())
|
||||
return list(recipes_ledger.load_ledger(path).values())
|
||||
|
||||
|
||||
def page(total: int, known: int) -> str:
|
||||
|
||||
Reference in new issue
Block a user