Commit graph

20 commits

Author SHA1 Message Date
37ad92432e
test: add offline fixture coverage for Kattis and USACO
Problem: Kattis and USACO had zero offline test coverage — no fixtures,
no conftest routers, and no entries in the test matrix. Precision, error
cases, and the Kattis contest-vs-slug fallback were also untested.

Solution: Add HTML fixtures for both platforms covering metadata, tests,
and contest list modes. Wire up conftest routers that patch
`httpx.AsyncClient.get` using the same pattern as CSES/CodeChef. Extend
the test matrix to include Kattis and USACO (18 parametrized cases, up
from 12). Add a dedicated test for the Kattis contest-path (verifies
`contest_url`/`standings_url` are set). Add parametrized metadata error
tests for CSES, USACO, and Kattis. Assert `precision` field type in all
tests-mode payloads; `usaco/problem_1471.html` includes an absolute-error
hint to exercise `extract_precision`.
2026-03-06 16:46:03 -05:00
Barrett Ruth
0b40e0f33e
fix: replace curl_cffi with scrapling in codeforces metadata (#334)
## Problem

`codeforces.py` used `curl_cffi` to bypass Cloudflare when fetching
contest problem HTML, making it unavailable in the nix python env and
requiring an extra dependency across `pyproject.toml` and `flake.nix`.

## Solution

Rewrite `_fetch_problems_html` to use scrapling `StealthySession` with
`solve_cloudflare=True`, matching the existing CF submit pattern. Extend
`needs_browser` in `scraper.lua` to route CF `metadata` and `tests`
through the FHS env on NixOS. Remove `curl-cffi` from `pyproject.toml`,
`flake.nix`, and test mocks.
2026-03-06 13:25:44 -05:00
1162e7046b try to fix the setup 2026-02-18 14:13:37 -05:00
89c1a3c683 fix(ci): more fixes 2026-01-27 15:56:34 -05:00
d5c6783124 feat(scrapers): refactor 2026-01-27 15:43:40 -05:00
dfd8275421 fix: use a diff scraper for now 2025-12-08 19:46:14 -06:00
Barrett Ruth
e89c2e1cf5 feat(codechef): finalize codechef impl 2025-10-25 01:41:55 -04:00
Barrett Ruth
f78e43bdd4 fix paths 2025-10-25 00:42:03 -04:00
Barrett Ruth
2ab03e624c fix rest of routes 2025-10-25 00:37:30 -04:00
Barrett Ruth
fa3de99222 fix(test): relocate fixtures 2025-10-25 00:37:19 -04:00
Barrett Ruth
4fe623c806 fix(test): refactor fixtures 2025-10-25 00:34:56 -04:00
Barrett Ruth
8ba2a598fe fix(tests): refactor fixture directory 2025-10-25 00:34:32 -04:00
Barrett Ruth
2fda5a74ca feat: codechef 2025-10-25 00:26:33 -04:00
617c1741cc fix(ci): typing 2025-10-05 23:18:09 -04:00
b30c036478 fix(ci): typing 2025-10-05 23:08:54 -04:00
4fac6c8019 feat(tests): fixtures 2025-10-05 23:06:38 -04:00
c143600c5b fix(tests): cleaunop 2025-10-05 22:13:48 -04:00
2426e1cbd4 fix: scrapers 2025-10-05 22:10:26 -04:00
c509102b37 feat(tests): basic tests 2025-10-05 21:58:43 -04:00
a7eb731730 fea(ci): improve prettier config 2025-10-05 21:06:57 -04:00