Add phase 2 - download default branch commits for repositories collected in phase 1
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user