generate_artifact_citations¶
src.generators.generate_artifact_citations
¶
Generate artifact DOI citation counts via OpenAlex and Semantic Scholar and write per-artifact metadata.
Outputs
assets/data/artifact_citations.json assets/data/artifact_citations_summary.json
Usage
python generate_artifact_citations.py --data_dir ../reprodb.github.io
is_artifact_doi(doi: str) -> bool
¶
Check if DOI is from an artifact repository (not a paper publisher).
Source code in src/generators/generate_artifact_citations.py
64 65 66 67 68 | |
fetch_zenodo_doi(record_id: str, cache: dict) -> str
¶
Get DOI for a Zenodo record. Always returns the Zenodo DOI (10.5281/zenodo.{record_id}) to ensure we get artifact citations, not paper citations from DOIs that authors may have linked.
Source code in src/generators/generate_artifact_citations.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
fetch_openalex_citing_dois(base_url: str, limit: int) -> tuple[list[str], bool]
¶
Fetch citing DOIs from OpenAlex using the filter API. base_url should be like: https://api.openalex.org/works?filter=cites:W12345
Source code in src/generators/generate_artifact_citations.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |