artifinder¶
src.scrapers.artifinder
¶
Loader for ArtiFinder-Data (https://github.com/DistriNet/ArtiFinder-Data).
ArtiFinder scrapes conference papers directly and identifies links to their artifacts. The published data set is organised as::
data/<venue>/<year>.yaml
where <venue> is one of ccs, ndss, sp, usenix and each YAML
file is a list of entries::
- title: "Paper title."
authors: ["Jane Doe", "John Roe 0001"]
page_link: "https://doi.org/..."
artifacts_discovered: # ordered best score first; [] if none
- "https://github.com/org/repo"
- "https://doi.org/10.5281/zenodo.1"
validated: false
The older schema used a single discovered_artifact: <url> | null key; it is
still accepted. Only entries with at least one link are returned, but the
total number of scanned papers per conference-year is also reported so that a
discovery rate can be computed. All links are kept, normalised and
de-duplicated, in ArtiFinder's order (best score first) as artifact_urls.
Public API
load_artifinder(conf_regex=None) -> ArtiFinderData load_artifinder_data(conf_regex=None) -> list[dict] # entries only
ArtiFinderNoResultsError
¶
Bases: RuntimeError
Raised when ArtiFinder yields no discovered-artifact entries at all.
This usually means the upstream data could not be fetched (network/proxy
problem, GitHub rate limiting, a changed repository layout) or that the
conf_regex / min_year filters excluded everything. Failing loudly
prevents silently overwriting previously generated outputs with empty ones.
Source code in src/scrapers/artifinder.py
77 78 79 80 81 82 83 84 | |
ArtiFinderData
¶
Bases: NamedTuple
Parsed ArtiFinder data set.
Attributes:
| Name | Type | Description |
|---|---|---|
entries |
list[dict]
|
One dict per paper that has a discovered artifact link, with
keys |
counts |
list[dict]
|
One dict per conference-year with keys |
source_updated |
str | None
|
|
Source code in src/scrapers/artifinder.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
normalize_artifact_url(url: str) -> str
¶
Return url with an explicit scheme and no trailing slash.
ArtiFinder sometimes records bare hosts (github.com/org/repo); prefix
those with https://. Values that already carry a scheme are returned
unchanged apart from trailing-slash trimming.
Source code in src/scrapers/artifinder.py
107 108 109 110 111 112 113 114 115 116 117 118 119 | |
load_artifinder(conf_regex: str | None = None, min_year: int | None = DEFAULT_MIN_YEAR, local_dir: str | Path | None = None) -> ArtiFinderData
¶
Download and parse the ArtiFinder data set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conf_regex
|
str | None
|
Optional regex applied to |
None
|
min_year
|
int | None
|
Earliest conference edition year to include (inclusive).
Defaults to :data: |
DEFAULT_MIN_YEAR
|
local_dir
|
str | Path | None
|
Optional path to a local ArtiFinder-Data checkout (repo root
or its |
None
|
Source code in src/scrapers/artifinder.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
load_artifinder_data(conf_regex: str | None = None, min_year: int | None = DEFAULT_MIN_YEAR, local_dir: str | Path | None = None) -> list[dict]
¶
Convenience wrapper returning only the entries with discovered artifacts.
Source code in src/scrapers/artifinder.py
363 364 365 366 367 368 369 | |