Skip to content

_work_to_minimal() in openalex_resolve.py drops OA fields

Root cause of biblio_pdf_fetch_oa failing to find any OA URLs: the _work_to_minimal() function that extracts fields from OpenAlex API responses did not include open_access, best_oa_location, or primary_location. These fields were in the API select clause and returned by OpenAlex, but stripped before writing to resolved.jsonl.

Fix applied

Added three fields to _work_to_minimal():

"open_access": work.get("open_access") ...
"best_oa_location": work.get("best_oa_location") ...
"primary_location": work.get("primary_location") ...

File: packages/biblio/src/biblio/openalex/openalex_resolve.py line ~91

After fix, re-resolve correctly shows oa_status=gold and pdf_url=... for open-access papers. PDF fetch then downloads them successfully.


Source context: pixecog

PixEcog (pixecog): Neuropixels and ECoG dataset and analysis

Recent commits:

8dc0d9d Pipeline docs: gitignore docs/pipelines/, relocate hand-authored files
96cd1ec Refactor sharpwaveripple/contracts: extract generic helpers to utils/io, remove pipelines __init__.py
36f9326 Add result note directory and sample note

README:


type: readme


Quick Start for Collaborators

Follow this checklist to get started with Pixecog documentation and workflows.

🐀 Pixecog Project — Compact Overview

Core principles

  • One immutable BIDS raw dataset (raw/) as the canonical baseline
  • Each analysis pipeline ha