From 279da556530e9a42b0fd2af63784bd5613f72e87 Mon Sep 17 00:00:00 2001 From: Amit Salunke Date: Tue, 8 Sep 2026 18:29:34 +0530 Subject: [PATCH] Initial commit --- .gitignore | 12 + .vscode/settings.json | 6 + README.md | 145 ++++++ acupedia_ops/__init__.py | 2 + acupedia_ops/ansible/__init__.py | 0 acupedia_ops/ansible/runner.py | 14 + acupedia_ops/bootstrap/__init__.py | 13 + acupedia_ops/bootstrap/api_cli.py | 109 +++++ acupedia_ops/cli.py | 424 ++++++++++++++++++ acupedia_ops/common/__init__.py | 0 acupedia_ops/common/config.py | 20 + acupedia_ops/common/env.py | 83 ++++ acupedia_ops/common/logging.py | 4 + acupedia_ops/common/paths.py | 7 + acupedia_ops/common/process.py | 85 ++++ acupedia_ops/common/workspace_paths.py | 107 +++++ acupedia_ops/data/__init__.py | 0 acupedia_ops/data/content/__init__.py | 0 .../data/content/normalize_content.py | 2 + acupedia_ops/data/content/sanitize_json.py | 2 + .../data/content/validate_content_refs.py | 2 + acupedia_ops/data/image/__init__.py | 1 + .../data/image/clean_image_borders.py | 133 ++++++ acupedia_ops/data/image/normalize_images.py | 2 + acupedia_ops/data/image/resize_images.py | 2 + acupedia_ops/data/templates/__init__.py | 0 .../data/templates/add_display_order.py | 2 + .../data/templates/validate_templates.py | 2 + acupedia_ops/deployment/__init__.py | 0 acupedia_ops/deployment/backend.py | 5 + acupedia_ops/deployment/database.py | 5 + acupedia_ops/deployment/gitea_runner.py | 85 ++++ acupedia_ops/deployment/infra.py | 5 + acupedia_ops/deployment/mobile.py | 2 + acupedia_ops/local/__init__.py | 3 + acupedia_ops/local/bootstrap.py | 101 +++++ acupedia_ops/local/database.py | 55 +++ acupedia_ops/local/git_status.py | 53 +++ acupedia_ops/local/infrastructure.py | 103 +++++ acupedia_ops/local/services.py | 38 ++ acupedia_ops/local/validation.py | 102 +++++ acupedia_ops/local/workspace.py | 237 ++++++++++ ansible/ansible.cfg | 4 + ansible/inventories/dev/hosts.yml | 5 + ansible/inventories/gitea-runners.example.yml | 22 + ansible/inventories/prod/hosts.yml | 5 + ansible/inventories/staging/hosts.yml | 5 + ansible/playbooks/backend.yml | 7 + ansible/playbooks/database.yml | 7 + ansible/playbooks/gitea-runner-remove.yml | 9 + ansible/playbooks/gitea-runner.yml | 6 + ansible/playbooks/infra.yml | 7 + ansible/roles/.gitkeep | 0 ansible/roles/gitea_runner/defaults/main.yml | 35 ++ ansible/roles/gitea_runner/handlers/main.yml | 7 + ansible/roles/gitea_runner/tasks/main.yml | 132 ++++++ ansible/roles/gitea_runner/tasks/remove.yml | 33 ++ .../gitea_runner/templates/config.yaml.j2 | 31 ++ .../templates/gitea-act-runner.service.j2 | 21 + config/dev.yaml | 6 + config/local.yaml | 84 ++++ config/prod.yaml | 6 + config/staging.yaml | 6 + docker-compose.dev.yml | 49 ++ docker-compose.local.yml | 49 ++ docker-compose.prod.yml | 49 ++ docs/gitea-runner-lifecycle.md | 72 +++ docs/local-development.md | 196 ++++++++ pyproject.toml | 30 ++ requirements.txt | 3 + tests/__init__.py | 0 tests/bootstrap/__init__.py | 0 tests/bootstrap/test_api_cli.py | 22 + tests/common/__init__.py | 0 tests/common/test_config.py | 12 + tests/common/test_workspace_paths.py | 49 ++ tests/data/image/test_clean_image_borders.py | 11 + tests/deployment/__init__.py | 0 tests/deployment/test_gitea_runner.py | 8 + tests/local/__init__.py | 0 tests/local/test_bootstrap_args.py | 49 ++ tests/local/test_env.py | 16 + tests/local/test_workspace.py | 101 +++++ uv.lock | 387 ++++++++++++++++ 84 files changed, 3514 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 README.md create mode 100644 acupedia_ops/__init__.py create mode 100644 acupedia_ops/ansible/__init__.py create mode 100644 acupedia_ops/ansible/runner.py create mode 100644 acupedia_ops/bootstrap/__init__.py create mode 100644 acupedia_ops/bootstrap/api_cli.py create mode 100644 acupedia_ops/cli.py create mode 100644 acupedia_ops/common/__init__.py create mode 100644 acupedia_ops/common/config.py create mode 100644 acupedia_ops/common/env.py create mode 100644 acupedia_ops/common/logging.py create mode 100644 acupedia_ops/common/paths.py create mode 100644 acupedia_ops/common/process.py create mode 100644 acupedia_ops/common/workspace_paths.py create mode 100644 acupedia_ops/data/__init__.py create mode 100644 acupedia_ops/data/content/__init__.py create mode 100644 acupedia_ops/data/content/normalize_content.py create mode 100644 acupedia_ops/data/content/sanitize_json.py create mode 100644 acupedia_ops/data/content/validate_content_refs.py create mode 100644 acupedia_ops/data/image/__init__.py create mode 100644 acupedia_ops/data/image/clean_image_borders.py create mode 100644 acupedia_ops/data/image/normalize_images.py create mode 100644 acupedia_ops/data/image/resize_images.py create mode 100644 acupedia_ops/data/templates/__init__.py create mode 100644 acupedia_ops/data/templates/add_display_order.py create mode 100644 acupedia_ops/data/templates/validate_templates.py create mode 100644 acupedia_ops/deployment/__init__.py create mode 100644 acupedia_ops/deployment/backend.py create mode 100644 acupedia_ops/deployment/database.py create mode 100644 acupedia_ops/deployment/gitea_runner.py create mode 100644 acupedia_ops/deployment/infra.py create mode 100644 acupedia_ops/deployment/mobile.py create mode 100644 acupedia_ops/local/__init__.py create mode 100644 acupedia_ops/local/bootstrap.py create mode 100644 acupedia_ops/local/database.py create mode 100644 acupedia_ops/local/git_status.py create mode 100644 acupedia_ops/local/infrastructure.py create mode 100644 acupedia_ops/local/services.py create mode 100644 acupedia_ops/local/validation.py create mode 100644 acupedia_ops/local/workspace.py create mode 100644 ansible/ansible.cfg create mode 100644 ansible/inventories/dev/hosts.yml create mode 100644 ansible/inventories/gitea-runners.example.yml create mode 100644 ansible/inventories/prod/hosts.yml create mode 100644 ansible/inventories/staging/hosts.yml create mode 100644 ansible/playbooks/backend.yml create mode 100644 ansible/playbooks/database.yml create mode 100644 ansible/playbooks/gitea-runner-remove.yml create mode 100644 ansible/playbooks/gitea-runner.yml create mode 100644 ansible/playbooks/infra.yml create mode 100644 ansible/roles/.gitkeep create mode 100644 ansible/roles/gitea_runner/defaults/main.yml create mode 100644 ansible/roles/gitea_runner/handlers/main.yml create mode 100644 ansible/roles/gitea_runner/tasks/main.yml create mode 100644 ansible/roles/gitea_runner/tasks/remove.yml create mode 100644 ansible/roles/gitea_runner/templates/config.yaml.j2 create mode 100644 ansible/roles/gitea_runner/templates/gitea-act-runner.service.j2 create mode 100644 config/dev.yaml create mode 100644 config/local.yaml create mode 100644 config/prod.yaml create mode 100644 config/staging.yaml create mode 100644 docker-compose.dev.yml create mode 100644 docker-compose.local.yml create mode 100644 docker-compose.prod.yml create mode 100644 docs/gitea-runner-lifecycle.md create mode 100644 docs/local-development.md create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 tests/__init__.py create mode 100644 tests/bootstrap/__init__.py create mode 100644 tests/bootstrap/test_api_cli.py create mode 100644 tests/common/__init__.py create mode 100644 tests/common/test_config.py create mode 100644 tests/common/test_workspace_paths.py create mode 100644 tests/data/image/test_clean_image_borders.py create mode 100644 tests/deployment/__init__.py create mode 100644 tests/deployment/test_gitea_runner.py create mode 100644 tests/local/__init__.py create mode 100644 tests/local/test_bootstrap_args.py create mode 100644 tests/local/test_env.py create mode 100644 tests/local/test_workspace.py create mode 100644 uv.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c992da6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +.venv/ +__pycache__/ +*.py[cod] +.pytest_cache/ +.env +.env.* +!.env.example +output/ +tmp/ +*.log +*.pyc +.local/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2f8c01e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cSpell.words": [ + "ACUPEDIA", + "gitea" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1205dc1 --- /dev/null +++ b/README.md @@ -0,0 +1,145 @@ +# acupedia-ops + +Operational tooling for AccuPedia. + +The repository owns: + +- reusable content/data preprocessing; +- local development orchestration; +- backend bootstrap invocation through a CLI boundary; +- remote deployment orchestration; +- Gitea Actions runner lifecycle; +- Ansible playbooks/roles; +- operational validation and shared utilities. + +It does not own application business logic and does not import `app.*` from +`acupedia-api`. + +## Installation + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -e . +``` + +For Ansible/deployment support: + +```bash +pip install -e ".[deployment]" +``` + +Development: + +```bash +pip install -e ".[dev]" +``` + + +## Workspace base path + +Local repositories can be configured relative to one canonical workspace root: + +```dotenv +ACUPEDIA_WORKSPACE_BASE_PATH=/home/amit/Work/Project/acupedia +ACUPEDIA_API_PATH=acupedia-api +ACUPEDIA_MOBILE_PATH=acupedia-mobile-ui +ACUPEDIA_WEB_PORTAL_PATH=acupedia-web-portal +ACUPEDIA_ADMIN_PORTAL_PATH=acupedia-admin-portal +ACUPEDIA_CONTENT_PATH=acupedia-content +ACUPEDIA_OPS_PATH=acupedia-ops +``` + +Relative paths are always resolved against `ACUPEDIA_WORKSPACE_BASE_PATH`, +never against the current working directory. Absolute component paths remain +supported. + +## Local workspace + +```bash +cp .env.example .env +acupedia-ops local validate +acupedia-ops local setup +``` + +Typical local flow: + +```bash +acupedia-ops local infra-up +acupedia-ops local bootstrap content --publish-content +``` + +Then, in separate terminals: + +```bash +acupedia-ops local run api +acupedia-ops local run mobile +``` + +For complete documentation see: + +- `docs/local-development.md` +- `docs/gitea-runner-lifecycle.md` + +## Local commands + +```text +acupedia-ops local validate +acupedia-ops local setup [--install] +acupedia-ops local status [--json] +acupedia-ops local run api|mobile|web|admin + +acupedia-ops local infra-up +acupedia-ops local infra-down +acupedia-ops local infra-restart +acupedia-ops local infra-status +acupedia-ops local logs + +acupedia-ops local bootstrap [auth|content|media|commerce|all|validate] +acupedia-ops local reset-db [--execute] +``` + +## Backend bootstrap boundary + +The bootstrap implementation remains in `acupedia-api`. `acupedia-ops` resolves +and invokes the backend-owned `acupedia-bootstrap` executable instead of +importing backend Python internals. + +Direct usage is also available: + +```bash +acupedia-ops bootstrap content \ + --api-root ../acupedia-api \ + -- \ + --config ../acupedia-content/config.json \ + --modules-root ../acupedia-content +``` + +## Image preprocessing + +```bash +acupedia-ops image clean-border input.jpg output.jpg +``` + +Directory and ZIP processing remain supported. + +## Gitea runner lifecycle + +```bash +export GITEA_RUNNER_REGISTRATION_TOKEN='...' + +acupedia-ops runner provision \ + --inventory ansible/inventories/gitea-runners.yml +``` + +See `docs/gitea-runner-lifecycle.md`. + +## Remote deployment + +```bash +acupedia-ops deploy backend --env dev +acupedia-ops deploy database --env dev +``` + +Local development deliberately uses native dev processes and Docker Compose. +Ansible remains the remote deployment/configuration mechanism. diff --git a/acupedia_ops/__init__.py b/acupedia_ops/__init__.py new file mode 100644 index 0000000..6675d78 --- /dev/null +++ b/acupedia_ops/__init__.py @@ -0,0 +1,2 @@ +"""AccuPedia operational tooling.""" +__version__ = "0.1.0" diff --git a/acupedia_ops/ansible/__init__.py b/acupedia_ops/ansible/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/ansible/runner.py b/acupedia_ops/ansible/runner.py new file mode 100644 index 0000000..24c00e4 --- /dev/null +++ b/acupedia_ops/ansible/runner.py @@ -0,0 +1,14 @@ +from __future__ import annotations +from typing import Any +from acupedia_ops.common.paths import ansible_root + +def run_playbook(*, playbook: str, inventory: str, extra_vars: dict[str, Any] | None = None) -> None: + try: + import ansible_runner + except ImportError as exc: + raise RuntimeError('Install deployment support with: pip install -e ".[deployment]"') from exc + root = ansible_root(); inventory_path = root / "inventories" / inventory; playbook_path = root / "playbooks" / playbook + if not inventory_path.exists(): raise FileNotFoundError(f"Inventory not found: {inventory_path}") + if not playbook_path.exists(): raise FileNotFoundError(f"Playbook not found: {playbook_path}") + result = ansible_runner.run(private_data_dir=str(root), inventory=str(inventory_path), playbook=str(playbook_path), extravars=extra_vars or {}) + if result.rc != 0: raise RuntimeError(f"Ansible playbook failed with exit code {result.rc}: {playbook_path}") diff --git a/acupedia_ops/bootstrap/__init__.py b/acupedia_ops/bootstrap/__init__.py new file mode 100644 index 0000000..b557edc --- /dev/null +++ b/acupedia_ops/bootstrap/__init__.py @@ -0,0 +1,13 @@ +from acupedia_ops.bootstrap.api_cli import ( + VALID_TARGETS, + resolve_api_root, + resolve_bootstrap_command, + run_api_bootstrap, +) + +__all__ = [ + "VALID_TARGETS", + "resolve_api_root", + "resolve_bootstrap_command", + "run_api_bootstrap", +] diff --git a/acupedia_ops/bootstrap/api_cli.py b/acupedia_ops/bootstrap/api_cli.py new file mode 100644 index 0000000..19a043c --- /dev/null +++ b/acupedia_ops/bootstrap/api_cli.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +import os +import shutil +from pathlib import Path +from typing import Mapping, Sequence + +from acupedia_ops.common.process import run_command +from acupedia_ops.common.workspace_paths import ( + resolve_command, + resolve_workspace_path, + workspace_base_path, +) + + +VALID_TARGETS = {"auth", "content", "media", "commerce", "all", "validate"} + + +def resolve_api_root(api_root: Path | None = None) -> Path: + base = workspace_base_path(required=False) + + if api_root is not None: + root = resolve_workspace_path( + api_root, + base_path=base, + ) if not Path(api_root).expanduser().is_absolute() else Path(api_root).expanduser().resolve() + else: + raw = os.environ.get("ACUPEDIA_API_PATH", "").strip() + if not raw: + raise RuntimeError( + "AccuPedia API path is required. Supply --api-root or set " + "ACUPEDIA_API_PATH." + ) + root = resolve_workspace_path(raw, base_path=base) + + if not root.is_dir(): + raise FileNotFoundError(f"AccuPedia API repository not found: {root}") + + if not (root / "app").is_dir(): + raise ValueError(f"Invalid AccuPedia API repository; missing: {root / 'app'}") + + if not (root / "pyproject.toml").is_file(): + raise ValueError( + f"Invalid AccuPedia API repository; missing: {root / 'pyproject.toml'}" + ) + + return root + + +def resolve_bootstrap_command(api_root: Path) -> list[str]: + """Resolve the backend-owned acupedia-bootstrap executable. + + Preference: + 1. ACUPEDIA_API_BOOTSTRAP_COMMAND + 2. API repo .venv script + 3. globally available acupedia-bootstrap + 4. `uv run acupedia-bootstrap` from the API repo + """ + configured = os.environ.get("ACUPEDIA_API_BOOTSTRAP_COMMAND", "").strip() + if configured: + return resolve_command( + configured, + base_path=workspace_base_path(required=False), + ) + + local_script = api_root / ".venv" / "bin" / "acupedia-bootstrap" + if local_script.is_file() and os.access(local_script, os.X_OK): + return [str(local_script)] + + global_script = shutil.which("acupedia-bootstrap") + if global_script: + return [global_script] + + if shutil.which("uv"): + return ["uv", "run", "acupedia-bootstrap"] + + raise RuntimeError( + "Unable to locate the acupedia-api bootstrap CLI. " + "Create the API virtual environment/install the project, install uv, " + "or set ACUPEDIA_API_BOOTSTRAP_COMMAND." + ) + + +def run_api_bootstrap( + *, + target: str, + api_root: Path | None = None, + environment: str | None = None, + extra_args: Sequence[str] = (), + extra_env: Mapping[str, str] | None = None, +) -> None: + if target not in VALID_TARGETS: + raise ValueError( + f"Unsupported bootstrap target {target!r}; " + f"expected one of: {', '.join(sorted(VALID_TARGETS))}" + ) + + root = resolve_api_root(api_root) + command = [ + *resolve_bootstrap_command(root), + target, + *[str(arg) for arg in extra_args], + ] + + env = dict(extra_env or {}) + if environment: + env["ACUPEDIA_ENV"] = environment + + run_command(command, cwd=root, env=env or None) diff --git a/acupedia_ops/cli.py b/acupedia_ops/cli.py new file mode 100644 index 0000000..b97d321 --- /dev/null +++ b/acupedia_ops/cli.py @@ -0,0 +1,424 @@ +from __future__ import annotations + +import argparse +import json +import os +from pathlib import Path + +from acupedia_ops.bootstrap.api_cli import VALID_TARGETS, run_api_bootstrap +from acupedia_ops.common.env import load_env_file +from acupedia_ops.common.paths import repo_root +from acupedia_ops.data.image.clean_image_borders import process_path +from acupedia_ops.deployment.backend import deploy_backend +from acupedia_ops.deployment.database import deploy_database +from acupedia_ops.deployment.gitea_runner import provision_runner, remove_runner +from acupedia_ops.local.bootstrap import local_bootstrap +from acupedia_ops.local.database import reset_local_database +from acupedia_ops.local.git_status import repository_status +from acupedia_ops.local.infrastructure import ( + infra_down, + infra_logs, + infra_restart, + infra_status, + infra_up, +) +from acupedia_ops.local.services import run_component, setup_components +from acupedia_ops.local.validation import has_errors, validate_workspace +from acupedia_ops.local.workspace import load_local_workspace + + +LOCAL_COMPONENTS = ("api", "mobile", "web", "admin") + + +def _build_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser( + prog="acupedia-ops", + description="AccuPedia operational tooling", + ) + parser.add_argument( + "--env-file", + type=Path, + default=None, + help="Local workspace .env file. Defaults to /.env.", + ) + + subparsers = parser.add_subparsers(dest="command", required=True) + + # Local development ------------------------------------------------- + local_parser = subparsers.add_parser( + "local", + help="Local development orchestration", + ) + local_sub = local_parser.add_subparsers( + dest="local_command", + required=True, + ) + + local_sub.add_parser( + "validate", + help="Validate local repository paths and configuration", + ) + + setup = local_sub.add_parser( + "setup", + help="Validate workspace and optionally install component dependencies", + ) + setup.add_argument( + "--component", + action="append", + choices=LOCAL_COMPONENTS, + help="Component to set up. Repeat as needed. Defaults to all.", + ) + setup.add_argument( + "--install", + action="store_true", + help="Run configured setup commands after validation", + ) + + status = local_sub.add_parser( + "status", + help="Show local repository and infrastructure status", + ) + status.add_argument("--json", action="store_true") + + run = local_sub.add_parser( + "run", + help="Run one component in its native development mode", + ) + run.add_argument("component", choices=LOCAL_COMPONENTS) + + infra_up_parser = local_sub.add_parser( + "infra-up", + help="Start local Docker Compose infrastructure", + ) + infra_up_parser.add_argument("--build", action="store_true") + infra_up_parser.add_argument("services", nargs="*") + + infra_down_parser = local_sub.add_parser( + "infra-down", + help="Stop local Docker Compose infrastructure", + ) + infra_down_parser.add_argument( + "--volumes", + action="store_true", + help="Also delete named volumes; destructive", + ) + + infra_restart_parser = local_sub.add_parser( + "infra-restart", + help="Restart local infrastructure services", + ) + infra_restart_parser.add_argument("services", nargs="*") + + local_sub.add_parser( + "infra-status", + help="Show Docker Compose infrastructure state", + ) + + logs = local_sub.add_parser( + "logs", + help="Show local infrastructure logs", + ) + logs.add_argument("services", nargs="*") + logs.add_argument("--follow", "-f", action="store_true") + logs.add_argument("--tail", type=int, default=200) + + bootstrap = local_sub.add_parser( + "bootstrap", + help="Invoke acupedia-api bootstrap using local content paths", + ) + bootstrap.add_argument( + "target", + nargs="?", + choices=sorted(VALID_TARGETS), + help="Defaults to bootstrap.default_target in config/local.yaml", + ) + bootstrap.add_argument( + "--publish-content", + action="store_true", + help="Publish content during content/all bootstrap", + ) + bootstrap.add_argument( + "bootstrap_args", + nargs=argparse.REMAINDER, + help="Additional arguments forwarded to acupedia-api after '--'", + ) + + reset_db = local_sub.add_parser( + "reset-db", + help="Use the backend-owned data reset CLI", + ) + reset_db.add_argument( + "--execute", + action="store_true", + help="Actually execute reset. Without this, backend dry-run is used.", + ) + reset_db.add_argument( + "reset_args", + nargs=argparse.REMAINDER, + help="Additional backend reset arguments after '--'", + ) + + # Image preprocessing ----------------------------------------------- + image_parser = subparsers.add_parser( + "image", + help="Image preprocessing operations", + ) + image_sub = image_parser.add_subparsers(dest="image_command", required=True) + clean = image_sub.add_parser("clean-border") + clean.add_argument("input", type=Path) + clean.add_argument("output", type=Path) + clean.add_argument("--border-fraction", type=float, default=0.035) + clean.add_argument("--difference-threshold", type=float, default=18.0) + clean.add_argument("--max-component-depth", type=float, default=0.025) + clean.add_argument("--max-edge-px", type=int, default=12) + clean.add_argument("--line-coverage", type=float, default=0.35) + + # Backend bootstrap adapter ----------------------------------------- + backend_bootstrap = subparsers.add_parser( + "bootstrap", + help="Direct adapter to the acupedia-api bootstrap CLI", + ) + backend_bootstrap.add_argument("target", choices=sorted(VALID_TARGETS)) + backend_bootstrap.add_argument("--api-root", type=Path) + backend_bootstrap.add_argument( + "--env", + dest="environment", + choices=("dev", "staging", "prod"), + ) + backend_bootstrap.add_argument("bootstrap_args", nargs=argparse.REMAINDER) + + # Remote deployment ------------------------------------------------- + deploy = subparsers.add_parser("deploy") + deploy_sub = deploy.add_subparsers(dest="deploy_command", required=True) + backend = deploy_sub.add_parser("backend") + backend.add_argument("--env", required=True, choices=("dev", "staging", "prod")) + database = deploy_sub.add_parser("database") + database.add_argument("--env", required=True, choices=("dev", "staging", "prod")) + + # Gitea runner lifecycle -------------------------------------------- + runner = subparsers.add_parser("runner") + runner_sub = runner.add_subparsers(dest="runner_command", required=True) + + provision = runner_sub.add_parser("provision") + provision.add_argument("--inventory", type=Path, required=True) + provision.add_argument("--limit") + provision.add_argument( + "--registration-token", + default=os.environ.get("GITEA_RUNNER_REGISTRATION_TOKEN"), + ) + provision.add_argument("--force-reregister", action="store_true") + provision.add_argument("--extra-var", action="append", default=[]) + + remove = runner_sub.add_parser("remove") + remove.add_argument("--inventory", type=Path, required=True) + remove.add_argument("--limit") + remove.add_argument("--remove-data", action="store_true") + remove.add_argument("--extra-var", action="append", default=[]) + + return parser + + +def _load_env(path: Path | None) -> None: + load_env_file(path or (repo_root() / ".env"), override=False) + + +def _forwarded(values: list[str]) -> list[str]: + result = list(values) + if result and result[0] == "--": + result = result[1:] + return result + + +def _print_validation(workspace) -> int: + issues = validate_workspace(workspace) + if not issues: + print("Local workspace validation: OK") + return 0 + + for issue in issues: + print(f"[{issue.level.upper()}] {issue.component}: {issue.message}") + return 1 if has_errors(issues) else 0 + + +def main() -> None: + parser = _build_parser() + args = parser.parse_args() + _load_env(args.env_file) + + if args.command == "local": + workspace = load_local_workspace(env_file=args.env_file) + + if args.local_command == "validate": + raise SystemExit(_print_validation(workspace)) + + if args.local_command == "setup": + exit_code = _print_validation(workspace) + if exit_code: + raise SystemExit(exit_code) + components = args.component or list(LOCAL_COMPONENTS) + if args.install: + setup_components(workspace, components) + else: + print( + "Validation completed. Dependency installation was not run; " + "use --install to run configured setup commands." + ) + return + + if args.local_command == "status": + rows = [] + for component, path in workspace.paths.items(): + status = repository_status(path) if path.exists() else None + rows.append( + { + "component": component, + "path": str(path), + "exists": path.exists(), + "git": bool(status and status.is_git_repo), + "branch": status.branch if status else None, + "revision": status.revision if status else None, + "dirty": status.dirty if status else None, + } + ) + + if args.json: + print(json.dumps(rows, indent=2)) + else: + for row in rows: + state = "missing" if not row["exists"] else "ok" + git = "" + if row["git"]: + dirty = "*" if row["dirty"] else "" + git = f" git={row['branch'] or '-'}@{row['revision'] or '-'}{dirty}" + print( + f"{row['component']:8} {state:7} {row['path']}{git}" + ) + + if workspace.infra.compose_file.exists(): + result = infra_status(workspace) + if result.stdout: + print("\nInfrastructure:\n" + result.stdout.rstrip()) + else: + print( + "\nInfrastructure: compose file not configured/found " + f"({workspace.infra.compose_file})" + ) + return + + if args.local_command == "run": + run_component(workspace, args.component) + return + + if args.local_command == "infra-up": + infra_up( + workspace, + build=args.build, + services=args.services, + ) + return + + if args.local_command == "infra-down": + infra_down(workspace, volumes=args.volumes) + return + + if args.local_command == "infra-restart": + infra_restart(workspace, services=args.services) + return + + if args.local_command == "infra-status": + result = infra_status(workspace) + if result.stdout: + print(result.stdout, end="") + if result.stderr: + print(result.stderr, end="") + raise SystemExit(result.returncode) + + if args.local_command == "logs": + infra_logs( + workspace, + services=args.services, + follow=args.follow, + tail=args.tail, + ) + return + + if args.local_command == "bootstrap": + local_bootstrap( + workspace, + target=args.target, + publish_content=args.publish_content, + extra_args=_forwarded(args.bootstrap_args), + ) + return + + if args.local_command == "reset-db": + reset_local_database( + workspace, + execute=args.execute, + extra_args=tuple(_forwarded(args.reset_args)), + ) + return + + if args.command == "image" and args.image_command == "clean-border": + result = process_path( + input_path=args.input, + output_path=args.output, + border_fraction=args.border_fraction, + difference_threshold=args.difference_threshold, + max_component_depth_fraction=args.max_component_depth, + max_edge_px=args.max_edge_px, + line_coverage=args.line_coverage, + ) + print(f"Processed images : {result.processed}") + print(f"Skipped images : {result.skipped}") + print(f"Copied files : {result.copied}") + print(f"Output : {result.output}") + return + + if args.command == "bootstrap": + run_api_bootstrap( + target=args.target, + api_root=args.api_root, + environment=args.environment, + extra_args=_forwarded(args.bootstrap_args), + ) + return + + if args.command == "deploy" and args.deploy_command == "backend": + deploy_backend(environment=args.env) + return + + if args.command == "deploy" and args.deploy_command == "database": + deploy_database(environment=args.env) + return + + if args.command == "runner" and args.runner_command == "provision": + token = args.registration_token + if not token: + parser.error( + "--registration-token or GITEA_RUNNER_REGISTRATION_TOKEN is required" + ) + provision_runner( + inventory=args.inventory, + registration_token=token, + limit=args.limit, + extra_vars=args.extra_var, + force_reregister=args.force_reregister, + ) + return + + if args.command == "runner" and args.runner_command == "remove": + remove_runner( + inventory=args.inventory, + limit=args.limit, + remove_data=args.remove_data, + extra_vars=args.extra_var, + ) + return + + parser.error("Unsupported command") + + +if __name__ == "__main__": + main() diff --git a/acupedia_ops/common/__init__.py b/acupedia_ops/common/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/common/config.py b/acupedia_ops/common/config.py new file mode 100644 index 0000000..8693c1c --- /dev/null +++ b/acupedia_ops/common/config.py @@ -0,0 +1,20 @@ +from __future__ import annotations +from dataclasses import dataclass +from pathlib import Path +from typing import Any +import yaml + +@dataclass(frozen=True) +class OpsConfig: + environment: str + values: dict[str, Any] + +def load_config(environment: str, config_root: Path | None = None) -> OpsConfig: + root = config_root or Path(__file__).resolve().parents[2] / "config" + path = root / f"{environment}.yaml" + if not path.exists(): + raise FileNotFoundError(f"Configuration not found: {path}") + values = yaml.safe_load(path.read_text(encoding="utf-8")) or {} + if not isinstance(values, dict): + raise ValueError(f"Configuration root must be a mapping: {path}") + return OpsConfig(environment=environment, values=values) diff --git a/acupedia_ops/common/env.py b/acupedia_ops/common/env.py new file mode 100644 index 0000000..ce01eb1 --- /dev/null +++ b/acupedia_ops/common/env.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +import os +from pathlib import Path +from typing import Mapping + + +class EnvFileError(ValueError): + """Raised when a local .env file contains malformed entries.""" + + +def _strip_quotes(value: str) -> str: + value = value.strip() + if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}: + return value[1:-1] + return value + + +def parse_env_file(path: Path) -> dict[str, str]: + """Parse a deliberately small, predictable dotenv subset. + + Supported syntax: + NAME=value + export NAME=value + blank lines + # comments + + Shell expansion and command substitution are intentionally not supported. + """ + values: dict[str, str] = {} + + if not path.exists(): + return values + + for line_number, raw_line in enumerate( + path.read_text(encoding="utf-8").splitlines(), + start=1, + ): + line = raw_line.strip() + + if not line or line.startswith("#"): + continue + + if line.startswith("export "): + line = line[len("export "):].lstrip() + + if "=" not in line: + raise EnvFileError( + f"Invalid .env entry at {path}:{line_number}: expected NAME=value" + ) + + key, raw_value = line.split("=", 1) + key = key.strip() + if not key or not key.replace("_", "").isalnum() or key[0].isdigit(): + raise EnvFileError( + f"Invalid environment variable name at {path}:{line_number}: {key!r}" + ) + + values[key] = _strip_quotes(raw_value) + + return values + + +def load_env_file( + path: Path, + *, + override: bool = False, +) -> dict[str, str]: + values = parse_env_file(path) + for key, value in values.items(): + if override or key not in os.environ: + os.environ[key] = value + return values + + +def merged_environment( + *sources: Mapping[str, str] | None, +) -> dict[str, str]: + result = dict(os.environ) + for source in sources: + if source: + result.update({str(k): str(v) for k, v in source.items()}) + return result diff --git a/acupedia_ops/common/logging.py b/acupedia_ops/common/logging.py new file mode 100644 index 0000000..a7d0b2e --- /dev/null +++ b/acupedia_ops/common/logging.py @@ -0,0 +1,4 @@ +import logging + +def configure_logging(level: int = logging.INFO) -> None: + logging.basicConfig(level=level, format="%(asctime)s %(levelname)s %(name)s %(message)s") diff --git a/acupedia_ops/common/paths.py b/acupedia_ops/common/paths.py new file mode 100644 index 0000000..7bd9924 --- /dev/null +++ b/acupedia_ops/common/paths.py @@ -0,0 +1,7 @@ +from pathlib import Path + +def repo_root() -> Path: + return Path(__file__).resolve().parents[2] + +def ansible_root() -> Path: + return repo_root() / "ansible" diff --git a/acupedia_ops/common/process.py b/acupedia_ops/common/process.py new file mode 100644 index 0000000..d7045bc --- /dev/null +++ b/acupedia_ops/common/process.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +import os +import shlex +import shutil +import subprocess +from dataclasses import dataclass +from pathlib import Path +from typing import Mapping, Sequence + + +class CommandNotFoundError(RuntimeError): + pass + + +@dataclass(frozen=True) +class CommandResult: + command: tuple[str, ...] + returncode: int + stdout: str + stderr: str + + +def command_exists(command: str) -> bool: + if "/" in command: + path = Path(command).expanduser() + return path.exists() and os.access(path, os.X_OK) + return shutil.which(command) is not None + + +def quote_command(command: Sequence[str]) -> str: + return " ".join(shlex.quote(str(part)) for part in command) + + +def require_command(command: str) -> None: + if not command_exists(command): + raise CommandNotFoundError(f"Required command not found: {command}") + + +def _effective_env(env: Mapping[str, str] | None) -> dict[str, str] | None: + if env is None: + return None + effective = dict(os.environ) + effective.update({str(key): str(value) for key, value in env.items()}) + return effective + + +def run_command( + command: Sequence[str], + *, + cwd: Path | None = None, + env: Mapping[str, str] | None = None, + capture: bool = False, + check: bool = True, +) -> CommandResult: + if not command: + raise ValueError("Command cannot be empty") + + require_command(str(command[0])) + + completed = subprocess.run( + [str(part) for part in command], + cwd=str(cwd) if cwd else None, + env=_effective_env(env), + check=False, + text=True, + capture_output=capture, + ) + + result = CommandResult( + command=tuple(str(part) for part in command), + returncode=completed.returncode, + stdout=completed.stdout or "", + stderr=completed.stderr or "", + ) + + if check and completed.returncode != 0: + raise subprocess.CalledProcessError( + completed.returncode, + list(result.command), + output=result.stdout, + stderr=result.stderr, + ) + + return result diff --git a/acupedia_ops/common/workspace_paths.py b/acupedia_ops/common/workspace_paths.py new file mode 100644 index 0000000..8c4938b --- /dev/null +++ b/acupedia_ops/common/workspace_paths.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +import os +import shlex +from pathlib import Path +from typing import Sequence + + +WORKSPACE_BASE_ENV = "ACUPEDIA_WORKSPACE_BASE_PATH" + + +def workspace_base_path( + value: str | Path | None = None, + *, + required: bool = True, +) -> Path | None: + """Return the AccuPedia workspace base path. + + Resolution order: + 1. explicit value + 2. ACUPEDIA_WORKSPACE_BASE_PATH + + The workspace base path itself must be absolute. This removes any + dependency on the caller's current working directory. + """ + raw = str(value).strip() if value is not None else os.environ.get( + WORKSPACE_BASE_ENV, + "", + ).strip() + + if not raw: + if required: + raise RuntimeError( + f"{WORKSPACE_BASE_ENV} is required for relative AccuPedia paths." + ) + return None + + path = Path(raw).expanduser() + if not path.is_absolute(): + raise ValueError( + f"{WORKSPACE_BASE_ENV} must be an absolute path: {raw!r}" + ) + + return path.resolve() + + +def resolve_workspace_path( + value: str | Path, + *, + base_path: Path | None = None, +) -> Path: + """Resolve an AccuPedia path deterministically. + + Absolute paths are used as-is. + Relative paths are always resolved against ACUPEDIA_WORKSPACE_BASE_PATH, + never against the process current working directory. + """ + path = Path(value).expanduser() + + if path.is_absolute(): + return path.resolve() + + base = base_path or workspace_base_path(required=True) + assert base is not None + return (base / path).resolve() + + +def resolve_env_path( + env_name: str, + *, + required: bool = True, + base_path: Path | None = None, +) -> Path | None: + raw = os.environ.get(env_name, "").strip() + + if not raw: + if required: + raise RuntimeError(f"Missing required environment variable: {env_name}") + return None + + return resolve_workspace_path(raw, base_path=base_path) + + +def resolve_command( + raw_command: str, + *, + base_path: Path | None = None, +) -> list[str]: + """Parse a command and resolve a relative executable path against workspace. + + Only the executable token is path-resolved when it clearly names a path + (contains '/' or begins with '.'). Remaining arguments are preserved. + """ + command = shlex.split(raw_command) + if not command: + raise ValueError("Command cannot be empty") + + executable = command[0] + if "/" in executable or executable.startswith("."): + command[0] = str( + resolve_workspace_path( + executable, + base_path=base_path, + ) + ) + + return command diff --git a/acupedia_ops/data/__init__.py b/acupedia_ops/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/data/content/__init__.py b/acupedia_ops/data/content/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/data/content/normalize_content.py b/acupedia_ops/data/content/normalize_content.py new file mode 100644 index 0000000..915b63c --- /dev/null +++ b/acupedia_ops/data/content/normalize_content.py @@ -0,0 +1,2 @@ +def normalize_content(*args, **kwargs): + raise NotImplementedError("Content normalization is not implemented yet") diff --git a/acupedia_ops/data/content/sanitize_json.py b/acupedia_ops/data/content/sanitize_json.py new file mode 100644 index 0000000..b4609cb --- /dev/null +++ b/acupedia_ops/data/content/sanitize_json.py @@ -0,0 +1,2 @@ +def sanitize_json(*args, **kwargs): + raise NotImplementedError("JSON sanitization is not implemented yet") diff --git a/acupedia_ops/data/content/validate_content_refs.py b/acupedia_ops/data/content/validate_content_refs.py new file mode 100644 index 0000000..253c103 --- /dev/null +++ b/acupedia_ops/data/content/validate_content_refs.py @@ -0,0 +1,2 @@ +def validate_content_refs(*args, **kwargs): + raise NotImplementedError("Content reference validation is not implemented yet") diff --git a/acupedia_ops/data/image/__init__.py b/acupedia_ops/data/image/__init__.py new file mode 100644 index 0000000..f908b8c --- /dev/null +++ b/acupedia_ops/data/image/__init__.py @@ -0,0 +1 @@ +from .clean_image_borders import BorderCleanupResult, clean_image, process_path diff --git a/acupedia_ops/data/image/clean_image_borders.py b/acupedia_ops/data/image/clean_image_borders.py new file mode 100644 index 0000000..3c85bd7 --- /dev/null +++ b/acupedia_ops/data/image/clean_image_borders.py @@ -0,0 +1,133 @@ +from __future__ import annotations +import shutil +import tempfile +import zipfile +from dataclasses import dataclass +from pathlib import Path +import cv2 +import numpy as np + +SUPPORTED_EXTENSIONS = {".jpg", ".jpeg", ".png", ".webp", ".bmp", ".tif", ".tiff"} + +@dataclass(frozen=True) +class BorderCleanupResult: + processed: int + skipped: int + copied: int + output: Path + +def _estimate_background(image: np.ndarray, sample_size: int = 20) -> np.ndarray: + h, w = image.shape[:2] + s = min(sample_size, max(1, h // 4), max(1, w // 4)) + patches = [image[:s, :s], image[:s, w-s:], image[h-s:, :s], image[h-s:, w-s:]] + pixels = np.concatenate([p.reshape(-1, image.shape[2]) for p in patches], axis=0) + return np.median(pixels, axis=0).astype(np.uint8) + +def _background_distance(image: np.ndarray, background: np.ndarray) -> np.ndarray: + img = image.astype(np.int16) + bg = background.astype(np.int16) + img_f = img.astype(np.float32, copy=False) + bg_f = np.asarray(bg, dtype=np.float32) + delta = img_f - bg_f + return np.sqrt(np.sum(delta * delta, axis=2)) + +def _detect_full_edge_lines(image: np.ndarray, background: np.ndarray, *, max_edge_px: int, difference_threshold: float, line_coverage: float) -> np.ndarray: + h, w = image.shape[:2] + non_background = _background_distance(image, background) > difference_threshold + mask = np.zeros((h, w), dtype=np.uint8) + edge_x = min(max_edge_px, max(1, w // 10)) + edge_y = min(max_edge_px, max(1, h // 10)) + for x in range(edge_x): + if float(np.mean(non_background[:, x])) >= line_coverage: mask[:, x] = 255 + for x in range(w-edge_x, w): + if float(np.mean(non_background[:, x])) >= line_coverage: mask[:, x] = 255 + for y in range(edge_y): + if float(np.mean(non_background[y, :])) >= line_coverage: mask[y, :] = 255 + for y in range(h-edge_y, h): + if float(np.mean(non_background[y, :])) >= line_coverage: mask[y, :] = 255 + return mask + +def _detect_edge_connected_artifacts(image: np.ndarray, background: np.ndarray, *, border_fraction: float, difference_threshold: float, max_component_depth_fraction: float) -> np.ndarray: + h, w = image.shape[:2] + candidate = (_background_distance(image, background) > difference_threshold).astype(np.uint8) + bx, by = max(2, int(w * border_fraction)), max(2, int(h * border_fraction)) + border_region = np.zeros((h, w), dtype=np.uint8) + border_region[:, :bx] = 1; border_region[:, w-bx:] = 1 + border_region[:by, :] = 1; border_region[h-by:, :] = 1 + candidate *= border_region + count, labels, stats, _ = cv2.connectedComponentsWithStats(candidate, connectivity=8) + output = np.zeros((h, w), dtype=np.uint8) + max_dx, max_dy = max(3, int(w * max_component_depth_fraction)), max(3, int(h * max_component_depth_fraction)) + for component_id in range(1, count): + x, y, cw, ch, _ = stats[component_id] + x2, y2 = x + cw, y + ch + shallow = ((x == 0 and x2 <= max_dx) or (x2 >= w and x >= w-max_dx) or (y == 0 and y2 <= max_dy) or (y2 >= h and y >= h-max_dy)) + if shallow: output[labels == component_id] = 255 + return output + +def _write_image(path: Path, image: np.ndarray) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + ext = path.suffix.lower() + if ext in {".jpg", ".jpeg"}: ok = cv2.imwrite(str(path), image, [cv2.IMWRITE_JPEG_QUALITY, 98]) + elif ext == ".png": ok = cv2.imwrite(str(path), image, [cv2.IMWRITE_PNG_COMPRESSION, 3]) + elif ext == ".webp": ok = cv2.imwrite(str(path), image, [cv2.IMWRITE_WEBP_QUALITY, 98]) + else: ok = cv2.imwrite(str(path), image) + if not ok: raise RuntimeError(f"Unable to write image: {path}") + +def clean_image(input_path: Path, output_path: Path, *, border_fraction: float = 0.035, difference_threshold: float = 18.0, max_component_depth_fraction: float = 0.025, max_edge_px: int = 12, line_coverage: float = 0.35) -> bool: + input_path, output_path = Path(input_path), Path(output_path) + image = cv2.imread(str(input_path), cv2.IMREAD_COLOR) + if image is None: return False + original_shape = image.shape + background = _estimate_background(image) + mask = cv2.bitwise_or( + _detect_edge_connected_artifacts(image, background, border_fraction=border_fraction, difference_threshold=difference_threshold, max_component_depth_fraction=max_component_depth_fraction), + _detect_full_edge_lines(image, background, max_edge_px=max_edge_px, difference_threshold=difference_threshold, line_coverage=line_coverage), + ) + cleaned = image.copy() + cleaned[mask > 0] = background + if cleaned.shape != original_shape: raise RuntimeError(f"Image dimensions changed unexpectedly: {input_path}") + _write_image(output_path, cleaned) + return True + +def _process_directory(input_dir: Path, output_dir: Path, **options: object) -> BorderCleanupResult: + processed = skipped = copied = 0 + for source in sorted(input_dir.rglob("*")): + if not source.is_file(): continue + target = output_dir / source.relative_to(input_dir) + if source.suffix.lower() not in SUPPORTED_EXTENSIONS: + target.parent.mkdir(parents=True, exist_ok=True); shutil.copy2(source, target); copied += 1; continue + if clean_image(source, target, **options): processed += 1 + else: skipped += 1 + return BorderCleanupResult(processed, skipped, copied, output_dir) + +def _extract_zip(zip_path: Path, destination: Path) -> None: + with zipfile.ZipFile(zip_path, "r") as archive: + root = destination.resolve() + for member in archive.infolist(): + resolved = (destination / member.filename).resolve() + if resolved != root and root not in resolved.parents: raise ValueError(f"Unsafe ZIP entry rejected: {member.filename}") + archive.extractall(destination) + +def _create_zip(source_dir: Path, output_zip: Path) -> None: + output_zip.parent.mkdir(parents=True, exist_ok=True) + with zipfile.ZipFile(output_zip, "w", zipfile.ZIP_DEFLATED) as archive: + for path in sorted(source_dir.rglob("*")): + if path.is_file(): archive.write(path, path.relative_to(source_dir)) + +def process_path(input_path: Path, output_path: Path, *, border_fraction: float = 0.035, difference_threshold: float = 18.0, max_component_depth_fraction: float = 0.025, max_edge_px: int = 12, line_coverage: float = 0.35) -> BorderCleanupResult: + input_path, output_path = Path(input_path).resolve(), Path(output_path).resolve() + options = dict(border_fraction=border_fraction, difference_threshold=difference_threshold, max_component_depth_fraction=max_component_depth_fraction, max_edge_px=max_edge_px, line_coverage=line_coverage) + if input_path.is_dir(): return _process_directory(input_path, output_path, **options) + if not input_path.is_file(): raise FileNotFoundError(f"Input not found: {input_path}") + if input_path.suffix.lower() in SUPPORTED_EXTENSIONS: + ok = clean_image(input_path, output_path, **options) + return BorderCleanupResult(1 if ok else 0, 0 if ok else 1, 0, output_path) + if input_path.suffix.lower() == ".zip": + if output_path.suffix.lower() != ".zip": raise ValueError("ZIP input requires a .zip output path") + with tempfile.TemporaryDirectory(prefix="acupedia-ops-image-clean-") as temp: + temp_root = Path(temp); extracted = temp_root / "input"; cleaned = temp_root / "output" + extracted.mkdir(); cleaned.mkdir(); _extract_zip(input_path, extracted) + result = _process_directory(extracted, cleaned, **options); _create_zip(cleaned, output_path) + return BorderCleanupResult(result.processed, result.skipped, result.copied, output_path) + raise ValueError("Input must be a supported image, directory, or ZIP archive") diff --git a/acupedia_ops/data/image/normalize_images.py b/acupedia_ops/data/image/normalize_images.py new file mode 100644 index 0000000..e126d36 --- /dev/null +++ b/acupedia_ops/data/image/normalize_images.py @@ -0,0 +1,2 @@ +def normalize_images(*args, **kwargs): + raise NotImplementedError("Image normalization is not implemented yet") diff --git a/acupedia_ops/data/image/resize_images.py b/acupedia_ops/data/image/resize_images.py new file mode 100644 index 0000000..31e5f38 --- /dev/null +++ b/acupedia_ops/data/image/resize_images.py @@ -0,0 +1,2 @@ +def resize_images(*args, **kwargs): + raise NotImplementedError("Image resizing is not implemented yet") diff --git a/acupedia_ops/data/templates/__init__.py b/acupedia_ops/data/templates/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/data/templates/add_display_order.py b/acupedia_ops/data/templates/add_display_order.py new file mode 100644 index 0000000..a1f9921 --- /dev/null +++ b/acupedia_ops/data/templates/add_display_order.py @@ -0,0 +1,2 @@ +def add_display_order(*args, **kwargs): + raise NotImplementedError("Display-order augmentation is not implemented yet") diff --git a/acupedia_ops/data/templates/validate_templates.py b/acupedia_ops/data/templates/validate_templates.py new file mode 100644 index 0000000..a663ed5 --- /dev/null +++ b/acupedia_ops/data/templates/validate_templates.py @@ -0,0 +1,2 @@ +def validate_templates(*args, **kwargs): + raise NotImplementedError("Template validation is not implemented yet") diff --git a/acupedia_ops/deployment/__init__.py b/acupedia_ops/deployment/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/acupedia_ops/deployment/backend.py b/acupedia_ops/deployment/backend.py new file mode 100644 index 0000000..57a02f7 --- /dev/null +++ b/acupedia_ops/deployment/backend.py @@ -0,0 +1,5 @@ +from acupedia_ops.ansible.runner import run_playbook +from acupedia_ops.common.config import load_config + +def deploy_backend(environment: str) -> None: + c=load_config(environment); run_playbook(playbook="backend.yml", inventory=environment, extra_vars=c.values.get("backend", {})) diff --git a/acupedia_ops/deployment/database.py b/acupedia_ops/deployment/database.py new file mode 100644 index 0000000..3cadd1b --- /dev/null +++ b/acupedia_ops/deployment/database.py @@ -0,0 +1,5 @@ +from acupedia_ops.ansible.runner import run_playbook +from acupedia_ops.common.config import load_config + +def deploy_database(environment: str) -> None: + c=load_config(environment); run_playbook(playbook="database.yml", inventory=environment, extra_vars=c.values.get("database", {})) diff --git a/acupedia_ops/deployment/gitea_runner.py b/acupedia_ops/deployment/gitea_runner.py new file mode 100644 index 0000000..c158e5a --- /dev/null +++ b/acupedia_ops/deployment/gitea_runner.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +import os +import subprocess +from pathlib import Path +from typing import Sequence + + +def _repo_root() -> Path: + return Path(__file__).resolve().parents[2] + + +def _ansible_playbook() -> str: + return os.environ.get("ANSIBLE_PLAYBOOK_BIN", "ansible-playbook") + + +def provision_runner( + *, + inventory: Path, + registration_token: str, + limit: str | None = None, + extra_vars: Sequence[str] = (), + force_reregister: bool = False, +) -> None: + repo_root = _repo_root() + playbook = repo_root / "ansible" / "playbooks" / "gitea-runner.yml" + + command = [ + _ansible_playbook(), + "-i", + str(inventory), + str(playbook), + "--extra-vars", + f"gitea_runner_registration_token={registration_token}", + ] + + if force_reregister: + command.extend( + [ + "--extra-vars", + "gitea_runner_force_reregister=true", + ] + ) + + for value in extra_vars: + command.extend(["--extra-vars", value]) + + if limit: + command.extend(["--limit", limit]) + + subprocess.run(command, cwd=repo_root, check=True) + + +def remove_runner( + *, + inventory: Path, + limit: str | None = None, + remove_data: bool = False, + extra_vars: Sequence[str] = (), +) -> None: + repo_root = _repo_root() + playbook = repo_root / "ansible" / "playbooks" / "gitea-runner-remove.yml" + + command = [ + _ansible_playbook(), + "-i", + str(inventory), + str(playbook), + ] + + if remove_data: + command.extend( + [ + "--extra-vars", + "gitea_runner_remove_data=true", + ] + ) + + for value in extra_vars: + command.extend(["--extra-vars", value]) + + if limit: + command.extend(["--limit", limit]) + + subprocess.run(command, cwd=repo_root, check=True) diff --git a/acupedia_ops/deployment/infra.py b/acupedia_ops/deployment/infra.py new file mode 100644 index 0000000..0a6b1ca --- /dev/null +++ b/acupedia_ops/deployment/infra.py @@ -0,0 +1,5 @@ +from acupedia_ops.ansible.runner import run_playbook +from acupedia_ops.common.config import load_config + +def deploy_infra(environment: str) -> None: + c=load_config(environment); run_playbook(playbook="infra.yml", inventory=environment, extra_vars=c.values.get("infra", {})) diff --git a/acupedia_ops/deployment/mobile.py b/acupedia_ops/deployment/mobile.py new file mode 100644 index 0000000..fd0363f --- /dev/null +++ b/acupedia_ops/deployment/mobile.py @@ -0,0 +1,2 @@ +def deploy_mobile(environment: str) -> None: + raise NotImplementedError("Mobile deployment is not implemented yet") diff --git a/acupedia_ops/local/__init__.py b/acupedia_ops/local/__init__.py new file mode 100644 index 0000000..8530e11 --- /dev/null +++ b/acupedia_ops/local/__init__.py @@ -0,0 +1,3 @@ +from acupedia_ops.local.workspace import LocalWorkspace, load_local_workspace + +__all__ = ["LocalWorkspace", "load_local_workspace"] diff --git a/acupedia_ops/local/bootstrap.py b/acupedia_ops/local/bootstrap.py new file mode 100644 index 0000000..a30c580 --- /dev/null +++ b/acupedia_ops/local/bootstrap.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +import os +from pathlib import Path +from typing import Sequence + +from acupedia_ops.bootstrap.api_cli import run_api_bootstrap +from acupedia_ops.local.workspace import LocalWorkspace + + +def _require(path: Path | None, description: str) -> Path: + if path is None: + raise RuntimeError(f"{description} is not configured") + if not path.exists(): + raise FileNotFoundError(f"{description} not found: {path}") + return path + + +def build_local_bootstrap_args( + workspace: LocalWorkspace, + target: str, + *, + publish_content: bool = False, +) -> list[str]: + defaults = workspace.bootstrap + + if target == "content": + config = _require(defaults.content_config, "Content config") + modules_root = _require(defaults.modules_root, "Content modules root") + args = [ + "--config", + str(config), + "--modules-root", + str(modules_root), + ] + if publish_content: + args.append("--publish-content") + return args + + if target == "media": + manifest = _require(defaults.media_manifest, "Media manifest") + media_root = _require(defaults.media_root, "Media root") + return [ + "--manifest", + str(manifest), + "--media-root", + str(media_root), + ] + + if target == "commerce": + if defaults.commerce_plans is None: + return [] + plans = _require(defaults.commerce_plans, "Commerce plans") + return ["--plans", str(plans)] + + if target == "all": + config = _require(defaults.content_config, "Content config") + modules_root = _require(defaults.modules_root, "Content modules root") + manifest = _require(defaults.media_manifest, "Media manifest") + media_root = _require(defaults.media_root, "Media root") + args = [ + "--content-config", + str(config), + "--content-modules-root", + str(modules_root), + "--media-manifest", + str(manifest), + "--media-media-root", + str(media_root), + ] + if defaults.commerce_plans is not None: + plans = _require(defaults.commerce_plans, "Commerce plans") + args.extend(["--commerce-plans", str(plans)]) + if publish_content: + args.append("--content-publish-content") + return args + + if target in {"auth", "validate"}: + return [] + + raise ValueError(f"Unsupported local bootstrap target: {target}") + + +def local_bootstrap( + workspace: LocalWorkspace, + *, + target: str | None = None, + publish_content: bool = False, + extra_args: Sequence[str] = (), +) -> None: + selected = target or workspace.bootstrap.default_target + generated_args = build_local_bootstrap_args( + workspace, + selected, + publish_content=publish_content, + ) + run_api_bootstrap( + target=selected, + api_root=workspace.path("api"), + extra_args=[*generated_args, *extra_args], + ) diff --git a/acupedia_ops/local/database.py b/acupedia_ops/local/database.py new file mode 100644 index 0000000..d8814a7 --- /dev/null +++ b/acupedia_ops/local/database.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +import os + +from acupedia_ops.bootstrap.api_cli import resolve_api_root +from acupedia_ops.common.process import run_command +from acupedia_ops.common.workspace_paths import ( + resolve_workspace_path, + workspace_base_path, +) +from acupedia_ops.local.workspace import LocalWorkspace + + +def reset_local_database( + workspace: LocalWorkspace, + *, + execute: bool, + extra_args: tuple[str, ...] = (), +) -> None: + """Invoke the backend-owned reset CLI. + + Dry-run is the backend default. `execute=True` adds --execute. + + The reset implementation intentionally remains in acupedia-api because it + owns the ORM/schema semantics and reset safety checks. + """ + api_root = resolve_api_root(workspace.path("api")) + + configured_python = os.environ.get("ACUPEDIA_API_PYTHON", "").strip() + if configured_python: + python = str( + resolve_workspace_path( + configured_python, + base_path=workspace.base_path, + ) + ) + else: + python = str(api_root / ".venv" / "bin" / "python") + + if not workspace.database_reset_command: + command = [ + python, + "-m", + "app.cli.reset", + "--scope", + "all", + ] + else: + command = list(workspace.database_reset_command) + + if execute and "--execute" not in command: + command.append("--execute") + + command.extend(extra_args) + run_command(command, cwd=api_root) diff --git a/acupedia_ops/local/git_status.py b/acupedia_ops/local/git_status.py new file mode 100644 index 0000000..ec843fc --- /dev/null +++ b/acupedia_ops/local/git_status.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from dataclasses import dataclass +from pathlib import Path + +from acupedia_ops.common.process import run_command + + +@dataclass(frozen=True) +class RepositoryStatus: + path: Path + is_git_repo: bool + branch: str | None + dirty: bool | None + revision: str | None + + +def repository_status(path: Path) -> RepositoryStatus: + if not (path / ".git").exists(): + return RepositoryStatus( + path=path, + is_git_repo=False, + branch=None, + dirty=None, + revision=None, + ) + + branch_result = run_command( + ["git", "branch", "--show-current"], + cwd=path, + capture=True, + check=False, + ) + revision_result = run_command( + ["git", "rev-parse", "--short", "HEAD"], + cwd=path, + capture=True, + check=False, + ) + dirty_result = run_command( + ["git", "status", "--porcelain"], + cwd=path, + capture=True, + check=False, + ) + + return RepositoryStatus( + path=path, + is_git_repo=True, + branch=branch_result.stdout.strip() or None, + dirty=bool(dirty_result.stdout.strip()), + revision=revision_result.stdout.strip() or None, + ) diff --git a/acupedia_ops/local/infrastructure.py b/acupedia_ops/local/infrastructure.py new file mode 100644 index 0000000..04cc94e --- /dev/null +++ b/acupedia_ops/local/infrastructure.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +import shutil +from pathlib import Path +from typing import Sequence + +from acupedia_ops.common.process import CommandResult, run_command +from acupedia_ops.local.workspace import LocalWorkspace + + +def _compose_command() -> list[str]: + if shutil.which("docker"): + result = run_command( + ["docker", "compose", "version"], + capture=True, + check=False, + ) + if result.returncode == 0: + return ["docker", "compose"] + + if shutil.which("docker-compose"): + return ["docker-compose"] + + raise RuntimeError( + "Docker Compose is required. Install Docker with the compose plugin " + "or docker-compose." + ) + + +def _base(workspace: LocalWorkspace) -> list[str]: + if not workspace.infra.compose_file.exists(): + raise FileNotFoundError( + "Local compose file not found: " + f"{workspace.infra.compose_file}. " + "Set ACUPEDIA_LOCAL_COMPOSE_FILE or configure config/local.yaml." + ) + + return [ + *_compose_command(), + "--project-name", + workspace.infra.project_name, + "--file", + str(workspace.infra.compose_file), + ] + + +def infra_up( + workspace: LocalWorkspace, + *, + build: bool = False, + services: Sequence[str] = (), +) -> None: + command = [*_base(workspace), "up", "--detach"] + if build: + command.append("--build") + command.extend(services) + run_command(command, cwd=workspace.infra.compose_file.parent) + + +def infra_down( + workspace: LocalWorkspace, + *, + volumes: bool = False, + remove_orphans: bool = True, +) -> None: + command = [*_base(workspace), "down"] + if volumes: + command.append("--volumes") + if remove_orphans: + command.append("--remove-orphans") + run_command(command, cwd=workspace.infra.compose_file.parent) + + +def infra_restart( + workspace: LocalWorkspace, + *, + services: Sequence[str] = (), +) -> None: + command = [*_base(workspace), "restart", *services] + run_command(command, cwd=workspace.infra.compose_file.parent) + + +def infra_status(workspace: LocalWorkspace) -> CommandResult: + return run_command( + [*_base(workspace), "ps"], + cwd=workspace.infra.compose_file.parent, + capture=True, + check=False, + ) + + +def infra_logs( + workspace: LocalWorkspace, + *, + services: Sequence[str] = (), + follow: bool = False, + tail: int = 200, +) -> None: + command = [*_base(workspace), "logs", "--tail", str(tail)] + if follow: + command.append("--follow") + command.extend(services) + run_command(command, cwd=workspace.infra.compose_file.parent) diff --git a/acupedia_ops/local/services.py b/acupedia_ops/local/services.py new file mode 100644 index 0000000..5ee27a0 --- /dev/null +++ b/acupedia_ops/local/services.py @@ -0,0 +1,38 @@ +from __future__ import annotations + +from typing import Iterable + +from acupedia_ops.common.process import run_command +from acupedia_ops.local.workspace import LocalWorkspace + + +def setup_component( + workspace: LocalWorkspace, + component: str, +) -> None: + config = workspace.components[component] + if not config.setup_command: + raise RuntimeError( + f"No setup command configured for local component: {component}" + ) + run_command(config.setup_command, cwd=workspace.path(component)) + + +def run_component( + workspace: LocalWorkspace, + component: str, +) -> None: + config = workspace.components[component] + if not config.run_command: + raise RuntimeError( + f"No run command configured for local component: {component}" + ) + run_command(config.run_command, cwd=workspace.path(component)) + + +def setup_components( + workspace: LocalWorkspace, + components: Iterable[str], +) -> None: + for component in components: + setup_component(workspace, component) diff --git a/acupedia_ops/local/validation.py b/acupedia_ops/local/validation.py new file mode 100644 index 0000000..6aac0f7 --- /dev/null +++ b/acupedia_ops/local/validation.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from dataclasses import dataclass +from pathlib import Path + +from acupedia_ops.local.workspace import LocalWorkspace + + +@dataclass(frozen=True) +class ValidationIssue: + level: str + component: str + message: str + + +def validate_workspace(workspace: LocalWorkspace) -> list[ValidationIssue]: + issues: list[ValidationIssue] = [] + + for component, path in workspace.paths.items(): + if not path.exists(): + issues.append( + ValidationIssue( + level="error", + component=component, + message=f"path does not exist: {path}", + ) + ) + elif not path.is_dir(): + issues.append( + ValidationIssue( + level="error", + component=component, + message=f"path is not a directory: {path}", + ) + ) + + for component, config in workspace.components.items(): + path = workspace.paths[component] + if not path.is_dir(): + continue + for marker in config.required_markers: + if not (path / marker).exists(): + issues.append( + ValidationIssue( + level="error", + component=component, + message=f"missing expected repository marker: {marker}", + ) + ) + + if workspace.paths["api"].is_dir(): + if not (workspace.paths["api"] / "app").is_dir(): + issues.append( + ValidationIssue( + level="error", + component="api", + message="missing app/ package", + ) + ) + + if workspace.paths["content"].is_dir(): + if not workspace.bootstrap.content_config.exists(): + issues.append( + ValidationIssue( + level="warning", + component="content", + message=( + "bootstrap content config not found: " + f"{workspace.bootstrap.content_config}" + ), + ) + ) + if not workspace.bootstrap.modules_root.exists(): + issues.append( + ValidationIssue( + level="error", + component="content", + message=( + "bootstrap modules root not found: " + f"{workspace.bootstrap.modules_root}" + ), + ) + ) + + if not workspace.infra.compose_file.exists(): + issues.append( + ValidationIssue( + level="warning", + component="infra", + message=( + "local compose file not found: " + f"{workspace.infra.compose_file}. " + "infra-* commands will remain unavailable until it exists." + ), + ) + ) + + return issues + + +def has_errors(issues: list[ValidationIssue]) -> bool: + return any(issue.level == "error" for issue in issues) diff --git a/acupedia_ops/local/workspace.py b/acupedia_ops/local/workspace.py new file mode 100644 index 0000000..365fda9 --- /dev/null +++ b/acupedia_ops/local/workspace.py @@ -0,0 +1,237 @@ +from __future__ import annotations + +import os +from dataclasses import dataclass +from pathlib import Path + +import yaml + +from acupedia_ops.common.env import load_env_file +from acupedia_ops.common.paths import repo_root +from acupedia_ops.common.workspace_paths import ( + resolve_workspace_path, + workspace_base_path, +) + + +PATH_VARIABLES: dict[str, str] = { + "api": "ACUPEDIA_API_PATH", + "mobile": "ACUPEDIA_MOBILE_PATH", + "web": "ACUPEDIA_WEB_PORTAL_PATH", + "admin": "ACUPEDIA_ADMIN_PORTAL_PATH", + "content": "ACUPEDIA_CONTENT_PATH", + "ops": "ACUPEDIA_OPS_PATH", +} + + +@dataclass(frozen=True) +class ComponentConfig: + name: str + path_env: str + required_markers: tuple[str, ...] + setup_command: tuple[str, ...] + run_command: tuple[str, ...] + + +@dataclass(frozen=True) +class LocalInfraConfig: + compose_file: Path + project_name: str + + +@dataclass(frozen=True) +class BootstrapDefaults: + default_target: str + content_config: Path + modules_root: Path + media_manifest: Path | None + media_root: Path | None + commerce_plans: Path | None + + +@dataclass(frozen=True) +class LocalWorkspace: + base_path: Path + root: Path + components: dict[str, ComponentConfig] + paths: dict[str, Path] + infra: LocalInfraConfig + bootstrap: BootstrapDefaults + database_reset_command: tuple[str, ...] + + def path(self, component: str) -> Path: + try: + return self.paths[component] + except KeyError as exc: + raise KeyError(f"Unknown workspace component: {component}") from exc + + +def _as_command(value: object, *, field: str) -> tuple[str, ...]: + if value is None: + return () + if not isinstance(value, list) or not all(isinstance(v, str) for v in value): + raise ValueError(f"{field} must be a YAML list of strings") + return tuple(value) + + +def _as_markers(value: object, *, field: str) -> tuple[str, ...]: + if value is None: + return () + if not isinstance(value, list) or not all(isinstance(v, str) for v in value): + raise ValueError(f"{field} must be a YAML list of strings") + return tuple(value) + + +def _resolve_relative(base: Path, raw: str | None) -> Path | None: + """Resolve config-relative content paths against the supplied repo root.""" + if raw is None or not str(raw).strip(): + return None + + path = Path(str(raw)).expanduser() + if path.is_absolute(): + return path.resolve() + + return (base / path).resolve() + + +def load_local_workspace( + *, + env_file: Path | None = None, + config_file: Path | None = None, +) -> LocalWorkspace: + ops_checkout = repo_root() + load_env_file(env_file or (ops_checkout / ".env"), override=False) + + base = workspace_base_path(required=True) + assert base is not None + + paths: dict[str, Path] = {} + missing_vars: list[str] = [] + + for component, env_name in PATH_VARIABLES.items(): + value = os.environ.get(env_name, "").strip() + if not value: + missing_vars.append(env_name) + continue + paths[component] = resolve_workspace_path(value, base_path=base) + + if missing_vars: + raise RuntimeError( + "Missing local workspace path variable(s): " + ", ".join(missing_vars) + ) + + # config/local.yaml belongs to the ops repository. Prefer the resolved + # ACUPEDIA_OPS_PATH rather than whichever checkout happened to launch us. + config_path = config_file or (paths["ops"] / "config" / "local.yaml") + if not config_path.exists(): + raise FileNotFoundError(f"Local configuration not found: {config_path}") + + raw = yaml.safe_load(config_path.read_text(encoding="utf-8")) or {} + if not isinstance(raw, dict): + raise ValueError("config/local.yaml root must be a mapping") + + component_raw = raw.get("components", {}) + if not isinstance(component_raw, dict): + raise ValueError("local.components must be a mapping") + + components: dict[str, ComponentConfig] = {} + for name, path_env in PATH_VARIABLES.items(): + if name in {"content", "ops"}: + continue + + item = component_raw.get(name, {}) + if not isinstance(item, dict): + raise ValueError(f"components.{name} must be a mapping") + + components[name] = ComponentConfig( + name=name, + path_env=path_env, + required_markers=_as_markers( + item.get("required_markers"), + field=f"components.{name}.required_markers", + ), + setup_command=_as_command( + item.get("setup_command"), + field=f"components.{name}.setup_command", + ), + run_command=_as_command( + item.get("run_command"), + field=f"components.{name}.run_command", + ), + ) + + infra_raw = raw.get("infrastructure", {}) + if not isinstance(infra_raw, dict): + raise ValueError("infrastructure must be a mapping") + + compose_override = os.environ.get("ACUPEDIA_LOCAL_COMPOSE_FILE", "").strip() + if compose_override: + # Environment path follows workspace-base semantics. + compose_file = resolve_workspace_path( + compose_override, + base_path=base, + ) + else: + # Config path remains relative to the ops repository. + compose_file = _resolve_relative( + paths["ops"], + str(infra_raw.get("compose_file", "docker-compose.local.yml")), + ) + + assert compose_file is not None + + infra = LocalInfraConfig( + compose_file=compose_file, + project_name=str(infra_raw.get("project_name", "acupedia-local")), + ) + + bootstrap_raw = raw.get("bootstrap", {}) + if not isinstance(bootstrap_raw, dict): + raise ValueError("bootstrap must be a mapping") + + content_root = paths["content"] + content_config = _resolve_relative( + content_root, + str(bootstrap_raw.get("content_config", "config.json")), + ) + modules_root = _resolve_relative( + content_root, + str(bootstrap_raw.get("modules_root", ".")), + ) + assert content_config is not None + assert modules_root is not None + + bootstrap = BootstrapDefaults( + default_target=str(bootstrap_raw.get("default_target", "content")), + content_config=content_config, + modules_root=modules_root, + media_manifest=_resolve_relative( + content_root, + bootstrap_raw.get("media_manifest"), + ), + media_root=_resolve_relative( + content_root, + bootstrap_raw.get("media_root"), + ), + commerce_plans=_resolve_relative( + content_root, + bootstrap_raw.get("commerce_plans"), + ), + ) + + database_raw = raw.get("database", {}) + if not isinstance(database_raw, dict): + raise ValueError("database must be a mapping") + + return LocalWorkspace( + base_path=base, + root=paths["ops"], + components=components, + paths=paths, + infra=infra, + bootstrap=bootstrap, + database_reset_command=_as_command( + database_raw.get("reset_command"), + field="database.reset_command", + ), + ) diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..adf9073 --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,4 @@ +[defaults] +host_key_checking = True +retry_files_enabled = False +interpreter_python = auto_silent diff --git a/ansible/inventories/dev/hosts.yml b/ansible/inventories/dev/hosts.yml new file mode 100644 index 0000000..f4c353e --- /dev/null +++ b/ansible/inventories/dev/hosts.yml @@ -0,0 +1,5 @@ +--- +all: + children: + backend: + hosts: {} diff --git a/ansible/inventories/gitea-runners.example.yml b/ansible/inventories/gitea-runners.example.yml new file mode 100644 index 0000000..f5bca20 --- /dev/null +++ b/ansible/inventories/gitea-runners.example.yml @@ -0,0 +1,22 @@ +all: + children: + gitea_runners: + hosts: + ci-runner-01: + ansible_host: 10.10.0.21 + gitea_runner_name: ci-runner-01 + gitea_runner_labels: + - "ubuntu-latest:docker://node:20-bookworm" + - "python:docker://python:3.13-bookworm" + + deploy-runner-01: + ansible_host: 10.10.0.22 + gitea_runner_name: deploy-runner-01 + gitea_runner_labels: + - "deployment:host" + - "ansible:host" + gitea_runner_docker_enabled: false + + vars: + ansible_user: ops + gitea_runner_instance_url: "https://gitea.example.com" diff --git a/ansible/inventories/prod/hosts.yml b/ansible/inventories/prod/hosts.yml new file mode 100644 index 0000000..f4c353e --- /dev/null +++ b/ansible/inventories/prod/hosts.yml @@ -0,0 +1,5 @@ +--- +all: + children: + backend: + hosts: {} diff --git a/ansible/inventories/staging/hosts.yml b/ansible/inventories/staging/hosts.yml new file mode 100644 index 0000000..f4c353e --- /dev/null +++ b/ansible/inventories/staging/hosts.yml @@ -0,0 +1,5 @@ +--- +all: + children: + backend: + hosts: {} diff --git a/ansible/playbooks/backend.yml b/ansible/playbooks/backend.yml new file mode 100644 index 0000000..d4ca7d4 --- /dev/null +++ b/ansible/playbooks/backend.yml @@ -0,0 +1,7 @@ +--- +- name: Deploy AccuPedia backend + hosts: backend + gather_facts: true + tasks: + - ansible.builtin.debug: + msg: "Backend deployment steps must be defined for the target environment." diff --git a/ansible/playbooks/database.yml b/ansible/playbooks/database.yml new file mode 100644 index 0000000..384353d --- /dev/null +++ b/ansible/playbooks/database.yml @@ -0,0 +1,7 @@ +--- +- name: Deploy AccuPedia database changes + hosts: backend + gather_facts: true + tasks: + - ansible.builtin.debug: + msg: "Database migration command must be defined for the target environment." diff --git a/ansible/playbooks/gitea-runner-remove.yml b/ansible/playbooks/gitea-runner-remove.yml new file mode 100644 index 0000000..9aaece2 --- /dev/null +++ b/ansible/playbooks/gitea-runner-remove.yml @@ -0,0 +1,9 @@ +--- +- name: Remove Gitea Actions runners + hosts: gitea_runners + become: true + tasks: + - name: Include Gitea runner removal tasks + ansible.builtin.include_role: + name: gitea_runner + tasks_from: remove.yml diff --git a/ansible/playbooks/gitea-runner.yml b/ansible/playbooks/gitea-runner.yml new file mode 100644 index 0000000..c4d60e5 --- /dev/null +++ b/ansible/playbooks/gitea-runner.yml @@ -0,0 +1,6 @@ +--- +- name: Provision Gitea Actions runners + hosts: gitea_runners + become: true + roles: + - role: gitea_runner diff --git a/ansible/playbooks/infra.yml b/ansible/playbooks/infra.yml new file mode 100644 index 0000000..92b0322 --- /dev/null +++ b/ansible/playbooks/infra.yml @@ -0,0 +1,7 @@ +--- +- name: Provision AccuPedia infrastructure + hosts: all + gather_facts: true + tasks: + - ansible.builtin.debug: + msg: "Infrastructure tasks must be explicitly defined before use." diff --git a/ansible/roles/.gitkeep b/ansible/roles/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ansible/roles/gitea_runner/defaults/main.yml b/ansible/roles/gitea_runner/defaults/main.yml new file mode 100644 index 0000000..ddab5c7 --- /dev/null +++ b/ansible/roles/gitea_runner/defaults/main.yml @@ -0,0 +1,35 @@ +--- +gitea_runner_version: "0.2.11" +gitea_runner_arch: "amd64" +gitea_runner_os: "linux" + +gitea_runner_user: "gitea-runner" +gitea_runner_group: "gitea-runner" +gitea_runner_home: "/var/lib/gitea-runner" +gitea_runner_work_dir: "/var/lib/gitea-runner/work" +gitea_runner_config_dir: "/etc/gitea-runner" +gitea_runner_config_file: "/etc/gitea-runner/config.yaml" +gitea_runner_binary: "/usr/local/bin/act_runner" + +gitea_runner_instance_url: "" +gitea_runner_registration_token: "" +gitea_runner_name: "{{ inventory_hostname }}" +gitea_runner_labels: + - "ubuntu-latest:docker://node:20-bookworm" +gitea_runner_scope: "instance" + +gitea_runner_capacity: 1 +gitea_runner_fetch_interval: "2s" +gitea_runner_fetch_timeout: "5s" +gitea_runner_insecure: false +gitea_runner_container_network: "bridge" +gitea_runner_docker_enabled: true +gitea_runner_docker_socket: "/var/run/docker.sock" +gitea_runner_docker_privileged: false + +gitea_runner_service_name: "gitea-act-runner" +gitea_runner_service_enabled: true +gitea_runner_service_state: "started" + +gitea_runner_download_url: "https://dl.gitea.com/act_runner/{{ gitea_runner_version }}/act_runner-{{ gitea_runner_version }}-{{ gitea_runner_os }}-{{ gitea_runner_arch }}" +gitea_runner_force_reregister: false diff --git a/ansible/roles/gitea_runner/handlers/main.yml b/ansible/roles/gitea_runner/handlers/main.yml new file mode 100644 index 0000000..7d5a861 --- /dev/null +++ b/ansible/roles/gitea_runner/handlers/main.yml @@ -0,0 +1,7 @@ +--- +- name: Restart gitea runner + ansible.builtin.systemd: + name: "{{ gitea_runner_service_name }}" + state: restarted + daemon_reload: true + when: gitea_runner_service_enabled diff --git a/ansible/roles/gitea_runner/tasks/main.yml b/ansible/roles/gitea_runner/tasks/main.yml new file mode 100644 index 0000000..17ac6fd --- /dev/null +++ b/ansible/roles/gitea_runner/tasks/main.yml @@ -0,0 +1,132 @@ +--- +- name: Validate required runner settings + ansible.builtin.assert: + that: + - gitea_runner_instance_url | length > 0 + - gitea_runner_registration_token | length > 0 + - gitea_runner_name | length > 0 + - gitea_runner_labels | length > 0 + fail_msg: "Gitea runner instance URL, registration token, name and labels are required." + +- name: Install base packages + ansible.builtin.package: + name: + - ca-certificates + - curl + state: present + +- name: Ensure Docker is installed + ansible.builtin.package: + name: docker.io + state: present + when: gitea_runner_docker_enabled + +- name: Ensure Docker service is enabled and running + ansible.builtin.systemd: + name: docker + enabled: true + state: started + when: gitea_runner_docker_enabled + +- name: Create runner group + ansible.builtin.group: + name: "{{ gitea_runner_group }}" + system: true + state: present + +- name: Create runner user + ansible.builtin.user: + name: "{{ gitea_runner_user }}" + group: "{{ gitea_runner_group }}" + home: "{{ gitea_runner_home }}" + create_home: true + shell: /usr/sbin/nologin + system: true + +- name: Add runner user to Docker group + ansible.builtin.user: + name: "{{ gitea_runner_user }}" + groups: docker + append: true + when: gitea_runner_docker_enabled + +- name: Create runner directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: "{{ gitea_runner_user }}" + group: "{{ gitea_runner_group }}" + mode: "0750" + loop: + - "{{ gitea_runner_home }}" + - "{{ gitea_runner_work_dir }}" + - "{{ gitea_runner_home }}/cache" + - "{{ gitea_runner_config_dir }}" + +- name: Download act_runner + ansible.builtin.get_url: + url: "{{ gitea_runner_download_url }}" + dest: "{{ gitea_runner_binary }}" + mode: "0755" + owner: root + group: root + notify: Restart gitea runner + +- name: Render runner configuration + ansible.builtin.template: + src: config.yaml.j2 + dest: "{{ gitea_runner_config_file }}" + owner: root + group: "{{ gitea_runner_group }}" + mode: "0640" + notify: Restart gitea runner + +- name: Remove runner registration when force re-registering + ansible.builtin.file: + path: "{{ gitea_runner_home }}/.runner" + state: absent + when: gitea_runner_force_reregister + notify: Restart gitea runner + +- name: Check current runner registration + ansible.builtin.stat: + path: "{{ gitea_runner_home }}/.runner" + register: gitea_runner_registration + +- name: Register runner with Gitea + ansible.builtin.command: + argv: + - "{{ gitea_runner_binary }}" + - register + - "--no-interactive" + - "--instance" + - "{{ gitea_runner_instance_url }}" + - "--token" + - "{{ gitea_runner_registration_token }}" + - "--name" + - "{{ gitea_runner_name }}" + - "--labels" + - "{{ gitea_runner_labels | join(',') }}" + args: + chdir: "{{ gitea_runner_home }}" + creates: "{{ gitea_runner_home }}/.runner" + become_user: "{{ gitea_runner_user }}" + no_log: true + when: not gitea_runner_registration.stat.exists + notify: Restart gitea runner + +- name: Install systemd service + ansible.builtin.template: + src: gitea-act-runner.service.j2 + dest: "/etc/systemd/system/{{ gitea_runner_service_name }}.service" + owner: root + group: root + mode: "0644" + notify: Restart gitea runner + +- name: Ensure runner service state + ansible.builtin.systemd: + name: "{{ gitea_runner_service_name }}" + enabled: "{{ gitea_runner_service_enabled }}" + state: "{{ gitea_runner_service_state }}" + daemon_reload: true diff --git a/ansible/roles/gitea_runner/tasks/remove.yml b/ansible/roles/gitea_runner/tasks/remove.yml new file mode 100644 index 0000000..b6f9fc1 --- /dev/null +++ b/ansible/roles/gitea_runner/tasks/remove.yml @@ -0,0 +1,33 @@ +--- +- name: Stop and disable runner service + ansible.builtin.systemd: + name: "{{ gitea_runner_service_name }}" + enabled: false + state: stopped + daemon_reload: true + failed_when: false + +- name: Remove systemd service + ansible.builtin.file: + path: "/etc/systemd/system/{{ gitea_runner_service_name }}.service" + state: absent + +- name: Remove act_runner binary + ansible.builtin.file: + path: "{{ gitea_runner_binary }}" + state: absent + +- name: Remove runner configuration + ansible.builtin.file: + path: "{{ gitea_runner_config_dir }}" + state: absent + +- name: Remove runner home + ansible.builtin.file: + path: "{{ gitea_runner_home }}" + state: absent + when: gitea_runner_remove_data | default(false) | bool + +- name: Reload systemd + ansible.builtin.systemd: + daemon_reload: true diff --git a/ansible/roles/gitea_runner/templates/config.yaml.j2 b/ansible/roles/gitea_runner/templates/config.yaml.j2 new file mode 100644 index 0000000..c095d7b --- /dev/null +++ b/ansible/roles/gitea_runner/templates/config.yaml.j2 @@ -0,0 +1,31 @@ +log: + level: info + +runner: + file: "{{ gitea_runner_home }}/.runner" + capacity: {{ gitea_runner_capacity }} + envs: {} + timeout: 3h + shutdown_timeout: 0s + insecure: {{ gitea_runner_insecure | lower }} + fetch_timeout: {{ gitea_runner_fetch_timeout }} + fetch_interval: {{ gitea_runner_fetch_interval }} + labels: +{% for label in gitea_runner_labels %} + - "{{ label }}" +{% endfor %} + +cache: + enabled: true + dir: "{{ gitea_runner_home }}/cache" + +container: + network: "{{ gitea_runner_container_network }}" + privileged: {{ gitea_runner_docker_privileged | lower }} + options: + workdir_parent: + valid_volumes: [] + docker_host: "unix://{{ gitea_runner_docker_socket }}" + +host: + workdir_parent: "{{ gitea_runner_work_dir }}" diff --git a/ansible/roles/gitea_runner/templates/gitea-act-runner.service.j2 b/ansible/roles/gitea_runner/templates/gitea-act-runner.service.j2 new file mode 100644 index 0000000..772961a --- /dev/null +++ b/ansible/roles/gitea_runner/templates/gitea-act-runner.service.j2 @@ -0,0 +1,21 @@ +[Unit] +Description=Gitea Actions act_runner +After=network-online.target docker.service +Wants=network-online.target +{% if gitea_runner_docker_enabled %} +Requires=docker.service +{% endif %} + +[Service] +Type=simple +User={{ gitea_runner_user }} +Group={{ gitea_runner_group }} +WorkingDirectory={{ gitea_runner_home }} +Environment=HOME={{ gitea_runner_home }} +ExecStart={{ gitea_runner_binary }} daemon --config {{ gitea_runner_config_file }} +Restart=always +RestartSec=5 +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target diff --git a/config/dev.yaml b/config/dev.yaml new file mode 100644 index 0000000..dd07f8e --- /dev/null +++ b/config/dev.yaml @@ -0,0 +1,6 @@ +environment: dev +backend: + application_name: accupedia-api +database: + run_migrations: true +infra: {} diff --git a/config/local.yaml b/config/local.yaml new file mode 100644 index 0000000..5e41833 --- /dev/null +++ b/config/local.yaml @@ -0,0 +1,84 @@ +# Local development orchestration. +# +# Repository locations are read from .env; this file describes how each +# repository is operated locally. + +components: + api: + required_markers: + - pyproject.toml + - app + setup_command: + - uv + - sync + run_command: + - uv + - run + - uvicorn + - app.main:app + - --reload + - --host + - 127.0.0.1 + - --port + - "8000" + + mobile: + required_markers: + - package.json + setup_command: + - npm + - install + run_command: + - npx + - expo + - start + + web: + required_markers: + - package.json + setup_command: + - npm + - install + run_command: + - npm + - run + - dev + + admin: + required_markers: + - package.json + setup_command: + - npm + - install + run_command: + - npm + - run + - dev + +infrastructure: + # This can be overridden with ACUPEDIA_LOCAL_COMPOSE_FILE. + compose_file: docker-compose.local.yml + project_name: acupedia-local + +bootstrap: + # "content" is intentionally the safe/local default. "all" additionally + # requires a configured media manifest and storage environment. + default_target: content + + # These paths are relative to ACUPEDIA_CONTENT_PATH unless absolute. + content_config: config.json + modules_root: . + + # Configure these when local media seeding is required. + media_manifest: + media_root: + + # Leave empty to let acupedia-api use its bundled plans.json. + commerce_plans: + +database: + # Empty means use: + # -m app.cli.reset --scope all + # + # You may provide an explicit command if the API reset interface changes. + reset_command: [] diff --git a/config/prod.yaml b/config/prod.yaml new file mode 100644 index 0000000..0beb569 --- /dev/null +++ b/config/prod.yaml @@ -0,0 +1,6 @@ +environment: prod +backend: + application_name: accupedia-api +database: + run_migrations: true +infra: {} diff --git a/config/staging.yaml b/config/staging.yaml new file mode 100644 index 0000000..f1d266a --- /dev/null +++ b/config/staging.yaml @@ -0,0 +1,6 @@ +environment: staging +backend: + application_name: accupedia-api +database: + run_migrations: true +infra: {} diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..6d5f05b --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,49 @@ +# Example only. Copy to docker-compose.local.yml and align image versions, +# ports and credentials with your acupedia-api local configuration. +# +# acupedia-ops deliberately does not hard-code infrastructure image versions +# that belong to your environment baseline. + +services: + postgres: + image: ${ACUPEDIA_POSTGRES_IMAGE:?Set ACUPEDIA_POSTGRES_IMAGE} + restart: unless-stopped + environment: + POSTGRES_DB: ${POSTGRES_DB:-acupedia} + POSTGRES_USER: ${POSTGRES_USER:-acupedia} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD} + ports: + - "${POSTGRES_PORT:-5432}:5432" + volumes: + - acupedia-postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-acupedia} -d ${POSTGRES_DB:-acupedia}"] + interval: 5s + timeout: 5s + retries: 20 + + redis: + image: ${ACUPEDIA_REDIS_IMAGE:?Set ACUPEDIA_REDIS_IMAGE} + restart: unless-stopped + ports: + - "${REDIS_PORT:-6379}:6379" + volumes: + - acupedia-redis-data:/data + + minio: + image: ${ACUPEDIA_MINIO_IMAGE:?Set ACUPEDIA_MINIO_IMAGE} + restart: unless-stopped + command: server /data --console-address ":9001" + environment: + MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY} + MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY} + ports: + - "${MINIO_PORT:-9000}:9000" + - "${MINIO_CONSOLE_PORT:-9001}:9001" + volumes: + - acupedia-minio-data:/data + +volumes: + acupedia-postgres-data: + acupedia-redis-data: + acupedia-minio-data: diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 0000000..6d5f05b --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,49 @@ +# Example only. Copy to docker-compose.local.yml and align image versions, +# ports and credentials with your acupedia-api local configuration. +# +# acupedia-ops deliberately does not hard-code infrastructure image versions +# that belong to your environment baseline. + +services: + postgres: + image: ${ACUPEDIA_POSTGRES_IMAGE:?Set ACUPEDIA_POSTGRES_IMAGE} + restart: unless-stopped + environment: + POSTGRES_DB: ${POSTGRES_DB:-acupedia} + POSTGRES_USER: ${POSTGRES_USER:-acupedia} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD} + ports: + - "${POSTGRES_PORT:-5432}:5432" + volumes: + - acupedia-postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-acupedia} -d ${POSTGRES_DB:-acupedia}"] + interval: 5s + timeout: 5s + retries: 20 + + redis: + image: ${ACUPEDIA_REDIS_IMAGE:?Set ACUPEDIA_REDIS_IMAGE} + restart: unless-stopped + ports: + - "${REDIS_PORT:-6379}:6379" + volumes: + - acupedia-redis-data:/data + + minio: + image: ${ACUPEDIA_MINIO_IMAGE:?Set ACUPEDIA_MINIO_IMAGE} + restart: unless-stopped + command: server /data --console-address ":9001" + environment: + MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY} + MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY} + ports: + - "${MINIO_PORT:-9000}:9000" + - "${MINIO_CONSOLE_PORT:-9001}:9001" + volumes: + - acupedia-minio-data:/data + +volumes: + acupedia-postgres-data: + acupedia-redis-data: + acupedia-minio-data: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 0000000..6d5f05b --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,49 @@ +# Example only. Copy to docker-compose.local.yml and align image versions, +# ports and credentials with your acupedia-api local configuration. +# +# acupedia-ops deliberately does not hard-code infrastructure image versions +# that belong to your environment baseline. + +services: + postgres: + image: ${ACUPEDIA_POSTGRES_IMAGE:?Set ACUPEDIA_POSTGRES_IMAGE} + restart: unless-stopped + environment: + POSTGRES_DB: ${POSTGRES_DB:-acupedia} + POSTGRES_USER: ${POSTGRES_USER:-acupedia} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD} + ports: + - "${POSTGRES_PORT:-5432}:5432" + volumes: + - acupedia-postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-acupedia} -d ${POSTGRES_DB:-acupedia}"] + interval: 5s + timeout: 5s + retries: 20 + + redis: + image: ${ACUPEDIA_REDIS_IMAGE:?Set ACUPEDIA_REDIS_IMAGE} + restart: unless-stopped + ports: + - "${REDIS_PORT:-6379}:6379" + volumes: + - acupedia-redis-data:/data + + minio: + image: ${ACUPEDIA_MINIO_IMAGE:?Set ACUPEDIA_MINIO_IMAGE} + restart: unless-stopped + command: server /data --console-address ":9001" + environment: + MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY} + MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY} + ports: + - "${MINIO_PORT:-9000}:9000" + - "${MINIO_CONSOLE_PORT:-9001}:9001" + volumes: + - acupedia-minio-data:/data + +volumes: + acupedia-postgres-data: + acupedia-redis-data: + acupedia-minio-data: diff --git a/docs/gitea-runner-lifecycle.md b/docs/gitea-runner-lifecycle.md new file mode 100644 index 0000000..df7244c --- /dev/null +++ b/docs/gitea-runner-lifecycle.md @@ -0,0 +1,72 @@ +# Gitea Actions runner lifecycle + +`acupedia-ops` owns provisioning and lifecycle management of Gitea Actions runners. + +Application repositories own only their `.gitea/workflows/*.yml` definitions. + +## Inventory + +Copy: + +```bash +cp ansible/inventories/gitea-runners.example.yml ansible/inventories/gitea-runners.yml +``` + +Edit the host addresses, SSH user, Gitea URL and runner labels. + +Do not store the registration token in Git. + +## Provision + +Using an environment variable: + +```bash +export GITEA_RUNNER_REGISTRATION_TOKEN='...' + +acupedia-ops runner provision --inventory ansible/inventories/gitea-runners.yml +``` + +Provision only one runner: + +```bash +acupedia-ops runner provision --inventory ansible/inventories/gitea-runners.yml --limit ci-runner-01 +``` + +Force re-registration: + +```bash +acupedia-ops runner provision --inventory ansible/inventories/gitea-runners.yml --limit ci-runner-01 --force-reregister +``` + +## Remove + +```bash +acupedia-ops runner remove --inventory ansible/inventories/gitea-runners.yml --limit ci-runner-01 +``` + +Remove registration/config plus runner data: + +```bash +acupedia-ops runner remove --inventory ansible/inventories/gitea-runners.yml --limit ci-runner-01 --remove-data +``` + +## Recommended runner classes + +CI runner: + +```yaml +gitea_runner_labels: + - "ubuntu-latest:docker://node:20-bookworm" + - "python:docker://python:3.13-bookworm" +``` + +Deployment runner: + +```yaml +gitea_runner_labels: + - "deployment:host" + - "ansible:host" +gitea_runner_docker_enabled: false +``` + +Do not give normal CI runners production credentials. diff --git a/docs/local-development.md b/docs/local-development.md new file mode 100644 index 0000000..e4e5e4c --- /dev/null +++ b/docs/local-development.md @@ -0,0 +1,196 @@ +# Local development + +`acupedia-ops local ...` coordinates the local AccuPedia workspace. It does not +replace the native development tools used by each repository. + +## Workspace model + +Recommended layout: + +```text +/home/amit/Work/Project/acupedia/ +├── acupedia-api/ +├── acupedia-mobile-ui/ +├── acupedia-web-portal/ +├── acupedia-admin-portal/ +├── acupedia-content/ +└── acupedia-ops/ +``` + +Copy `.env.example` to `.env`: + +```dotenv +ACUPEDIA_WORKSPACE_BASE_PATH=/home/amit/Work/Project/acupedia + +ACUPEDIA_API_PATH=acupedia-api +ACUPEDIA_MOBILE_PATH=acupedia-mobile-ui +ACUPEDIA_WEB_PORTAL_PATH=acupedia-web-portal +ACUPEDIA_ADMIN_PORTAL_PATH=acupedia-admin-portal +ACUPEDIA_CONTENT_PATH=acupedia-content +ACUPEDIA_OPS_PATH=acupedia-ops + +ACUPEDIA_LOCAL_COMPOSE_FILE=acupedia-ops/docker-compose.local.yml +ACUPEDIA_API_BOOTSTRAP_COMMAND=acupedia-api/.venv/bin/acupedia-bootstrap +ACUPEDIA_API_PYTHON=acupedia-api/.venv/bin/python +``` + +`ACUPEDIA_WORKSPACE_BASE_PATH` is the canonical local workspace root. + +All relative `ACUPEDIA_*_PATH` values are resolved against that base path, +never against the process current working directory. + +For example: + +```text +ACUPEDIA_WORKSPACE_BASE_PATH=/home/amit/Work/Project/acupedia +ACUPEDIA_API_PATH=acupedia-api + +resolves to: + +/home/amit/Work/Project/acupedia/acupedia-api +``` + +Absolute component paths remain supported and are used as-is. + +The workspace base path must itself be absolute. This is intentional: local +operations should not change meaning based on the directory from which the CLI +was launched. + +## Local machine versus deployment environment + +The `.env` describes local workspace topology and local runtime secrets. + +It is not the dev/staging/prod deployment selector. + +```text +.env + -> where local repositories live + +config/local.yaml + -> how repositories are operated locally + +docker-compose.local.yml + -> local stateful dependencies + +--env dev|staging|prod + -> explicit remote environment selection + +Ansible inventories/config + -> remote environment hosts/settings +``` + +## Validate + +```bash +acupedia-ops local validate +``` + +This verifies repository locations and expected repository markers. + +## Setup + +Validation only: + +```bash +acupedia-ops local setup +``` + +Install dependencies using the commands in `config/local.yaml`: + +```bash +acupedia-ops local setup --install +``` + +One component: + +```bash +acupedia-ops local setup --component api --install +``` + +## Local infrastructure + +Copy the example Compose file and align versions/settings with the API local +environment: + +```bash +cp docker-compose.local.example.yml docker-compose.local.yml +``` + +Then: + +```bash +acupedia-ops local infra-up +acupedia-ops local infra-status +acupedia-ops local logs +acupedia-ops local infra-down +``` + +Delete volumes only when explicitly intended: + +```bash +acupedia-ops local infra-down --volumes +``` + +## Bootstrap + +The actual bootstrap remains owned by `acupedia-api`. + +Default local content bootstrap: + +```bash +acupedia-ops local bootstrap +``` + +Publish seeded content: + +```bash +acupedia-ops local bootstrap content --publish-content +``` + +Other targets: + +```bash +acupedia-ops local bootstrap auth +acupedia-ops local bootstrap commerce +acupedia-ops local bootstrap media +acupedia-ops local bootstrap validate +acupedia-ops local bootstrap all +``` + +Additional backend bootstrap CLI options can be forwarded after `--`. + +## Database reset + +Dry-run: + +```bash +acupedia-ops local reset-db +``` + +Execute: + +```bash +acupedia-ops local reset-db --execute +``` + +`ACUPEDIA_API_PYTHON`, when relative, is resolved against +`ACUPEDIA_WORKSPACE_BASE_PATH`. + +## Run application components + +```bash +acupedia-ops local run api +acupedia-ops local run mobile +acupedia-ops local run web +acupedia-ops local run admin +``` + +These are foreground processes. Run multiple components in separate terminals, +tmux, or an IDE rather than turning `acupedia-ops` into a process supervisor. + +## Workspace status + +```bash +acupedia-ops local status +acupedia-ops local status --json +``` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..718f904 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools>=75", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "acupedia-ops" +version = "0.2.0" +description = "Operational data-processing and deployment tooling for AccuPedia" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "numpy>=2.0,<3.0", + "opencv-python-headless>=4.10,<5.0", + "PyYAML>=6.0,<7.0", +] + +[project.optional-dependencies] +deployment = ["ansible-runner>=2.4,<3.0"] +dev = ["pytest>=8.0,<9.0"] + +[project.scripts] +acupedia-ops = "acupedia_ops.cli:main" + +[tool.setuptools.packages.find] +where = ["."] +include = ["acupedia_ops*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["."] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5cb5a3f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +numpy>=2.0,<3.0 +opencv-python-headless>=4.10,<5.0 +PyYAML>=6.0,<7.0 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/bootstrap/__init__.py b/tests/bootstrap/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/bootstrap/test_api_cli.py b/tests/bootstrap/test_api_cli.py new file mode 100644 index 0000000..dace307 --- /dev/null +++ b/tests/bootstrap/test_api_cli.py @@ -0,0 +1,22 @@ +from pathlib import Path + +import pytest + +from acupedia_ops.bootstrap.api_cli import resolve_api_root, run_api_bootstrap + + +def test_resolve_api_root(tmp_path: Path) -> None: + api = tmp_path / "api" + (api / "app").mkdir(parents=True) + (api / "pyproject.toml").write_text("", encoding="utf-8") + + assert resolve_api_root(api) == api.resolve() + + +def test_rejects_unknown_target(tmp_path: Path) -> None: + api = tmp_path / "api" + (api / "app").mkdir(parents=True) + (api / "pyproject.toml").write_text("", encoding="utf-8") + + with pytest.raises(ValueError): + run_api_bootstrap(target="unknown", api_root=api) diff --git a/tests/common/__init__.py b/tests/common/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/common/test_config.py b/tests/common/test_config.py new file mode 100644 index 0000000..e3409d4 --- /dev/null +++ b/tests/common/test_config.py @@ -0,0 +1,12 @@ +from pathlib import Path + +from acupedia_ops.common.config import load_config + + +def test_load_config(tmp_path: Path) -> None: + (tmp_path / "dev.yaml").write_text( + "backend:\n application_name: accupedia-api\n", + encoding="utf-8", + ) + config = load_config("dev", config_root=tmp_path) + assert config.values["backend"]["application_name"] == "accupedia-api" diff --git a/tests/common/test_workspace_paths.py b/tests/common/test_workspace_paths.py new file mode 100644 index 0000000..684e52e --- /dev/null +++ b/tests/common/test_workspace_paths.py @@ -0,0 +1,49 @@ +from pathlib import Path + +import pytest + +from acupedia_ops.common.workspace_paths import ( + resolve_command, + resolve_workspace_path, + workspace_base_path, +) + + +def test_workspace_base_must_be_absolute(monkeypatch) -> None: + monkeypatch.setenv("ACUPEDIA_WORKSPACE_BASE_PATH", "relative/workspace") + with pytest.raises(ValueError): + workspace_base_path() + + +def test_relative_path_uses_workspace_base(tmp_path: Path) -> None: + base = (tmp_path / "workspace").resolve() + base.mkdir() + + assert resolve_workspace_path( + "acupedia-api", + base_path=base, + ) == (base / "acupedia-api").resolve() + + +def test_absolute_path_is_preserved(tmp_path: Path) -> None: + absolute = (tmp_path / "api").resolve() + + assert resolve_workspace_path( + absolute, + base_path=tmp_path / "other", + ) == absolute + + +def test_command_executable_path_uses_workspace_base(tmp_path: Path) -> None: + base = (tmp_path / "workspace").resolve() + base.mkdir() + + command = resolve_command( + "acupedia-api/.venv/bin/acupedia-bootstrap --flag value", + base_path=base, + ) + + assert command[0] == str( + (base / "acupedia-api/.venv/bin/acupedia-bootstrap").resolve() + ) + assert command[1:] == ["--flag", "value"] diff --git a/tests/data/image/test_clean_image_borders.py b/tests/data/image/test_clean_image_borders.py new file mode 100644 index 0000000..06db625 --- /dev/null +++ b/tests/data/image/test_clean_image_borders.py @@ -0,0 +1,11 @@ +from pathlib import Path +import cv2 +import numpy as np +from acupedia_ops.data.image.clean_image_borders import clean_image + +def test_clean_image_preserves_dimensions(tmp_path: Path) -> None: + source=tmp_path/"source.png"; target=tmp_path/"target.png" + image=np.full((200,300,3),255,dtype=np.uint8); image[:,0:3]=190; image[0:3,:]=190; image[:,297:300]=190 + cv2.circle(image,(150,100),30,(0,0,0),3); assert cv2.imwrite(str(source),image) + assert clean_image(source,target) + cleaned=cv2.imread(str(target)); assert cleaned is not None; assert cleaned.shape==image.shape; assert int(cleaned[100,120].mean())<100 diff --git a/tests/deployment/__init__.py b/tests/deployment/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/deployment/test_gitea_runner.py b/tests/deployment/test_gitea_runner.py new file mode 100644 index 0000000..69b5682 --- /dev/null +++ b/tests/deployment/test_gitea_runner.py @@ -0,0 +1,8 @@ +from pathlib import Path + +from acupedia_ops.deployment import gitea_runner + + +def test_repo_root_contains_ansible(): + root = gitea_runner._repo_root() + assert (root / "ansible").exists() diff --git a/tests/local/__init__.py b/tests/local/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/local/test_bootstrap_args.py b/tests/local/test_bootstrap_args.py new file mode 100644 index 0000000..a4374bb --- /dev/null +++ b/tests/local/test_bootstrap_args.py @@ -0,0 +1,49 @@ +from pathlib import Path + +from acupedia_ops.local.bootstrap import build_local_bootstrap_args +from acupedia_ops.local.workspace import ( + BootstrapDefaults, + LocalInfraConfig, + LocalWorkspace, +) + + +def test_content_bootstrap_args(tmp_path: Path) -> None: + content = tmp_path / "content" + content.mkdir() + config = content / "config.json" + config.write_text("{}", encoding="utf-8") + + workspace = LocalWorkspace( + base_path=tmp_path, + root=tmp_path, + components={}, + paths={"api": tmp_path / "api"}, + infra=LocalInfraConfig( + compose_file=tmp_path / "compose.yml", + project_name="test", + ), + bootstrap=BootstrapDefaults( + default_target="content", + content_config=config, + modules_root=content, + media_manifest=None, + media_root=None, + commerce_plans=None, + ), + database_reset_command=(), + ) + + args = build_local_bootstrap_args( + workspace, + "content", + publish_content=True, + ) + + assert args == [ + "--config", + str(config), + "--modules-root", + str(content), + "--publish-content", + ] diff --git a/tests/local/test_env.py b/tests/local/test_env.py new file mode 100644 index 0000000..f3dc1da --- /dev/null +++ b/tests/local/test_env.py @@ -0,0 +1,16 @@ +from pathlib import Path + +from acupedia_ops.common.env import parse_env_file + + +def test_parse_env_file(tmp_path: Path) -> None: + path = tmp_path / ".env" + path.write_text( + "A=1\nexport B='two words'\n# comment\nC=\"three\"\n", + encoding="utf-8", + ) + assert parse_env_file(path) == { + "A": "1", + "B": "two words", + "C": "three", + } diff --git a/tests/local/test_workspace.py b/tests/local/test_workspace.py new file mode 100644 index 0000000..dd91aaa --- /dev/null +++ b/tests/local/test_workspace.py @@ -0,0 +1,101 @@ +from pathlib import Path + +import pytest + +from acupedia_ops.local.workspace import load_local_workspace + + +@pytest.fixture() +def workspace_environment(tmp_path: Path, monkeypatch): + base = tmp_path / "workspace" + base.mkdir() + + names = { + "ACUPEDIA_API_PATH": "api", + "ACUPEDIA_MOBILE_PATH": "mobile", + "ACUPEDIA_WEB_PORTAL_PATH": "web", + "ACUPEDIA_ADMIN_PORTAL_PATH": "admin", + "ACUPEDIA_CONTENT_PATH": "content", + "ACUPEDIA_OPS_PATH": "ops", + } + + monkeypatch.setenv("ACUPEDIA_WORKSPACE_BASE_PATH", str(base)) + + resolved = {} + for env_name, relative in names.items(): + path = base / relative + path.mkdir() + monkeypatch.setenv(env_name, relative) + resolved[env_name] = path + + (resolved["ACUPEDIA_API_PATH"] / "app").mkdir() + (resolved["ACUPEDIA_API_PATH"] / "pyproject.toml").write_text( + "", + encoding="utf-8", + ) + (resolved["ACUPEDIA_CONTENT_PATH"] / "config.json").write_text( + "{}", + encoding="utf-8", + ) + + config = tmp_path / "local.yaml" + config.write_text( + """ +components: + api: + required_markers: [pyproject.toml, app] + setup_command: [uv, sync] + run_command: [uv, run, uvicorn] + mobile: {} + web: {} + admin: {} +infrastructure: + compose_file: docker-compose.local.yml +bootstrap: + content_config: config.json + modules_root: . +database: + reset_command: [] +""".strip(), + encoding="utf-8", + ) + + return base, resolved, config + + +def test_workspace_loads_relative_paths_from_base( + workspace_environment, +) -> None: + base, resolved, config = workspace_environment + + workspace = load_local_workspace( + env_file=Path("/nonexistent"), + config_file=config, + ) + + assert workspace.base_path == base.resolve() + assert workspace.path("api") == resolved["ACUPEDIA_API_PATH"].resolve() + assert workspace.path("mobile") == resolved["ACUPEDIA_MOBILE_PATH"].resolve() + assert workspace.bootstrap.content_config == ( + resolved["ACUPEDIA_CONTENT_PATH"] / "config.json" + ).resolve() + + +def test_compose_env_override_resolves_from_workspace_base( + workspace_environment, + monkeypatch, +) -> None: + base, _, config = workspace_environment + monkeypatch.setenv( + "ACUPEDIA_LOCAL_COMPOSE_FILE", + "ops/docker-compose.local.yml", + ) + + workspace = load_local_workspace( + env_file=Path("/nonexistent"), + config_file=config, + ) + + assert workspace.infra.compose_file == ( + base / "ops" / "docker-compose.local.yml" + ).resolve() diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..9774ce1 --- /dev/null +++ b/uv.lock @@ -0,0 +1,387 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version < '3.12'", +] + +[[package]] +name = "acupedia-ops" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, + { name = "numpy", version = "2.5.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "opencv-python-headless" }, + { name = "pyyaml" }, +] + +[package.optional-dependencies] +deployment = [ + { name = "ansible-runner" }, +] +dev = [ + { name = "pytest" }, +] + +[package.metadata] +requires-dist = [ + { name = "ansible-runner", marker = "extra == 'deployment'", specifier = ">=2.4,<3.0" }, + { name = "numpy", specifier = ">=2.0,<3.0" }, + { name = "opencv-python-headless", specifier = ">=4.10,<5.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0,<9.0" }, + { name = "pyyaml", specifier = ">=6.0,<7.0" }, +] +provides-extras = ["deployment", "dev"] + +[[package]] +name = "ansible-runner" +version = "2.4.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, + { name = "pexpect" }, + { name = "python-daemon" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/4f/62222b42b52cc771db51ccc77ffac19cc5f0196ff61de7c93585845a819b/ansible_runner-2.4.3.tar.gz", hash = "sha256:5f3025529bb968fdc3b627457dd8d418dbf9d53bc73735d50e69c28544d53031", size = 154148, upload-time = "2026-03-16T18:42:14.861Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/89/fa7f81db6134caa455c9351373ee934b5fdeed212eb939d6c42d80d683d7/ansible_runner-2.4.3-py3-none-any.whl", hash = "sha256:cdac6daa151a50084ffda710e769db23fa975fc0507796191d7708831b286e37", size = 80257, upload-time = "2026-03-16T18:42:13.72Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "lockfile" +version = "0.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799", size = 20874, upload-time = "2015-11-25T18:29:58.279Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/22/9460e311f340cb62d26a38c419b1381b8593b0bb6b5d1f056938b086d362/lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa", size = 13564, upload-time = "2015-11-25T18:29:51.462Z" }, +] + +[[package]] +name = "numpy" +version = "2.4.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.12'", +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/ad/fed0499ce6a338d2a03ebae59cd15093910c8875328855781952abf6c2fe/numpy-2.4.6.tar.gz", hash = "sha256:f3a3570c4a2a16746ac2c31a7c7c7b0c186b95ce902e33db6f28094ed7387dda", size = 20735807, upload-time = "2026-05-18T23:37:14.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/49/ec46835a70be8fa6446c495126ac84fdb28cb2558e1620ffb87a10c8b64c/numpy-2.4.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0280e0356c0829a18d9de1cb7eee50ec22ca639878d7240307ca0943d73cd2c4", size = 16969194, upload-time = "2026-05-18T23:33:13.503Z" }, + { url = "https://files.pythonhosted.org/packages/0e/0d/f5957185c0ee2f3e12f78715aa9e3b353fd83633316c8532b38faa37e3f6/numpy-2.4.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:110f8b71aacb688ec69062bb7f6938a0f8acb01b7c1c4beb453c65b6d234584d", size = 14964111, upload-time = "2026-05-18T23:33:17.795Z" }, + { url = "https://files.pythonhosted.org/packages/ad/40/40a40ee0ddf7ceb782c49af278894b686e586d65d8c1889c8b5da01a3d7d/numpy-2.4.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:4cfe66903cc32a9921a6733d96b19bb6abf310397581bbad89c228f5abaf0ee8", size = 5469159, upload-time = "2026-05-18T23:33:20.654Z" }, + { url = "https://files.pythonhosted.org/packages/63/13/f9a8046535cb21deae82f8d03de9617e08882d274fad2539630761888228/numpy-2.4.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:8155154c7c691289fe18f510b5d4657c68c67989f293f0535a91360392ff6538", size = 6798936, upload-time = "2026-05-18T23:33:22.987Z" }, + { url = "https://files.pythonhosted.org/packages/33/a8/6fa8c1a345a8c85dbb21932c447bee07c30a2c2a3f31e369c0a84b300147/numpy-2.4.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ab0a9c4ffb1a6d95ef519fe4247dba8eb6b18ad93999f76b7f657039acabd47", size = 15966692, upload-time = "2026-05-18T23:33:26.62Z" }, + { url = "https://files.pythonhosted.org/packages/02/03/74fe2a4cb3817d94d86402f2506554130a2f01414e299b5a843e5a8a957f/numpy-2.4.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93", size = 16918164, upload-time = "2026-05-18T23:33:29.955Z" }, + { url = "https://files.pythonhosted.org/packages/c5/80/3615be3313f7e7696609bc194b9f0101da809df79e859bdb84e0cd043f46/numpy-2.4.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2d37ab77531417474168eb79d6d80b14f821a966818505d03013d0833edb7a8", size = 17322877, upload-time = "2026-05-18T23:33:34.724Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ac/a691e0fe2675e370d0e08ff905adc49a1c8830e8cae03efe4477e92cd55d/numpy-2.4.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f407cb6b8e9d6d8c626bc73c945db1706035af8fd632295547bf1c9e46d092d6", size = 18651487, upload-time = "2026-05-18T23:33:38.217Z" }, + { url = "https://files.pythonhosted.org/packages/15/a7/9bc1cd626d7bf6869bfedf27b91b6ab5dd607758bf8e959d6fa80c6a59cb/numpy-2.4.6-cp311-cp311-win32.whl", hash = "sha256:ddea102b48f9e339f3948bf22040944184627a30fdf7f858667673b9c5f033c8", size = 6233945, upload-time = "2026-05-18T23:33:41.331Z" }, + { url = "https://files.pythonhosted.org/packages/c5/31/7fc6239c12bce7e931463251cca4426c465e1876ba3cc785402ef4dd8f4e/numpy-2.4.6-cp311-cp311-win_amd64.whl", hash = "sha256:1e254a00cdf42b1e4d5b3d68d33af63268d41340d8885df2ab6470f2e1500147", size = 12608406, upload-time = "2026-05-18T23:33:44.131Z" }, + { url = "https://files.pythonhosted.org/packages/27/83/140f85a466595a16382996a1bf06b2b54bcd597488921b0c9daaeeda72af/numpy-2.4.6-cp311-cp311-win_arm64.whl", hash = "sha256:ed9749eef4cbd126da3dc1d6bcb3a57f5eb7ac6a6484146bdbf743f552dfc577", size = 10479528, upload-time = "2026-05-18T23:33:50.725Z" }, + { url = "https://files.pythonhosted.org/packages/95/2a/3d7b5ac8aac24feaf9ad7ed58f45b0bbc06d37e4338ae84c9f2298b570f9/numpy-2.4.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:001fbb8e08d942dd57599e781f2472269ee7f2755fae407b4f67b2f0b17da3f1", size = 16689119, upload-time = "2026-05-18T23:33:54.065Z" }, + { url = "https://files.pythonhosted.org/packages/ea/12/92c4c131527599e8288d6918e888d88726f84d805d784b771f32408aeaef/numpy-2.4.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ebfb099f8dcf083deef3ac1ca4c1503f387cf76296fcb3816b66f5ecb5f54fdb", size = 14699246, upload-time = "2026-05-18T23:33:57.621Z" }, + { url = "https://files.pythonhosted.org/packages/ad/fe/c0a6b7b2ca128a8fb228575147073b660656734b8ebe4d76c8fd748dcc79/numpy-2.4.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3213d622a0283a39a93d188f3cf72b26862df52fbb4ca3697f51705016523d41", size = 5204410, upload-time = "2026-05-18T23:34:00.302Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d4/9770d14ba719432bb90a421bfd443872ed0f70f7264b64bec12ea363d5fd/numpy-2.4.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:357cc07a6d7b0b182ff02249616a03742827ebb1277546b5c7cd7f7620a45698", size = 6551240, upload-time = "2026-05-18T23:34:02.852Z" }, + { url = "https://files.pythonhosted.org/packages/c9/c6/50a46a6205feba2343f1d6d17438107c5dc491ed1c736e6ea68689fd906b/numpy-2.4.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f9fb9157b4ce2971008323afe46053787b526ef624fea915b261468a8421a0f", size = 15671012, upload-time = "2026-05-18T23:34:05.485Z" }, + { url = "https://files.pythonhosted.org/packages/99/60/14115e6364fa676c5397c2ad3004e527e9aa487abf5d0706ec81bbd08529/numpy-2.4.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:90f9849678c75fe7afa2d348ac842c168b0a4d3d61919687216dfc547976d853", size = 16645538, upload-time = "2026-05-18T23:34:09.265Z" }, + { url = "https://files.pythonhosted.org/packages/ae/c5/693cbe59e57db94d2231fa519ca3978dc9e19da5a8f088588f5c6e947ff2/numpy-2.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c1a2af6c6ef86344a6b0db6b97834208bf598db514f2b155042439b62605601a", size = 17020706, upload-time = "2026-05-18T23:34:13.053Z" }, + { url = "https://files.pythonhosted.org/packages/ef/fc/85b7c4eff9b4966ade25c2273cf7e7012e92366c032058653934b37de044/numpy-2.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5805d5a22fd19c8ccff10a9561f9df94436b0545619ea579db2d3c35294bce2", size = 18368541, upload-time = "2026-05-18T23:34:17.024Z" }, + { url = "https://files.pythonhosted.org/packages/f6/81/e1b27545deedce7f4a0b348618c6b62d74e36a4dc9ccd42f3eb2f85eee32/numpy-2.4.6-cp312-cp312-win32.whl", hash = "sha256:e3eeb0aabd6bd5ce64faae67e9935203a6991b4bc2a485a767fbafb2c5125f45", size = 5962825, upload-time = "2026-05-18T23:34:20.3Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ca/feab00bd44aa5fe1ad2c18f08b4d3bb92e26484b0b1d1443897809ed528c/numpy-2.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:d8e8286dd7cea7895157318d1b91cdacac64c479f3cbc8dce548331728484751", size = 12321687, upload-time = "2026-05-18T23:34:23.095Z" }, + { url = "https://files.pythonhosted.org/packages/63/cf/5a6d34850a39d1093558564f77ee8e8e0bee5061151b8f05a55711001ec7/numpy-2.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:4081eb135ac24158bd51cdfbef16f1c64df7063b1143f24731387137c092bec8", size = 10221482, upload-time = "2026-05-18T23:34:25.876Z" }, + { url = "https://files.pythonhosted.org/packages/fb/82/bdab26d7438c6791ca31b7c024ca37c1eab8b726ba236129005cd4a06e45/numpy-2.4.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:511dbaf848decaaaf4b4ca48032619fb3138710c4bf7da7617765edad1ef96b0", size = 16684648, upload-time = "2026-05-18T23:34:29.41Z" }, + { url = "https://files.pythonhosted.org/packages/1b/30/a80189bcc7f5e4258b3fbc3968d909d1756f54d023299ecc39ad6fdb9ef8/numpy-2.4.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bf162abab1c1a736333192707cef898e735a5ca00f38f27eeedf44b39d9e85eb", size = 14693902, upload-time = "2026-05-18T23:34:33.013Z" }, + { url = "https://files.pythonhosted.org/packages/97/12/70b5d0d7c15e1ebb8a6a84a8caa1d19e181d84fb58bb6d70aca29099dec1/numpy-2.4.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:043191bfa8eab18c776647b62723ac9dddece59743b13f49b2016094129c2b3f", size = 5198992, upload-time = "2026-05-18T23:34:36.132Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8c/ebd2a8f8a83541f8d38cc5667e8c2b69cecfd30da6e45693e8158857d44b/numpy-2.4.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:6180d8b35af935aed8ece3a85e0a43f87393ae0ac87c8d2c8bd2c993f7270ef3", size = 6546944, upload-time = "2026-05-18T23:34:38.484Z" }, + { url = "https://files.pythonhosted.org/packages/bb/c5/7b863a97a91671a0338f4253bd3b5a3d3852f0692dae91711c9f4a10e787/numpy-2.4.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72fbe16c6fac95aedf5937fa873445cec2110be35d8a4e9433d7501fd98dae6b", size = 15669392, upload-time = "2026-05-18T23:34:41.257Z" }, + { url = "https://files.pythonhosted.org/packages/a5/9d/3584b9984ca4c047aea75214ce1a4c4c73d849bd71b604264b7f5653f8a8/numpy-2.4.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a7830bab239b79cda9c08c2da014761cafb48da6150e1da17ac06283f43b6089", size = 16633220, upload-time = "2026-05-18T23:34:45.075Z" }, + { url = "https://files.pythonhosted.org/packages/05/ae/7c67fba23bd98caec7c99261f3a16072ade14813486b0282cb29846de832/numpy-2.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ef4aea96ce4d3b074422cb4f2f64e216bf9e213004bb58ecfdf50ea02ea8eb9a", size = 17020800, upload-time = "2026-05-18T23:34:49.065Z" }, + { url = "https://files.pythonhosted.org/packages/d9/5d/3b6725cb31d983c5e66916f5d36f6d7e5521129e4c4404d64f918292a5b6/numpy-2.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:dfa20cc6ca228e6b155b11da03825975ce66aea520985dbbddf0f2a5a495c605", size = 18357600, upload-time = "2026-05-18T23:34:52.709Z" }, + { url = "https://files.pythonhosted.org/packages/f7/da/2ccc6c2fe8898dee01d90c75c5f5f914a23daf99e3e0f59516a08760c8b5/numpy-2.4.6-cp313-cp313-win32.whl", hash = "sha256:56b39e5e0622a09a25bf5baf62f4bcf0cb8a41ae6e2819cf49bbc5a74c083f91", size = 5961134, upload-time = "2026-05-18T23:34:55.618Z" }, + { url = "https://files.pythonhosted.org/packages/b5/cd/9cc4dc876fb065d5c220aae4d5e14826b2715331bb7618ce1fb07a679d99/numpy-2.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:c4fc99836233ea196540b17ab0983aff60ed07941751930f5f4d05bc3b3b7359", size = 12318598, upload-time = "2026-05-18T23:34:58.928Z" }, + { url = "https://files.pythonhosted.org/packages/39/1e/c0bcba1f8694116485fe28fd1be698c278fcda4141c5b0e53a2aed8b12a8/numpy-2.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a7c711e21628b52034bb5ab8d1bce291f752fcc5e92accc615778acee1ff4778", size = 10222272, upload-time = "2026-05-18T23:35:02.167Z" }, + { url = "https://files.pythonhosted.org/packages/63/6d/cc5619247c8f4204e507f5883528372e4ac4bb189e579fb859a12e480b1f/numpy-2.4.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:112b06a867b235ef466ed3508ddf0238050df9c727cafb5301ac385b899189a1", size = 14821197, upload-time = "2026-05-18T23:35:05.468Z" }, + { url = "https://files.pythonhosted.org/packages/00/58/f1c39161c87d9e9bed660f1ed4bafc0e403d5ec9650b6dd77aead07d489b/numpy-2.4.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:eaf7fa2de5c0be8ae6ff8e9bea2ccd725e980541244521d8d4b5f3354a27babe", size = 5326287, upload-time = "2026-05-18T23:35:08.693Z" }, + { url = "https://files.pythonhosted.org/packages/af/57/3917ab0fd97f271a8694513581b8a36c655f111c446852c302f04ccdb6fc/numpy-2.4.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:7265a2f3d436e54ef9f2b52b5c937e6be778781bd97a590319d7348f1c1ca997", size = 6646763, upload-time = "2026-05-18T23:35:11.459Z" }, + { url = "https://files.pythonhosted.org/packages/eb/0f/037e64c494b67581ae18193d770adef354c41f3f2c8ebf865602d949bf8f/numpy-2.4.6-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f74a575920ab21fe304421a3fc28793d82e299cae9eccb37084e9fc7f3617c20", size = 15728070, upload-time = "2026-05-18T23:35:14.79Z" }, + { url = "https://files.pythonhosted.org/packages/21/a6/5d2bae9c9542eb4df16dc9c46dc79c186e9bad53805dfa5399a6023c6db0/numpy-2.4.6-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ede83e07a75dd06bc501566c1eca2afc0d61677c1472ac9ad93fdee6e638a48d", size = 16681752, upload-time = "2026-05-18T23:35:18.836Z" }, + { url = "https://files.pythonhosted.org/packages/92/14/23d1dfb410ae362cd59ce53e936b1513d545eb40db3949ced632e19a459e/numpy-2.4.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:68bb27509ac1b9a3443094260f6326150663b06abe40b73a2f81160623da5b67", size = 17086024, upload-time = "2026-05-18T23:35:22.52Z" }, + { url = "https://files.pythonhosted.org/packages/4b/6e/23595a2c642cdf3bc567877064bdd7f91c8b0038a4453cf2daf7248eafe9/numpy-2.4.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a0df0043bdb289bde1f62da130d20df23d58b45429f752bc7a8fc5325a225ecd", size = 18403398, upload-time = "2026-05-18T23:35:26.398Z" }, + { url = "https://files.pythonhosted.org/packages/8a/90/0ac3bc947217e66dec77e7cbc6a1979d1af70b6461b82f620d3bccd5e4c8/numpy-2.4.6-cp313-cp313t-win32.whl", hash = "sha256:29a287e0cf63ff528da061de6b9f64a4618da591ca1046aafc54062e40ca7eab", size = 6084971, upload-time = "2026-05-18T23:35:29.387Z" }, + { url = "https://files.pythonhosted.org/packages/77/71/5673e351671a1d2bd6063b91b44f70c0affea7d1516fa7a6572941ba4aa1/numpy-2.4.6-cp313-cp313t-win_amd64.whl", hash = "sha256:25c692919ac5a01f170a3bfcd62d745b24fd095c353d50812637d6fcab442e75", size = 12458532, upload-time = "2026-05-18T23:35:32.175Z" }, + { url = "https://files.pythonhosted.org/packages/3f/88/19d3503c5046e688f049274b27a3ef3d771152fa80d3ba3d01a3dff61abe/numpy-2.4.6-cp313-cp313t-win_arm64.whl", hash = "sha256:1e978ec1e8bd0e0e4de6bb75de9d30cbb74db6b6a2bb727618613703ca0167dd", size = 10291881, upload-time = "2026-05-18T23:35:35.465Z" }, + { url = "https://files.pythonhosted.org/packages/f8/91/3ab2044d05fd16d343c5ac2e69b127f1b2854040dd20b193257c78028bd3/numpy-2.4.6-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06ca2f61ec4385a07a6977c55ba998a4466c123642b4a32694d3128fce18c079", size = 16683458, upload-time = "2026-05-18T23:35:38.353Z" }, + { url = "https://files.pythonhosted.org/packages/8e/62/764ce66fa4147ae6d73071a3abf804ffe606f174618697c571acdf26a7c9/numpy-2.4.6-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:38efbc8de75c7a0fc1ac190162d892787f3f47b57cc291231aafee36b80982b7", size = 14704559, upload-time = "2026-05-18T23:35:42.14Z" }, + { url = "https://files.pythonhosted.org/packages/60/61/23f27c172f022e04025b7dc2367f4d63c1a398120607ec896228649a6f48/numpy-2.4.6-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:d581b735e177fdcdce6fed8e7e8880a3fb6ee4e3653a3ac6af01c6f4c03effc5", size = 5209716, upload-time = "2026-05-18T23:35:45.377Z" }, + { url = "https://files.pythonhosted.org/packages/03/71/21cf70dc6ea3e3acb95fc53a265b2fc248b981f0194ceb5b475271b8809d/numpy-2.4.6-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:0a041d3d761dc3c35cc56ce0351506a02bcbc25f7b169f652435141a17db9096", size = 6543947, upload-time = "2026-05-18T23:35:47.926Z" }, + { url = "https://files.pythonhosted.org/packages/d5/91/64288395ee1799bd2e0b04a305dce9666da90c961e1f3fe982a05ee1c036/numpy-2.4.6-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40fdc1ae7125e518ea98e53e69a4ebc27e1fd50510c47b7ea130cf21e5e1d42b", size = 15685197, upload-time = "2026-05-18T23:35:50.863Z" }, + { url = "https://files.pythonhosted.org/packages/f3/eb/ebffaa97dc55502df69584a8f0dcf07f69a3e0b3e2323670a2722db9aa39/numpy-2.4.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a2c306dea656c12c68f51f4cea133cbe78ca7435eb28c735eac1d3ebe73be6e8", size = 16638245, upload-time = "2026-05-18T23:35:54.752Z" }, + { url = "https://files.pythonhosted.org/packages/b8/0b/54f9da33128d7e350fab89c7455902eeae70349ee52bddb448dc4a576f45/numpy-2.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:33111801a01c12a8a1e3721f0a9232f8cfc8ae2c6b7098167e6f623c6073f402", size = 17036587, upload-time = "2026-05-18T23:35:58.355Z" }, + { url = "https://files.pythonhosted.org/packages/b6/f0/fdebc1052db1cc37c64beb22072d67cd6d1c71adca1299f53dec2b5e20d3/numpy-2.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ae506e6902902557576a26ff33eda8695e7ecb3cb36c3b573a0765dee114ebdb", size = 18363226, upload-time = "2026-05-18T23:36:02.845Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b4/298628d98c72b57e57f7165ae6a481a1deaf6f3c28262a6e4c739c275930/numpy-2.4.6-cp314-cp314-win32.whl", hash = "sha256:aaf159caa35993cb1f56fb9b8e4610d35758e7ca005412eb1daa856a78c9c4b1", size = 6010196, upload-time = "2026-05-18T23:36:05.92Z" }, + { url = "https://files.pythonhosted.org/packages/df/ac/46de6dda46478f7942f839e094970be2d4a861e005c4b3bf07c92e291a09/numpy-2.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:b507f5c4c1d508876d1819b6bf9a49d365b96320b5d4993426b33a23ca4b8261", size = 12450334, upload-time = "2026-05-18T23:36:09.107Z" }, + { url = "https://files.pythonhosted.org/packages/78/92/b8b798ac784102c0da830d2257d59358e3d3d90d1e2b3f2575dad976c5cf/numpy-2.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:6f41ae150c4e32db4f3310cdaf64b1593a03dbabe29eec77fc9b50fe64061df6", size = 10495678, upload-time = "2026-05-18T23:36:12.766Z" }, + { url = "https://files.pythonhosted.org/packages/30/34/ec28d1aa8115971537c01469ab2011ee96827930f0a124de1000cc2a7ed7/numpy-2.4.6-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ece3d2cfe132e7d51f44a832b303895e6f2d499c5e74dfbdb06ee246147a304a", size = 14823672, upload-time = "2026-05-18T23:36:16.473Z" }, + { url = "https://files.pythonhosted.org/packages/16/bd/f6d1fede4e54e8042a7ff97bb495510f3c220f94bcd9e8b228e87c92cc0d/numpy-2.4.6-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:e3e5193ef5a3dc73bceee50f7fdc2c90dbb76c42df8d8fae3d1067a583df579e", size = 5328731, upload-time = "2026-05-18T23:36:19.767Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f0/e105b9e2fd728a9910103884decd6951d9dd73896b914a98d9a231de02ee/numpy-2.4.6-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:17f9ade344e7d9b464a084d69bcf18fc691cb1db67c62ed80820bf4926d78f0e", size = 6649805, upload-time = "2026-05-18T23:36:22.266Z" }, + { url = "https://files.pythonhosted.org/packages/82/dd/1206a7ca6ab15e3f02069707ca96222e202af681bb73756da7527f3cb837/numpy-2.4.6-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cd5ffd25db4e7ba6a375693b3fc0fc1791ec636c17db3720da19bde7180ec43", size = 15730496, upload-time = "2026-05-18T23:36:25.713Z" }, + { url = "https://files.pythonhosted.org/packages/51/e7/38d3ea825dcab85a591734decb2f6c67caa7c8367d374df1a1c3842f9b07/numpy-2.4.6-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7d92c3819208a60205a12a245c91ad70cb0a85336659b19b834205573ac8456e", size = 16679616, upload-time = "2026-05-18T23:36:29.652Z" }, + { url = "https://files.pythonhosted.org/packages/93/b7/caabfdf53edf663e0b4eb74d7d405d83baef09eb5e83bcd32d601d72b93e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e85b752a1e912b70eaad4fafbd4d1238007ab221de2009b9a2f5ae7461239895", size = 17085145, upload-time = "2026-05-18T23:36:33.449Z" }, + { url = "https://files.pythonhosted.org/packages/f9/45/68d7c33a6bcf3e5aa3bdbd57a367e6f615286dfd6482f97e8ffeb734306e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:29cb7f67d10b479ff07c17d33e39f78c07f71c40ef30d63c153d340e96cd3fb4", size = 18403813, upload-time = "2026-05-18T23:36:37.369Z" }, + { url = "https://files.pythonhosted.org/packages/9c/50/0753655aa844c99cd9e018aacf76f130f1bd81d881bb74bc0aef5d73a8ba/numpy-2.4.6-cp314-cp314t-win32.whl", hash = "sha256:260a5d70215b61ab4fadf5c7baacd64821842975eea312125ed3c39a6391b063", size = 6156982, upload-time = "2026-05-18T23:36:40.817Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d4/7c67becf668f973cb490cec3e98dfd799d866f9c989a54d355672cfa0db6/numpy-2.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:81a1cca95ed5bb92aa8b10dd2cdc9a0d3853a50fad926c28b5d7e8ea54389627", size = 12638908, upload-time = "2026-05-18T23:36:43.996Z" }, + { url = "https://files.pythonhosted.org/packages/43/bb/e1c71a4295b1b1d1393d50dbb4f2a36283c6859d9d3892e84f00ec5a91d5/numpy-2.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:0c9136e14ed34a9e343a31c533d78a9813a69a3148332bce5e9821cb2f996e66", size = 10565867, upload-time = "2026-05-18T23:36:47.114Z" }, + { url = "https://files.pythonhosted.org/packages/de/12/b422cc84439adc0d00de605bf4a308890ae5c26f2c71fbd73e5d08fbb0dd/numpy-2.4.6-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:55cced7c52e981362f708ad635198e97a752dfba412cc03c23bbf3bd8d5cd662", size = 16847511, upload-time = "2026-05-18T23:36:50.673Z" }, + { url = "https://files.pythonhosted.org/packages/44/53/f481bef68011740f8849418d82db07230e825013f31f4eef5ba5b805316a/numpy-2.4.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6da64deb6b8ed903e7560180a92f2d804ee1ba5eeb849ac2748b8c1aba1f6d7", size = 14889064, upload-time = "2026-05-18T23:36:53.879Z" }, + { url = "https://files.pythonhosted.org/packages/7f/57/42ed575c10ced8af951d426bc4e1f8aff16fd851db33f067036215a7f860/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:68a5124b13fa6cc2086764a20005d30bc0548146f7f5322f02fce212ca14317f", size = 5394157, upload-time = "2026-05-18T23:36:57.194Z" }, + { url = "https://files.pythonhosted.org/packages/6a/ef/f66cc724fcc36c1e364c67f51ae9146090b8b584f27d58b97fdae3edd737/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:948424b06129ce883307e8cff868c31396d8dc7630a59c61d70d98dbe70f222c", size = 6708728, upload-time = "2026-05-18T23:36:59.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/9c/c531f2293b91265d8b48e9b329f54fdd7ffae73cb4134ea10cca4237e9cc/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5dbbdb29840ca3d91ee0fece42fc29278886d908280bfec0a5846c6f901a3eb0", size = 15798374, upload-time = "2026-05-18T23:37:02.674Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b0/413077f6b1153ed3cba361401c6783bbad6114804a000cc22eb71c13e190/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ad03c0965fb3c692200e74d458ca28c1dbb4ce96f9a479a8aa041ad5fabca02", size = 16747286, upload-time = "2026-05-18T23:37:06.327Z" }, + { url = "https://files.pythonhosted.org/packages/15/ce/e5ec180bc41812edcd8daeb8639d205622c0e8c02259d8ab25a0201b3c2a/numpy-2.4.6-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:2803abfebfc990042cd494d8ce2d5f82e9d847af6d35ec486923aa19dbad5e73", size = 12504263, upload-time = "2026-05-18T23:37:09.715Z" }, +] + +[[package]] +name = "numpy" +version = "2.5.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", +] +sdist = { url = "https://files.pythonhosted.org/packages/13/01/11703282db468b85f6f7b8c7f22d058de5970d5c7e60a3a8aaa313c3de36/numpy-2.5.3.tar.gz", hash = "sha256:df2d5874ff183595a4ba404edd04f6bd9b5505c1d7708573f6a6c17489a67563", size = 20791231, upload-time = "2026-09-06T16:27:47.073Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d6/50/8fdbb16af64895706a45f06a4068e29db732ec180f3c1375f14123359138/numpy-2.5.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb189f09db39283b26bfd061ec16189e14f71c6755207f72a0f7540867afe5b9", size = 16994982, upload-time = "2026-09-06T16:24:29.244Z" }, + { url = "https://files.pythonhosted.org/packages/60/39/789131c1188c078dcb3a1692e72e1e050c68b88ffe72c9ccaac9bcd7a9cd/numpy-2.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f59a878c33d6b88122d80d239bb3b845d58708750b0cb06a09aebb9b18ec696c", size = 12009327, upload-time = "2026-09-06T16:24:32.491Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/a312e95696e5f601914dd8b6dd844692ba61670807417e24b68e337b5c70/numpy-2.5.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:a72f874bc9e10e4b8f80426fb49716d5141f64442a0c8418065093ec8017fbb0", size = 5445405, upload-time = "2026-09-06T16:24:35.071Z" }, + { url = "https://files.pythonhosted.org/packages/30/d0/5623a1707ed4fe16e3909fe3cf5ee3da004ae677ad23d83bbf3adf1a6faf/numpy-2.5.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:fc36dc566135b5eceec4cf89758fcb719266a019ef07dae1754ae7c9f617ef3e", size = 6783213, upload-time = "2026-09-06T16:24:37.253Z" }, + { url = "https://files.pythonhosted.org/packages/f1/32/84146fc020ad3c25f805f70ab60da46fe3c540a21369754a7e4369754b6f/numpy-2.5.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:76c2c1e6bfa5c84adc6434dfbf013aa92096a7985221762c8f11fedfd20fff58", size = 15687872, upload-time = "2026-09-06T16:24:39.751Z" }, + { url = "https://files.pythonhosted.org/packages/65/af/aa78d1a88805456e212b65461354cd943197fb9acecc4c90fd12295123a3/numpy-2.5.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7e18c623bb5c95acb3b3328861272816ba199fb531921c5d6d0b675f1fde9e3", size = 16717410, upload-time = "2026-09-06T16:24:42.745Z" }, + { url = "https://files.pythonhosted.org/packages/3b/24/faa79d865e69a97ba17473b23a1b74094b2259c03e820c70297293b9ea49/numpy-2.5.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4f8929ee6c96bfbd7b4ed2032e0c03af86fe1826740ab61ddabf9072d06e57ff", size = 17040975, upload-time = "2026-09-06T16:24:45.961Z" }, + { url = "https://files.pythonhosted.org/packages/62/4a/8877e629445a7176297dffcaf9c485faa96a95d81728a62521ad55bd4c0f/numpy-2.5.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b5d93cf48f687479941d12b69c873ad2cc76bbd487f0091c2200636497f34034", size = 18476479, upload-time = "2026-09-06T16:24:49.35Z" }, + { url = "https://files.pythonhosted.org/packages/c8/db/35e1c2d38b04cbd5b731f9d71495e055e813197669d22b612f11748d2ff9/numpy-2.5.3-cp312-cp312-win32.whl", hash = "sha256:bf63afbe037eb5d2fe87fbcc7778e61da53ebaf21d938a4515aa73b62532a5d4", size = 6133378, upload-time = "2026-09-06T16:24:51.915Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a1/accf6d4f0c80c5d9ba9735d6b1550e444180599f34dec69ca01360f717ad/numpy-2.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0a59a421a32580a009e8a1751345bf829631b990dc1794b80514ab722b435def", size = 12567828, upload-time = "2026-09-06T16:24:54.255Z" }, + { url = "https://files.pythonhosted.org/packages/22/43/1764aff32e4652526ae2f71fa8b3efd8d25c8a3d6926914454e47138ed1e/numpy-2.5.3-cp312-cp312-win_arm64.whl", hash = "sha256:ccb32e0525d29e8b0572eb84c9a57af0e7a4e615726927506f55063c62414034", size = 10485432, upload-time = "2026-09-06T16:24:57.278Z" }, + { url = "https://files.pythonhosted.org/packages/79/e5/8fb89cd46d14e35699d13bf943a5f5f441ecee8667120a1f6105ab89e349/numpy-2.5.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:66a78fe4556c60aceda5916f9eacd638b18e9e681016ec302dcb4682d6d4d034", size = 16991061, upload-time = "2026-09-06T16:25:00.411Z" }, + { url = "https://files.pythonhosted.org/packages/2f/06/9dc9e48b5e5e941c8b10350c5ff2d721da42a20517d911d15544246775ff/numpy-2.5.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92f30e89b8ee0ecf363033576c422b2f58fed6a80bed0aa48dff6d14c654663e", size = 12003676, upload-time = "2026-09-06T16:25:03.475Z" }, + { url = "https://files.pythonhosted.org/packages/ab/2a/98282aa5b8f58b1157d440bb6282eed47e3632a5de53a714fbab17e659fe/numpy-2.5.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f9a2353b37a1a9e78fd82b27ad7e2a32a2d036604d18f02b05e3136c62ca3b09", size = 5439695, upload-time = "2026-09-06T16:25:05.978Z" }, + { url = "https://files.pythonhosted.org/packages/a1/f9/b6533d777be9d6ffd29dc1be0867e563e6e8cc9a220ff1b716adc317f060/numpy-2.5.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:ccbc4665079665c3cf3bab4db9f6b095370cd6437d66be549b6c2a1fd19e1958", size = 6779395, upload-time = "2026-09-06T16:25:08.599Z" }, + { url = "https://files.pythonhosted.org/packages/73/85/735720d04ec197c5dcfacdfc9922667c7f1f5f496a279b7ba4d7c74c4cc7/numpy-2.5.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c76d5dde9f445058f83d0c02af00557a4db91de9a9a57c0df87d1535001d654b", size = 15681750, upload-time = "2026-09-06T16:25:11.173Z" }, + { url = "https://files.pythonhosted.org/packages/3a/1b/3b16a9bc514a440a7a0883684111dcb1ef1aee960af2ca95da8fc775f124/numpy-2.5.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a5fa86b80fd24bcd1aff83ad23be44ea323de3f787be8f8b15d4a65621e25321", size = 16708577, upload-time = "2026-09-06T16:25:14.171Z" }, + { url = "https://files.pythonhosted.org/packages/69/c4/386f397831b07328b639c96c5b62719346cf4baf07c68d927239752b1534/numpy-2.5.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bd4cb9ad3c7889b9b3fe0a9a9fb5d2ed26f9879bff2608d9f01aed147a20d231", size = 17042047, upload-time = "2026-09-06T16:25:17.582Z" }, + { url = "https://files.pythonhosted.org/packages/5f/3e/a700ecbf36e85ae8328fd3b0e12eeddc22ed6358a64cb2bd913e0d195d65/numpy-2.5.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1302b90c0e52281681b2975adfe8a860cb7b12216a27b4b0b4207c44bf7bccf0", size = 18465724, upload-time = "2026-09-06T16:25:20.949Z" }, + { url = "https://files.pythonhosted.org/packages/41/ee/38e785e88a4045f6ad1d1f2808dcdfafdca48c760260c0587bf171e29fc9/numpy-2.5.3-cp313-cp313-win32.whl", hash = "sha256:1c80eabb4035ecf4ca9cd49cde8a9fdd69a729e63e6474887d1523ade7aa277f", size = 6129003, upload-time = "2026-09-06T16:25:23.664Z" }, + { url = "https://files.pythonhosted.org/packages/f3/ec/100f2b1794ede74a9b3d7ec6b9736927f56713414c1dfe19ab6c383494bf/numpy-2.5.3-cp313-cp313-win_amd64.whl", hash = "sha256:71cad2b2a7451ab79d8f5e71b453485b6775963d5cf794179144a7463fe6e8ec", size = 12560965, upload-time = "2026-09-06T16:25:26.602Z" }, + { url = "https://files.pythonhosted.org/packages/80/b1/7dc825ca94c12acebbce4c37caa5e198695eb31424bc579679f32b1bb49d/numpy-2.5.3-cp313-cp313-win_arm64.whl", hash = "sha256:8e4dd766076855b5ff7ea52fa5f07ce26286726e0f8bff446b7739d02e6ea204", size = 10482343, upload-time = "2026-09-06T16:25:29.772Z" }, + { url = "https://files.pythonhosted.org/packages/70/78/cf416f15dc29375a229d9dfebf8db6e313f291580b39fa1a568b6052bb07/numpy-2.5.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:350ba9783ce969cf9f7ce6e6a9a58e1a6e2a19ca025b7ee448c4db727706212a", size = 16998686, upload-time = "2026-09-06T16:25:33.171Z" }, + { url = "https://files.pythonhosted.org/packages/9e/59/abcc2d8def4fd60eec7d87f92d27c13448ffd9ab14339bcc63a0d7a2fdea/numpy-2.5.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:012e66aca395d795496446e52aeeb5866312a5d4d3f27da270e5a0b43f70dc5c", size = 12013862, upload-time = "2026-09-06T16:25:36.748Z" }, + { url = "https://files.pythonhosted.org/packages/94/75/4640d2d6e4b64a049e48425a82728a41ef4adb61332d2cba68055774878b/numpy-2.5.3-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:adc1ada2662f8a5f960b8a10d9986897e7499ef07e06d4cfe7197f8cce923c07", size = 5449793, upload-time = "2026-09-06T16:25:39.476Z" }, + { url = "https://files.pythonhosted.org/packages/96/cd/625b57ae33d4ca560f32cc0b47b4a5922146d9beb998ddf773900d440a73/numpy-2.5.3-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:54a115e5a73b8fc44f0cebef486365a1894b5c9760685d4558b72b7c3eb846e0", size = 6785176, upload-time = "2026-09-06T16:25:42.069Z" }, + { url = "https://files.pythonhosted.org/packages/9c/72/12918652e7912ef9751e8694c88820fcd1908e0618cb23f5f3caa6004b7b/numpy-2.5.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be5a8381859b6da607c84f4f7d6847725f1cf1853ef8a2c9e115b7d58bef47dc", size = 15703377, upload-time = "2026-09-06T16:25:45.135Z" }, + { url = "https://files.pythonhosted.org/packages/45/8f/9beacf79ca7c650688ad0baa80931adb988fe6e6e5d5903c23cc3dbd70eb/numpy-2.5.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b0521d0f4aebb6e06189451025fa17a913287b13c03d5fe05c017333b654ea5b", size = 16711928, upload-time = "2026-09-06T16:25:48.461Z" }, + { url = "https://files.pythonhosted.org/packages/09/8d/41d0a56e1ac4c87495c897a211b1368691b7237aadabec8b3b8f3a74d48f/numpy-2.5.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9deb49575e5b0b94ed72c8a64ec4d033381adc27e9060ae842971f697ba96104", size = 17059507, upload-time = "2026-09-06T16:25:51.873Z" }, + { url = "https://files.pythonhosted.org/packages/08/1e/0dfbc5cc251d54e2af790f254d24ec38637fa97ec7d5d11de7ffed787098/numpy-2.5.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b00eefbcf0f292945c4b4dec2ae845389ef5bcdcd596e6e4328051db5b5ba694", size = 18471002, upload-time = "2026-09-06T16:25:55.233Z" }, + { url = "https://files.pythonhosted.org/packages/b5/2c/dfa40f6991f8185c8c30ffd023dfcbb11888e823cfab9557b920f3bb7bed/numpy-2.5.3-cp314-cp314-win32.whl", hash = "sha256:c2381f82999704f818e2c987a865050e285ec3621262c66d40f5a96c8f899f8e", size = 6180485, upload-time = "2026-09-06T16:25:58.157Z" }, + { url = "https://files.pythonhosted.org/packages/a4/73/d2c08231e4fde7e415501fd02c715d96e98599b2d8384445933944152984/numpy-2.5.3-cp314-cp314-win_amd64.whl", hash = "sha256:2c25dfa72943e4336ddb6b0ee4277b47a0c85bede0807530ec68103bf58e2c10", size = 12698179, upload-time = "2026-09-06T16:26:00.789Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e9/dcdcc9b95cf5f49815055573aee1b11cfbf5299f38a180e437ded050810f/numpy-2.5.3-cp314-cp314-win_arm64.whl", hash = "sha256:15aa985ac73a8db02db7663381aa109510449d3819d37206caed27b33a65a8a6", size = 10769383, upload-time = "2026-09-06T16:26:04.011Z" }, + { url = "https://files.pythonhosted.org/packages/49/c4/af8bc08a7ef4e1529a7c0cf24969accce316b783999802089a581ec99272/numpy-2.5.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ac7bb1c52d445bd4f8f7f97fefe6abc3a084dc4d63df50d79b17fa2b78e89297", size = 12132668, upload-time = "2026-09-06T16:26:07.138Z" }, + { url = "https://files.pythonhosted.org/packages/c5/ae/0f15eb56d4ec5e13c1f7ff04ff407f997d1acbadb45d3e1f2e2645a8f43c/numpy-2.5.3-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:e6ab667ba76450084eb64013762c438ea76d9d29cc676dcd6c2e9892ba37f841", size = 5568580, upload-time = "2026-09-06T16:26:09.828Z" }, + { url = "https://files.pythonhosted.org/packages/23/fb/c72a8f25d4b6e96c354e7ab45ace3b27dc11e5d6a13b6c7d0cd6b08bf112/numpy-2.5.3-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:f7fabeb6cea87d65f3b926de33d03fb016cfdc29314c90974383b5582ae72891", size = 6882634, upload-time = "2026-09-06T16:26:12.524Z" }, + { url = "https://files.pythonhosted.org/packages/07/a9/968c90ed2ab15060c338e8137f1215b5a60756ae07328e0a60d1c6734df4/numpy-2.5.3-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1fb6f8fb9ff0b3a69f52c66ce397b0246583e9f28616231b0e32ca49259a5fa6", size = 15748923, upload-time = "2026-09-06T16:26:15.092Z" }, + { url = "https://files.pythonhosted.org/packages/59/08/9df04103947b95e3b6b1f2ed1a70521f325647a31b82da6a2aae3a485508/numpy-2.5.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93e1f5447e2b1e479d7bd74701e84746b86450cff1fc368b132d195e2b8f8211", size = 16746748, upload-time = "2026-09-06T16:26:18.43Z" }, + { url = "https://files.pythonhosted.org/packages/41/a0/14c8d5fe5b53a334aabb653deb391c0fef49558f491880ea300ed6785224/numpy-2.5.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c00abe94c1a69d75d827dcf1c025b25c8a45d230b3bcd77a9020883a1b047653", size = 17111561, upload-time = "2026-09-06T16:26:22.113Z" }, + { url = "https://files.pythonhosted.org/packages/c4/a6/d7e96e42f01522e154c32489640f16dfc4f6181d165d05fc3bec8c2c4999/numpy-2.5.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:536f963710a4e63934d80ac0dc4f478804a83e9a84b6828018f25d09953ada33", size = 18513945, upload-time = "2026-09-06T16:26:25.401Z" }, + { url = "https://files.pythonhosted.org/packages/25/39/3453afb7119d0449ef11c886874120ff180e2c337760e0e2d88f70f1a945/numpy-2.5.3-cp314-cp314t-win32.whl", hash = "sha256:4c8a6d2ebce6305fd82fbefca827775437147052a976ee7c94b36a0c1b52ac6c", size = 6335421, upload-time = "2026-09-06T16:26:28.175Z" }, + { url = "https://files.pythonhosted.org/packages/99/01/22815d2b19a1a746b1d45205cffebb3fe511a18acb75fba6c88491fc9894/numpy-2.5.3-cp314-cp314t-win_amd64.whl", hash = "sha256:9a37475425b431b4d060f23b4f52cd2f3aef6bc7c654bd760adf0040eec9d435", size = 12896420, upload-time = "2026-09-06T16:26:31.265Z" }, + { url = "https://files.pythonhosted.org/packages/fa/ee/a7cbba67eeaff038dc29ca8b98a88396c8b0cc9c89d4924f4a27a5c9150b/numpy-2.5.3-cp314-cp314t-win_arm64.whl", hash = "sha256:2d8240cb4c16fd831074aa2b2cf9fc54664d826341d61c372245b96a74a49a9a", size = 10857177, upload-time = "2026-09-06T16:26:34.167Z" }, + { url = "https://files.pythonhosted.org/packages/45/56/78194492883ff5eec90423fe56a3a44b154da047d88a6307f629713c584f/numpy-2.5.3-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:a6391fafaba97500887132cd582abc6e19452b1ac775a47caa7b24490e152058", size = 16996531, upload-time = "2026-09-06T16:26:37.287Z" }, + { url = "https://files.pythonhosted.org/packages/11/39/dd55c0af90bbab564b09ae3b0aa60ec5c02b900fa4f1ba23440525c8b32d/numpy-2.5.3-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:09d5a423c71ad5feb5625844ad58050e35df43871004b52ac9c0ad44a56775be", size = 12012569, upload-time = "2026-09-06T16:26:40.707Z" }, + { url = "https://files.pythonhosted.org/packages/b6/51/04f67d32e4862b281b1cb84ceeaed3421189a84fb6fb51a391cd6d5009f7/numpy-2.5.3-cp315-cp315-macosx_14_0_arm64.whl", hash = "sha256:f9579f383d1bf9df80081e72760e84960a7fd4f88cf0c9e535a8597c9bb646f5", size = 5448498, upload-time = "2026-09-06T16:26:43.435Z" }, + { url = "https://files.pythonhosted.org/packages/a3/c9/25b4dc0dd1344ec26c7319e84fd4e9809d2b5628f4e12decd618036e5178/numpy-2.5.3-cp315-cp315-macosx_14_0_x86_64.whl", hash = "sha256:86bff898a431c0fb71f7610b75726e75a54d47b37edc9d537f48de63bb3c0b90", size = 6783026, upload-time = "2026-09-06T16:26:46.374Z" }, + { url = "https://files.pythonhosted.org/packages/fc/c7/29285be1e5232a6e7ee3268a33c85843f5a8ee93350c6465cddd66ebbf76/numpy-2.5.3-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f3ed25271581281f2fccb1adcedfcde4c07362eec69189b50baf6f90e3ae159", size = 15697322, upload-time = "2026-09-06T16:26:49.415Z" }, + { url = "https://files.pythonhosted.org/packages/55/49/bbad5335fb4996a16881f853ff3e0ba582f01720e55c89b1c06b8fc42a90/numpy-2.5.3-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ffdc76bfcae6b255dff75202c5e7feaf95b40246bc0a17944facc1fecf9f79ab", size = 16708995, upload-time = "2026-09-06T16:26:53.127Z" }, + { url = "https://files.pythonhosted.org/packages/ef/e9/1df35483760b04a65ea44669f89dc64f30e5aca098b48ceb8b1310b0e0fe/numpy-2.5.3-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:116f96cadd935c6122e9228d676fe7ede19e741f5c8bb1c3cddbe0c51ccebea2", size = 17052508, upload-time = "2026-09-06T16:26:56.464Z" }, + { url = "https://files.pythonhosted.org/packages/b8/99/66e54da8265cc8be8a7382bf96edce17aaa2837d6f484432025932a3caa5/numpy-2.5.3-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:09ffa5d903faeaa5c4dd05009cf81c8bab9f2cb37c548b8d39b65b4cfa7c97f7", size = 18468224, upload-time = "2026-09-06T16:26:59.966Z" }, + { url = "https://files.pythonhosted.org/packages/01/bc/b5e90a91c115168d793dfd2ad9c69c438c2fe7a13a437e770bc5b078e732/numpy-2.5.3-cp315-cp315-win32.whl", hash = "sha256:e01c918ac3d48e18a927cf7b14a26a3e29ff2bdf2eacb976da0aecd6a43ed034", size = 6179919, upload-time = "2026-09-06T16:27:03.166Z" }, + { url = "https://files.pythonhosted.org/packages/37/ea/780748fd3985109075514ef8fc64cd25f943e40dde13a6d59141eb268fc8/numpy-2.5.3-cp315-cp315-win_amd64.whl", hash = "sha256:e931e4f499e0dc7ef29d269a8e5b35dd722e5d14be07df6240166ea7c6532fae", size = 12697656, upload-time = "2026-09-06T16:27:06.153Z" }, + { url = "https://files.pythonhosted.org/packages/b3/16/407be69a2a87c8cab64d95975a8977a426a29e138f07e276ec258f0fe4e5/numpy-2.5.3-cp315-cp315-win_arm64.whl", hash = "sha256:26e15e4aecd8617dfbaecb37d223e365d7b39411fba20454be2670a96aa74cb5", size = 10767601, upload-time = "2026-09-06T16:27:09.297Z" }, + { url = "https://files.pythonhosted.org/packages/44/bf/a97ffb01e41d50a32a9177aef942a4d0e389a3daf451d04e5f38ef6afb87/numpy-2.5.3-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:6cef4bb1706dfec49243c05d921eefb4e190d41e2528b30d8035ea1f36b4c24a", size = 17090092, upload-time = "2026-09-06T16:27:12.907Z" }, + { url = "https://files.pythonhosted.org/packages/d1/24/136c02f2c2af9a067a84d0c3aa10c99012c0476fa5066732fa4a4202557d/numpy-2.5.3-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:d1c89973648c85069c5046ad460f7b8a00218b29a2e42359ac8cc63e9ab94832", size = 12129429, upload-time = "2026-09-06T16:27:16.089Z" }, + { url = "https://files.pythonhosted.org/packages/fe/6c/b47582d6597789bf946d5efbeb6b9e56fd8bcbd5efc6fbf51dbe1ea31eb3/numpy-2.5.3-cp315-cp315t-macosx_14_0_arm64.whl", hash = "sha256:214045a5bf00113a146ab9ee9730c44501af6723cdf1f6830932f7b5ef2e7af0", size = 5565452, upload-time = "2026-09-06T16:27:19.868Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/ef3cc6da73774202d4deae16bb321fd8298a4e0561e3539f8c4be237d916/numpy-2.5.3-cp315-cp315t-macosx_14_0_x86_64.whl", hash = "sha256:8617bbfae4486cf99c9f899966699428d19da931d06ca94ad3da986c76e15997", size = 6876736, upload-time = "2026-09-06T16:27:22.232Z" }, + { url = "https://files.pythonhosted.org/packages/9e/24/e3813329498596cb842703dcacac1741612ed9fb9c4e6a3e0c7e2ebbc597/numpy-2.5.3-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:595d020938c84e320bcf40ad71089e108eac0d377cd018e14a8c094f39e98d85", size = 15745777, upload-time = "2026-09-06T16:27:25.181Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9e/4e7a07fd0776dc2210cdacf2010be8665194d094defc10c419d7dea794cc/numpy-2.5.3-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f24021b9f22bc6301c37b196974a92c1c18dccedb6fef3dd252e95f2d6adbe4", size = 16746949, upload-time = "2026-09-06T16:27:28.576Z" }, + { url = "https://files.pythonhosted.org/packages/91/db/01674c0e20335057813a00c2ebd546ed25bff9ed7914f9bced00f8c55d94/numpy-2.5.3-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:71b39d9f935b6ec0f8753e3e2afb51e3efba6f2e05b68b32a40754d24bcd4a3c", size = 17108994, upload-time = "2026-09-06T16:27:31.946Z" }, + { url = "https://files.pythonhosted.org/packages/45/7a/584c5e71f8d378e57cac0b033891ed65c683ef90573ba4854e8c28203db0/numpy-2.5.3-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:6b05c171afb3aa07adbd20abc00aea86fe375beb0fdb9ef780ec5b7f63bab1c0", size = 18512266, upload-time = "2026-09-06T16:27:35.196Z" }, + { url = "https://files.pythonhosted.org/packages/a1/d2/4e1014173aa3c55e6a756e0e567290743a6ab33a288460374d7ef6bcd239/numpy-2.5.3-cp315-cp315t-win32.whl", hash = "sha256:f54660b0eb6b0b9f36e7fe1cdfdff472028dd0d14acd9b9b65098efbad059469", size = 6330292, upload-time = "2026-09-06T16:27:38.149Z" }, + { url = "https://files.pythonhosted.org/packages/6c/b0/ff5658a58199b7bcaad87bf260eef6713d9d42cca4e028f935b4fc5fbac6/numpy-2.5.3-cp315-cp315t-win_amd64.whl", hash = "sha256:1aad64d99730d013cfc6debafed22783b4fc5a7f4b8bc744d2d8cf7dcc880551", size = 12884918, upload-time = "2026-09-06T16:27:40.965Z" }, + { url = "https://files.pythonhosted.org/packages/fb/0b/b12a2df5d1b774bd9007a6fdff9381145b6223d37f11afc9c37ab0efd9a1/numpy-2.5.3-cp315-cp315t-win_arm64.whl", hash = "sha256:befa1ae5bd6030b3f512b43ff3fa5290bbed6b84411a44244b14adf835f5b89d", size = 10850807, upload-time = "2026-09-06T16:27:43.868Z" }, +] + +[[package]] +name = "opencv-python-headless" +version = "4.14.0.94" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, + { name = "numpy", version = "2.5.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/67/8a/51ff1c6287be0b6cd3070cf095875da4ff7d6eda38507e6ada5608786a78/opencv_python_headless-4.14.0.94.tar.gz", hash = "sha256:4afa2ea1214453648be88259f035712454faa9039b686de7753569ba8eec1577", size = 96405664, upload-time = "2026-07-28T19:23:48.758Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/56/12f9b05628cf4ab6aad54479b9124f7c1f2f92b6a4e47c071beb63d926a2/opencv_python_headless-4.14.0.94-cp37-abi3-macosx_13_0_arm64.whl", hash = "sha256:bc7db37dc234f7bb3190a158fd9dd750357246fc7d8adb23698843ef721a993b", size = 46491231, upload-time = "2026-07-29T03:52:11.902Z" }, + { url = "https://files.pythonhosted.org/packages/23/3b/2f9c42466f62aa27e97aaf6c9d914008895ecde28013ba4beed7f541f593/opencv_python_headless-4.14.0.94-cp37-abi3-macosx_14_0_x86_64.whl", hash = "sha256:1777f43c9fa064f54b916ad70d944b4fde0a644a17e49f04a966bb24a4b5f1e1", size = 33084176, upload-time = "2026-07-28T20:05:59.902Z" }, + { url = "https://files.pythonhosted.org/packages/7d/91/83c51e3fe000b5dfce4f3be5c5d320e07ebab5c1742abc4e45674503f90f/opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:29714d7716dbfddf9fec20ffb878765e94ccaecd7d3ebd6750877420296e2dc5", size = 35405458, upload-time = "2026-07-28T19:19:29.997Z" }, + { url = "https://files.pythonhosted.org/packages/de/06/14c8c5d331bc72738683a9b227966aceaa4c6d08752f33d64578aebcb6f8/opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5e02669eac0ba67b2a22d7245af1e8ee1a2ef1185ee526a063d8f0555224bd52", size = 57534165, upload-time = "2026-07-28T19:19:52.742Z" }, + { url = "https://files.pythonhosted.org/packages/3f/0e/0b98bd582582253f61c4506f9b465cf5a8aa7fa4f7237dd99e1b5151a159/opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:97c6e818c6f71c0cfa214e12293b1d0266d679c38f4e086de08357c8ac6ece0d", size = 38104309, upload-time = "2026-07-28T19:20:08.818Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ce/7f538891722a4f06921419d55bac6f41729258d54442861edb2de0dbdf5e/opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:211e581f5a4670acbbe08fff36a35e9946039d2eea28b80394632d036d1be527", size = 61960165, upload-time = "2026-07-28T19:20:33.074Z" }, + { url = "https://files.pythonhosted.org/packages/e9/91/ded03abad74d7264fa6bc7c923d7cade6f94a9023eeb372cfad54c2d0334/opencv_python_headless-4.14.0.94-cp37-abi3-win32.whl", hash = "sha256:f70296aa7ac9d7ade0d925c43fdc006c83e20a23f30e2f40f1b82c74a7a54460", size = 33030271, upload-time = "2026-07-28T18:32:39.447Z" }, + { url = "https://files.pythonhosted.org/packages/ad/8d/db8673846ee53cbb5de4c2b4decc11cf733e203eb7d5146297869f69bd48/opencv_python_headless-4.14.0.94-cp37-abi3-win_amd64.whl", hash = "sha256:cbed65415b8f6a9541c705afe3e64795840524d0ff3bc58f507826284a1dc64b", size = 41028030, upload-time = "2026-07-28T18:32:36.724Z" }, +] + +[[package]] +name = "packaging" +version = "26.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, +] + +[[package]] +name = "pexpect" +version = "4.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ptyprocess" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, +] + +[[package]] +name = "pygments" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pytest" +version = "8.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, +] + +[[package]] +name = "python-daemon" +version = "3.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "lockfile" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/37/4f10e37bdabc058a32989da2daf29e57dc59dbc5395497f3d36d5f5e2694/python_daemon-3.1.2.tar.gz", hash = "sha256:f7b04335adc473de877f5117e26d5f1142f4c9f7cd765408f0877757be5afbf4", size = 71576, upload-time = "2024-12-03T08:41:07.843Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/3c/b88167e2d6785c0e781ee5d498b07472aeb9b6765da3b19e7cc9e0813841/python_daemon-3.1.2-py3-none-any.whl", hash = "sha256:b906833cef63502994ad48e2eab213259ed9bb18d54fa8774dcba2ff7864cec6", size = 30872, upload-time = "2024-12-03T08:41:03.322Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +]