mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-23 10:07:48 -06:00
refactor: move upstream, sourceref, version_basis
upstream reads forges with the standard library alone and scrapers, packs and the site read it: it goes to core. sourceref is the grammar of a profile field, which the site parses without the comparison tool: it goes to model. version_basis is read by profile_sync alone and opens the profiling package.
This commit is contained in:
1 parent
8cdda10393
commit
e1f2f8685d
29 files changed
+51
-49
No files matched your search
@@ -52,7 +52,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
import export_native
|
||||
import pin_installer
|
||||
import refresh_data_dirs
|
||||
import upstream
|
||||
from core import upstream
|
||||
from core.cli import InputMissing, require_directory, suggest_names
|
||||
from model.targets import apply_target_overrides
|
||||
from model.registry import list_registered_platforms, load_platform_registry
|
||||
|
||||
File renamed without changes.
@@ -24,7 +24,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
from core.cli import require_directory, suggest_names
|
||||
from profile_sync import collect_citations, ref_role, select_views, split_source_ref
|
||||
from model.safeparse import yaml_load
|
||||
|
||||
@@ -21,7 +21,7 @@ import urllib.parse
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
import upstream
|
||||
from core import upstream
|
||||
|
||||
# Commits listed per page and the most pages walked: a data file older than
|
||||
# 2 000 commits on its own path is not one a platform list still pins.
|
||||
|
||||
@@ -26,7 +26,7 @@ from dataclasses import dataclass
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
from core.cli import require_directory
|
||||
from model.safeparse import yaml_load
|
||||
from scraper.mame_parser import _MACHINE_MACROS, strip_comments
|
||||
|
||||
File renamed without changes.
@@ -32,8 +32,8 @@ import yaml
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
|
||||
import upstream
|
||||
import version_basis
|
||||
from core import upstream
|
||||
from profiling import version_basis
|
||||
from model.systems import _norm_system_id, system_index
|
||||
from core.github import github_token
|
||||
from model.registry import list_registered_platforms
|
||||
@@ -42,7 +42,7 @@ from model.platforms import load_platform_config
|
||||
from resolve.cores import resolve_platform_cores
|
||||
from core.cli import suggest_names
|
||||
from core.hashing import parse_hash_list
|
||||
from sourceref import ( # re-exported for callers and tests
|
||||
from model.sourceref import (
|
||||
_ANNOTATION_RE as _ANNOTATION_RE,
|
||||
_BARE_RANGE_RE as _BARE_RANGE_RE,
|
||||
_LOCATED_RE as _LOCATED_RE,
|
||||
@@ -73,7 +73,7 @@ from sourceref import ( # re-exported for callers and tests
|
||||
split_outside_parentheses as split_outside_parentheses,
|
||||
split_source_ref as split_source_ref,
|
||||
)
|
||||
from upstream import CompareResult, find_renamed
|
||||
from core.upstream import CompareResult, find_renamed
|
||||
|
||||
DEFAULT_CACHE = upstream.CACHE_DIR
|
||||
ANON_QUOTA = 60
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"""Emulator profiles confronted with their upstream source: citations, anchoring, reports and guarded profile writes."""
|
||||
@@ -32,7 +32,7 @@ import re
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
|
||||
KINDS = ("file", "tag", "alias", "package", "none", "unverified")
|
||||
# Values copied from a .info or a branch name, which name no version.
|
||||
@@ -31,7 +31,7 @@ from model.profiles import source_yaml_paths
|
||||
from core.artifacts import write_text_atomic
|
||||
from model.safeparse import yaml_load
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
|
||||
from ._hash_merge import (
|
||||
_build_contents,
|
||||
|
||||
@@ -23,7 +23,7 @@ from pathlib import Path
|
||||
if (_SCRIPTS_DIR := str(Path(__file__).resolve().parents[2])) not in sys.path:
|
||||
sys.path.insert(0, _SCRIPTS_DIR)
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
from model.safeparse import yaml_load
|
||||
|
||||
CACHE_DIR = upstream.CACHE_DIR
|
||||
|
||||
@@ -14,7 +14,7 @@ from pathlib import Path
|
||||
import yaml
|
||||
|
||||
from . import Fetcher, SourceError, load_sources, scrape_setup
|
||||
from upstream import UpstreamError
|
||||
from core.upstream import UpstreamError
|
||||
from core.artifacts import write_text_atomic
|
||||
from ..base_scraper import _PlatformDumper
|
||||
|
||||
|
||||
@@ -15,10 +15,14 @@ from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
import upstream
|
||||
from core import upstream
|
||||
from siterender import _by_mode, _escape_tags
|
||||
from sourceref import (
|
||||
_HEX_ADDRESS_RE, _prose_runs, is_binary_citation, ref_annotation, ref_role,
|
||||
from model.sourceref import (
|
||||
_HEX_ADDRESS_RE,
|
||||
_prose_runs,
|
||||
is_binary_citation,
|
||||
ref_annotation,
|
||||
ref_role,
|
||||
source_ref_values,
|
||||
split_source_ref,
|
||||
)
|
||||
|
||||
@@ -261,7 +261,7 @@ def _ref_cites_code(ref: str) -> bool:
|
||||
IL method says only that the binary exists: "import directory",
|
||||
"string table" and "readelf -d" are not the code that reads a file.
|
||||
"""
|
||||
from sourceref import split_source_ref
|
||||
from model.sourceref import split_source_ref
|
||||
|
||||
cited = False
|
||||
for part in split_source_ref(ref):
|
||||
|
||||
Reference in new issue
Block a user