Skip to content

test: restore basic_profile.json test fixture (#106) - #669

Open
michellejtan wants to merge 11 commits into
ascherj:mainfrom
michellejtan:test/106-restore-basic-profile-fixture
Open

test: restore basic_profile.json test fixture (#106)#669
michellejtan wants to merge 11 commits into
ascherj:mainfrom
michellejtan:test/106-restore-basic-profile-fixture

Conversation

@michellejtan

@michellejtan michellejtan commented Aug 3, 2026

Copy link
Copy Markdown

Summary

Restores the missing tests/fixtures/sample_profiles/basic_profile.json test fixture referenced by scripts/run_evals.py and scripts/issues_manifest.json (#106). The fixture is a realistic fake portfolio (GitHub username, resume text, two repos) shaped to match what the ingestion parsers (ResumeParser, RepoAnalyzer, ReadmeParser) actually consume, so it's immediately useful if a future test wires it up rather than an arbitrary shape.

Issue

Closes #106

Changes

  • Add tests/fixtures/sample_profiles/basic_profile.json — a fake profile with github_username, resume_filename, resume_text (using section headings like Summary/Technical Skills/Experience/Education so it exercises ResumeParser's section detection), portfolio_url, and exactly two repos entries shaped like GitHub API metadata (name, description, html_url, language, stargazers_count, forks_count, open_issues_count, pushed_at, readme_content with real markdown headings).
  • Add a sample_profile_data fixture to tests/conftest.py that loads the JSON file, following the existing pattern of sample_resume_text/sample_readme_text.
  • Add tests/unit/test_fixtures.py with a test proving the fixture loads correctly and has the expected shape (profile fields present, exactly two repos, each repo has name/html_url/readme_content).

Testing

  • Unit tests pass (make test-unit)
  • Integration tests pass (make test-integration) — not applicable, no integration tests reference this fixture yet
  • Linter passes (make lint)
  • Type checker passes (make typecheck)
  • New/updated tests cover the changes

All checks passed locally:

  • Unit tests: 53 pre-existing failures remain unchanged; new test in
    tests/unit/test_fixtures.py passes
  • Integration tests: Not applicable
  • Linting: No new errors introduced (182 pre-existing errors unchanged)
  • Type checking: Passes

To manually verify:

  1. Check out this branch and run pytest tests/unit/test_fixtures.py -v
    confirm test_sample_profile_data_shape (or your actual test name) passes.
  2. Open tests/fixtures/sample_profiles/basic_profile.json and confirm it
    contains a GitHub username, resume text with section headings (Summary,
    Technical Skills, Experience, Education), and exactly two repo entries
    with GitHub API-style fields (html_url, language, stargazers_count,
    etc.).
  3. Run python -c "import json; d = json.load(open('tests/fixtures/sample_profiles/basic_profile.json')); print(d.keys())"
    to confirm the top-level keys match what sample_profile_data in
    tests/conftest.py expects.

Pre-existing failures (unrelated to this change)

Before starting, I ran make test-unit and make check on main to establish a baseline:

  • make test-unit: 53 pre-existing failures (e.g. test_bias_detector.py, test_pii_scrubber.py, test_review_service.py, test_resume_parser.py, test_readme_parser.py, test_tech_detector.py, and others), 376 passing.
  • make check: 182 pre-existing lint errors, none in files this PR touches.

I verified these are unrelated to this fix by stashing my changes and re-running both commands — the failure/error counts were identical with and without my changes applied.

After my changes:

  • make test-unit: same 53 pre-existing failures, plus my new test passes.
  • make check: still exactly 182 pre-existing lint errors — zero new errors introduced. tests/conftest.py and tests/unit/test_fixtures.py pass lint, format, and mypy individually.

This PR does not fix these pre-existing issues (out of scope for #106) but does not introduce any new failures either.

Screenshots / Demo

N/A — test fixture only, no UI change.

Notes for Reviewers

  • No integration test currently consumes this fixture — scripts/run_evals.py has a TODO referencing tests/fixtures/sample_profiles/ for future benchmark portfolios, but wiring that up is out of scope here.
  • I chose to shape the two repo entries like raw GitHub API metadata (html_url, stargazers_count, etc.) rather than matching the IngestedSource DB model, since that's the layer RepoAnalyzer.parse() and ingest_repo_metadata() actually consume before mapping into DB rows. Flagging in case a different shape is expected.

@michellejtan
michellejtan marked this pull request as draft August 3, 2026 06:23
@michellejtan
michellejtan marked this pull request as ready for review August 3, 2026 06:23
@michellejtan
michellejtan marked this pull request as draft August 3, 2026 06:32
@michellejtan
michellejtan marked this pull request as ready for review August 4, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared test fixture for a sample user profile is missing from tests/fixtures/

1 participant