1
0

Add phase 2 - download default branch commits for repositories collected in phase 1

This commit is contained in:
HBrahmbhatt
2026-04-23 19:16:50 -07:00
parent 96906ee00f
commit 98696ddb29
18 changed files with 991 additions and 381 deletions

View File

@@ -5,8 +5,12 @@ from pathlib import Path
import requests
from github_datapipe.config import GithubConfig
from github_datapipe.extract_repos import SampleReposOptions, resolve_query, sample_repositories
from github_datapipe.core.config import GithubConfig
from github_datapipe.phases.phase1_repository_sampling.service import (
SampleReposOptions,
resolve_query,
sample_repositories,
)
def test_resolve_query_uses_default_when_missing() -> None:
@@ -49,7 +53,7 @@ def test_sample_repositories_dedupes_and_persists(monkeypatch, tmp_path: Path) -
return {"total_count": 3, "items": [fake_repo(102, "owner/repo-three")]}
# Inject the mock sampler into the main code
monkeypatch.setattr("github_datapipe.extract_repos.GithubRepoSampler", FakeSampler)
monkeypatch.setattr("github_datapipe.phases.phase1_repository_sampling.service.GithubApiClient", FakeSampler)
options = SampleReposOptions(
count=3,