SYMBOL INDEX (745 symbols across 48 files) FILE: packages/paper-qa-docling/src/paperqa_docling/reader.py function parse_pdf_to_pages (line 38) | def parse_pdf_to_pages( # noqa: PLR0912 FILE: packages/paper-qa-docling/tests/test_paperqa_docling.py function test_parse_pdf_to_pages (line 23) | async def test_parse_pdf_to_pages() -> None: function test_page_range (line 174) | def test_page_range() -> None: function test_media_deduplication (line 199) | def test_media_deduplication() -> None: function test_page_size_limit_denial (line 221) | def test_page_size_limit_denial() -> None: function test_invalid_pdf_is_denied (line 226) | def test_invalid_pdf_is_denied(tmp_path) -> None: function test_nonexistent_file_failure (line 245) | def test_nonexistent_file_failure() -> None: function test_table_parsing (line 251) | def test_table_parsing() -> None: function test_document_timeout_denial (line 273) | def test_document_timeout_denial() -> None: function test_equation_parsing (line 287) | def test_equation_parsing() -> None: FILE: packages/paper-qa-nemotron/src/paperqa_nemotron/api.py class NemotronLengthError (line 69) | class NemotronLengthError(ValueError): class NemotronBBoxError (line 82) | class NemotronBBoxError(ValueError): class NemotronParseBBox (line 95) | class NemotronParseBBox(BaseModel): method validate_min_less_than_max (line 104) | def validate_min_less_than_max(v: float, info: ValidationInfo) -> float: method from_coordinates (line 148) | def from_coordinates( method to_page_coordinates (line 154) | def to_page_coordinates( method iou (line 164) | def iou(self, other: "NemotronParseBBox") -> float: method union (line 186) | def union(self, other: "NemotronParseBBox") -> Self: class NemotronParseClassification (line 204) | class NemotronParseClassification(StrEnum): class NemotronParseAnnotatedBBox (line 234) | class NemotronParseAnnotatedBBox(BaseModel): class NemotronParseMarkdown (line 243) | class NemotronParseMarkdown(BaseModel): class NemotronParseMarkdownBBox (line 249) | class NemotronParseMarkdownBBox(NemotronParseAnnotatedBBox, NemotronPars... method merge_with_detection (line 257) | def merge_with_detection( function _is_litellm_timeout_with_408 (line 324) | def _is_litellm_timeout_with_408(exc: BaseException) -> bool: function _wait_exponential_for_nvidia_api_retry (line 335) | def _wait_exponential_for_nvidia_api_retry(retry_state: RetryCallState) ... function _call_nvidia_api (line 354) | async def _call_nvidia_api( function _call_nvidia_api (line 365) | async def _call_nvidia_api( function _call_nvidia_api (line 376) | async def _call_nvidia_api( function _call_nvidia_api (line 396) | async def _call_nvidia_api( function _call_sagemaker_api (line 498) | async def _call_sagemaker_api( function _call_sagemaker_api (line 509) | async def _call_sagemaker_api( function _call_sagemaker_api (line 520) | async def _call_sagemaker_api( function _call_sagemaker_api (line 535) | async def _call_sagemaker_api( FILE: packages/paper-qa-nemotron/src/paperqa_nemotron/reader.py function pad_image_with_border (line 46) | def pad_image_with_border( function _render_page (line 80) | def _render_page( function parse_pdf_to_pages (line 136) | async def parse_pdf_to_pages( FILE: packages/paper-qa-nemotron/tests/conftest.py function fixture_vcr_config (line 21) | def fixture_vcr_config() -> dict[str, Any]: class PreReadCompatibleAiohttpResponseStream (line 36) | class PreReadCompatibleAiohttpResponseStream( method __aiter__ (line 41) | async def __aiter__(self) -> AsyncIterator[bytes]: function _vcr_handle_async_request (line 54) | async def _vcr_handle_async_request( FILE: packages/paper-qa-nemotron/tests/test_api.py class TestNemotronParseBBox (line 26) | class TestNemotronParseBBox: method test_bbox_validation (line 27) | def test_bbox_validation(self) -> None: method test_bbox_to_page_coordinates (line 76) | def test_bbox_to_page_coordinates(self) -> None: method test_iou (line 98) | def test_iou( method test_union (line 108) | def test_union(self) -> None: class TestMergeWithDetection (line 120) | class TestMergeWithDetection: method test_merge_empty_inputs (line 121) | def test_merge_empty_inputs(self) -> None: method test_merge_unmatched_detection (line 149) | def test_merge_unmatched_detection(self) -> None: method test_merge_matched_detection (line 196) | def test_merge_matched_detection(self) -> None: method test_merge_multiple_items (line 227) | def test_merge_multiple_items(self) -> None: function test_wait_exponential_for_nvidia_api_retry (line 293) | def test_wait_exponential_for_nvidia_api_retry( function fixture_pdf_page_np (line 316) | def fixture_pdf_page_np() -> np.ndarray: class TestNvidiaAPI (line 325) | class TestNvidiaAPI: method test_markdown_bbox (line 330) | async def test_markdown_bbox( method test_markdown_no_bbox (line 346) | async def test_markdown_no_bbox( method test_detection_only (line 360) | async def test_detection_only( class TestSageMakerAPI (line 374) | class TestSageMakerAPI: method test_markdown_bbox (line 379) | async def test_markdown_bbox( method test_markdown_no_bbox (line 394) | async def test_markdown_no_bbox( method test_detection_only (line 407) | async def test_detection_only( FILE: packages/paper-qa-nemotron/tests/test_paperqa_nemotron.py function test_parse_pdf_to_pages (line 36) | async def test_parse_pdf_to_pages(api_params_base: dict[str, Any]) -> None: function test_page_range (line 230) | async def test_page_range() -> None: function test_media_deduplication (line 257) | async def test_media_deduplication() -> None: function test_page_size_limit_denial (line 285) | async def test_page_size_limit_denial() -> None: function test_invalid_pdf_is_denied (line 293) | async def test_invalid_pdf_is_denied(tmp_path) -> None: function test_nonexistent_file_failure (line 313) | async def test_nonexistent_file_failure() -> None: function test_table_parsing (line 320) | async def test_table_parsing() -> None: function test_equation_parsing (line 339) | async def test_equation_parsing() -> None: function test_pad_image_with_border (line 352) | def test_pad_image_with_border(subtests: pytest.Subtests) -> None: function test_media_enrichment_filters_irrelevant (line 394) | async def test_media_enrichment_filters_irrelevant() -> None: function test_render_page (line 456) | def test_render_page(subtests: pytest.Subtests) -> None: function _wrap_into_retry_error (line 488) | def _wrap_into_retry_error(exception: Exception) -> RetryError: function test_failover_on_error (line 514) | async def test_failover_on_error(error: Exception) -> None: FILE: packages/paper-qa-pymupdf/src/paperqa_pymupdf/reader.py function setup_pymupdf_python_logging (line 13) | def setup_pymupdf_python_logging() -> None: function _extract_page_text (line 42) | def _extract_page_text( function _parse_single_page_screenshot (line 100) | def _parse_single_page_screenshot( function parse_pdf_to_pages (line 127) | def parse_pdf_to_pages( FILE: packages/paper-qa-pymupdf/tests/test_paperqa_pymupdf.py function test_parse_pdf_to_pages (line 22) | async def test_parse_pdf_to_pages() -> None: function test_page_range (line 176) | def test_page_range() -> None: function test_page_size_limit_denial (line 201) | def test_page_size_limit_denial() -> None: function test_invalid_pdf_is_denied (line 207) | async def test_invalid_pdf_is_denied(tmp_path) -> None: function test_nonexistent_file_failure (line 234) | def test_nonexistent_file_failure() -> None: function test_table_parsing (line 240) | def test_table_parsing() -> None: function test_table_parsing_orphaned_surrogate (line 300) | def test_table_parsing_orphaned_surrogate() -> None: function test_equation_parsing (line 329) | def test_equation_parsing() -> None: FILE: packages/paper-qa-pypdf/src/paperqa_pypdf/reader.py class MediaMode (line 31) | class MediaMode(StrEnum): method __str__ (line 41) | def __str__(self) -> str: method metadata_value (line 45) | def metadata_value(self) -> str: function parse_pdf_to_pages (line 56) | def parse_pdf_to_pages( # noqa: PLR0912 FILE: packages/paper-qa-pypdf/src/paperqa_pypdf/utils.py function cluster_bboxes (line 4) | def cluster_bboxes( FILE: packages/paper-qa-pypdf/tests/test_paperqa_pypdf.py function test_parse_pdf_to_pages (line 27) | async def test_parse_pdf_to_pages() -> None: function test_page_range (line 184) | def test_page_range() -> None: function test_page_size_limit_denial (line 209) | def test_page_size_limit_denial() -> None: function test_invalid_pdf_is_denied (line 214) | def test_invalid_pdf_is_denied(tmp_path) -> None: function test_nonexistent_file_failure (line 233) | def test_nonexistent_file_failure() -> None: function test_table_parsing (line 239) | def test_table_parsing() -> None: function test_table_parsing_orphaned_surrogate (line 257) | def test_table_parsing_orphaned_surrogate() -> None: function test_media_deduplication (line 276) | def test_media_deduplication() -> None: function test_equation_parsing (line 291) | def test_equation_parsing() -> None: function test_clustering (line 304) | def test_clustering() -> None: function test_individual_mode_outputs_png (line 355) | def test_individual_mode_outputs_png( class TestMediaMode (line 387) | class TestMediaMode: method test_same_member_is_equal (line 389) | def test_same_member_is_equal(self) -> None: method test_individual_with_and_without_clustering (line 395) | def test_individual_with_and_without_clustering(self) -> None: method test_different_members_different_values_are_not_equal (line 411) | def test_different_members_different_values_are_not_equal(self) -> None: FILE: packages/paper-qa-pypdf/tests/test_utils.py function test_cluster_bboxes_empty (line 6) | def test_cluster_bboxes_empty() -> None: function test_cluster_bboxes_single (line 10) | def test_cluster_bboxes_single() -> None: function test_cluster_bboxes_no_overlap_far_apart (line 17) | def test_cluster_bboxes_no_overlap_far_apart() -> None: function test_cluster_bboxes_overlapping (line 25) | def test_cluster_bboxes_overlapping() -> None: function test_cluster_bboxes_within_tolerance (line 33) | def test_cluster_bboxes_within_tolerance() -> None: function test_cluster_bboxes_outside_tolerance (line 41) | def test_cluster_bboxes_outside_tolerance() -> None: function test_cluster_bboxes_chain_clustering (line 48) | def test_cluster_bboxes_chain_clustering() -> None: function test_cluster_bboxes_multiple_clusters (line 57) | def test_cluster_bboxes_multiple_clusters() -> None: function test_cluster_bboxes_vertical_proximity (line 73) | def test_cluster_bboxes_vertical_proximity() -> None: function test_cluster_bboxes_diagonal_proximity (line 81) | def test_cluster_bboxes_diagonal_proximity() -> None: function test_cluster_bboxes_zero_tolerance (line 89) | def test_cluster_bboxes_zero_tolerance() -> None: function test_cluster_bboxes_zero_tolerance_float (line 101) | def test_cluster_bboxes_zero_tolerance_float() -> None: FILE: src/paperqa/_ldp_shims.py class ComputeTrajectoryMetricsMixin (line 49) | class ComputeTrajectoryMetricsMixin: # type: ignore[no-redef] class Callback (line 52) | class Callback: # type: ignore[no-redef] FILE: src/paperqa/agents/__init__.py function is_running_under_cli (line 64) | def is_running_under_cli() -> bool: function set_up_rich_handler (line 69) | def set_up_rich_handler(install: bool = True) -> RichHandler: function configure_log_verbosity (line 82) | def configure_log_verbosity(verbosity: int = 0) -> None: function configure_cli_logging (line 91) | def configure_cli_logging(verbosity: int | Settings = 0) -> None: function ask (line 105) | def ask( function search_query (line 115) | def search_query( function build_index (line 137) | def build_index( function save_settings (line 152) | def save_settings(settings: Settings, settings_path: str | os.PathLike) ... function main (line 173) | def main() -> None: FILE: src/paperqa/agents/env.py function settings_to_tools (line 47) | def settings_to_tools( # noqa: PLR0912 function make_clinical_trial_status (line 143) | def make_clinical_trial_status( function clinical_trial_status (line 168) | def clinical_trial_status(state: "EnvironmentState") -> str: class PaperQAEnvironment (line 208) | class PaperQAEnvironment(Environment[EnvironmentState]): method __init__ (line 211) | def __init__( method from_task (line 232) | def from_task(cls, task: str) -> Self: method make_tools (line 235) | def make_tools(self) -> list[Tool]: method _reset_docs (line 243) | async def _reset_docs(self) -> None: method make_initial_state (line 247) | async def make_initial_state(self) -> EnvironmentState: method reset (line 274) | async def reset(self) -> tuple[list[Message], list[Tool]]: method export_frame (line 292) | def export_frame(self) -> Frame: method _has_excess_answer_failures (line 295) | def _has_excess_answer_failures(self) -> bool: method step (line 309) | async def step(self, action: Message) -> tuple[Messages, float, bool, ... method get_id (line 348) | async def get_id(self) -> str: method __deepcopy__ (line 362) | def __deepcopy__(self, memo) -> Self: FILE: src/paperqa/agents/helpers.py function get_year (line 20) | def get_year(ts: datetime | None = None) -> str: function litellm_get_search_query (line 27) | async def litellm_get_search_query( function table_formatter (line 78) | def table_formatter( FILE: src/paperqa/agents/main.py function agent_query (line 54) | async def agent_query( function run_agent (line 91) | async def run_agent( function _run_with_timeout_failure (line 151) | async def _run_with_timeout_failure( function run_fake_agent (line 182) | async def run_fake_agent( function run_aviary_agent (line 259) | async def run_aviary_agent( class LDPRolloutCallback (line 326) | class LDPRolloutCallback(Callback): method __init__ (line 329) | def __init__( method after_agent_get_asv (line 343) | async def after_agent_get_asv(self, traj_id: str, *args) -> None: # n... method after_env_reset (line 347) | async def after_env_reset(self, traj_id: str, *_) -> None: # noqa: AR... method after_env_step (line 351) | async def after_env_step(self, traj_id: str, *args) -> None: # noqa: ... class LDPAdjustToolsForAgentCallback (line 356) | class LDPAdjustToolsForAgentCallback(Callback): method __init__ (line 357) | def __init__(self, settings: Settings): method after_env_reset (line 360) | async def after_env_reset( function run_ldp_agent (line 366) | async def run_ldp_agent( function index_search (line 408) | async def index_search( FILE: src/paperqa/agents/models.py class SupportsPickle (line 21) | class SupportsPickle(Protocol): method __reduce__ (line 24) | def __reduce__(self) -> str | tuple[Any, ...]: ... method __getstate__ (line 25) | def __getstate__(self) -> object: ... method __setstate__ (line 26) | def __setstate__(self, state: object) -> None: ... class AgentStatus (line 29) | class AgentStatus(StrEnum): # TODO: rename to AnswerStatus or RolloutSt... class MismatchedModelsError (line 41) | class MismatchedModelsError(Exception): class AnswerResponse (line 47) | class AnswerResponse(BaseModel): method strip_answer (line 60) | def strip_answer( method get_summary (line 69) | async def get_summary(self, llm_model: LLMModel | str = "gpt-4o") -> str: class TimerData (line 93) | class TimerData(BaseModel): class SimpleProfiler (line 98) | class SimpleProfiler(BaseModel): method timer (line 111) | async def timer(self, name: str): method start (line 124) | def start(self, name: str) -> None: method stop (line 130) | def stop(self, name: str) -> None: method results (line 146) | def results(self) -> dict[str, dict[str, float]]: FILE: src/paperqa/agents/search.py class AsyncRetryError (line 59) | class AsyncRetryError(Exception): class SearchDocumentStorage (line 63) | class SearchDocumentStorage(StrEnum): method extension (line 70) | def extension(self) -> str: method write_to_string (line 77) | def write_to_string(self, data: BaseModel | SupportsPickle) -> bytes: method read_from_string (line 86) | def read_from_string( function reap_opened_index_cache (line 105) | def reap_opened_index_cache() -> None: class SearchIndex (line 113) | class SearchIndex: method __init__ (line 118) | def __init__( method index_directory (line 148) | async def index_directory( # TODO: rename to index_root_directory method index_filename (line 156) | async def index_filename( # TODO: rename to index_meta_directory method docs_index_directory (line 165) | async def docs_index_directory(self) -> anyio.Path: method file_index_filename (line 172) | async def file_index_filename(self) -> anyio.Path: method schema (line 177) | def schema(self) -> Schema: method index (line 186) | async def index(self) -> Index: method __del__ (line 211) | def __del__(self) -> None: method searcher (line 221) | async def searcher(self) -> Searcher: method writer (line 229) | async def writer(self, reset: bool = False) -> AsyncIterator[IndexWrit... method count (line 238) | async def count(self) -> int: method index_files (line 242) | async def index_files(self) -> dict[str, str]: method filehash (line 260) | def filehash(body: str) -> str: method filecheck (line 263) | async def filecheck(self, filename: str, body_filehash: str | None = N... method mark_failed_document (line 271) | async def mark_failed_document(self, path: str | os.PathLike) -> None: method add_document (line 275) | async def add_document( method delete_document (line 337) | async def delete_document(self, file_location: str) -> None: method remove_from_index (line 347) | async def remove_from_index(self, file_location: str) -> None: method save_index (line 367) | async def save_index(self) -> None: method get_saved_object (line 381) | async def get_saved_object( method query (line 399) | async def query( function fetch_kwargs_from_manifest (line 437) | def fetch_kwargs_from_manifest( function maybe_get_manifest (line 448) | async def maybe_get_manifest( function process_file (line 490) | async def process_file( function _make_progress_bar_update (line 586) | def _make_progress_bar_update( function get_directory_index (line 622) | async def get_directory_index( FILE: src/paperqa/agents/tools.py function make_status (line 27) | def make_status( function default_status (line 37) | def default_status(state: "EnvironmentState") -> str: class EnvironmentState (line 47) | class EnvironmentState(BaseModel): method status (line 70) | def status(self) -> str: method get_relevant_contexts (line 75) | def get_relevant_contexts(self, score_threshold: int | None = 0) -> li... method record_action (line 83) | def record_action(self, action: Message | ToolRequestMessage) -> None: method query_tool_history (line 90) | def query_tool_history(self, tool_name: str) -> bool: class NamedTool (line 95) | class NamedTool(BaseModel): class PaperSearch (line 109) | class PaperSearch(NamedTool): method paper_search (line 120) | async def paper_search( class EmptyDocsError (line 213) | class EmptyDocsError(RuntimeError): class GatherEvidence (line 217) | class GatherEvidence(NamedTool): method gather_evidence (line 225) | async def gather_evidence(self, question: str, state: EnvironmentState... class GenerateAnswer (line 314) | class GenerateAnswer(NamedTool): method gen_answer (line 323) | async def gen_answer(self, state: EnvironmentState) -> str: method extract_answer_from_message (line 381) | def extract_answer_from_message(cls, content: str) -> str: class Reset (line 389) | class Reset(NamedTool): method reset (line 392) | async def reset(self, state: EnvironmentState) -> None: class Complete (line 405) | class Complete(NamedTool): method complete (line 415) | async def complete( class ClinicalTrialsSearch (line 443) | class ClinicalTrialsSearch(NamedTool): method clinical_trials_search (line 473) | async def clinical_trials_search(self, query: str, state: EnvironmentS... FILE: src/paperqa/clients/__init__.py class DocMetadataTask (line 46) | class DocMetadataTask(BaseModel): method provider_queries (line 64) | def provider_queries( method processor_queries (line 70) | def processor_queries( method __repr__ (line 78) | def __repr__(self) -> str: class DocMetadataClient (line 84) | class DocMetadataClient: method __init__ (line 85) | def __init__( method query (line 156) | async def query(self, **kwargs) -> DocDetails | None: method bulk_query (line 215) | async def bulk_query( method upgrade_doc_to_doc_details (line 223) | async def upgrade_doc_to_doc_details(self, doc: Doc, **kwargs) -> DocD... FILE: src/paperqa/clients/client_models.py class ClientQuery (line 28) | class ClientQuery(BaseModel): class TitleAuthorQuery (line 34) | class TitleAuthorQuery(ClientQuery): method ensure_fields_are_present (line 42) | def ensure_fields_are_present(cls, data: dict[str, Any]) -> dict[str, ... method zero_and_one (line 56) | def zero_and_one(cls, v: float, info: ValidationInfo) -> float: # noq... class DOIQuery (line 64) | class DOIQuery(ClientQuery): method add_doi_to_fields_and_validate (line 70) | def add_doi_to_fields_and_validate(cls, data: dict[str, Any]) -> dict[... class JournalQuery (line 84) | class JournalQuery(ClientQuery): class MetadataProvider (line 91) | class MetadataProvider(ABC, Generic[ClientQueryType]): method query (line 97) | async def query(self, query: dict) -> DocDetails | None: method _query (line 101) | async def _query(self, query: ClientQueryType) -> DocDetails | None: method query_factory (line 105) | def query_factory(self, query: dict) -> ClientQueryType: class DOIOrTitleBasedProvider (line 109) | class DOIOrTitleBasedProvider(MetadataProvider[DOIQuery | TitleAuthorQue... method query (line 111) | async def query(self, query: dict) -> DocDetails | None: method _query (line 146) | async def _query(self, query: DOIQuery | TitleAuthorQuery) -> DocDetai... method query_factory (line 157) | def query_factory(self, query: dict) -> DOIQuery | TitleAuthorQuery: class MetadataPostProcessor (line 171) | class MetadataPostProcessor(ABC, Generic[ClientQueryType]): method process (line 178) | async def process(self, doc_details: DocDetails, **kwargs) -> DocDetails: method _process (line 184) | async def _process( method query_creator (line 190) | def query_creator( FILE: src/paperqa/clients/crossref.py function crossref_headers (line 82) | def crossref_headers() -> dict[str, str]: function get_crossref_mailto (line 96) | def get_crossref_mailto() -> str: function doi_to_bibtex (line 115) | async def doi_to_bibtex( function parse_crossref_to_doc_details (line 167) | async def parse_crossref_to_doc_details( function get_doc_details_from_crossref (line 253) | async def get_doc_details_from_crossref( # noqa: PLR0912 function download_retracted_dataset (line 358) | async def download_retracted_dataset( class CrossrefProvider (line 384) | class CrossrefProvider(DOIOrTitleBasedProvider): method _query (line 385) | async def _query(self, query: TitleAuthorQuery | DOIQuery) -> DocDetai... FILE: src/paperqa/clients/exceptions.py class DOINotFoundError (line 6) | class DOINotFoundError(Exception): method __init__ (line 7) | def __init__(self, message="DOI not found") -> None: function make_flaky_ssl_error_predicate (line 12) | def make_flaky_ssl_error_predicate(host: str) -> Callable[[BaseException... FILE: src/paperqa/clients/journal_quality.py class JournalQualityPostProcessor (line 37) | class JournalQualityPostProcessor(MetadataPostProcessor[JournalQuery]): method __init__ (line 42) | def __init__(self, journal_quality_path: os.PathLike | str | None = No... method load_data (line 52) | def load_data(self) -> None: method _process (line 58) | async def _process( method query_creator (line 82) | def query_creator(self, doc_details: DocDetails, **kwargs) -> JournalQ... function download_file (line 106) | async def download_file( function process_csv (line 142) | async def process_csv( function main (line 201) | async def main() -> None: FILE: src/paperqa/clients/openalex.py function reformat_name (line 37) | def reformat_name(name: str) -> str: function get_openalex_mailto (line 46) | def get_openalex_mailto() -> str | None: function get_openalex_api_key (line 58) | def get_openalex_api_key() -> str | None: function get_doc_details_from_openalex (line 67) | async def get_doc_details_from_openalex( # noqa: PLR0912 function parse_openalex_to_doc_details (line 176) | def parse_openalex_to_doc_details(message: dict[str, Any]) -> DocDetails: class OpenAlexProvider (line 248) | class OpenAlexProvider(DOIOrTitleBasedProvider): method get_doc_details (line 255) | async def get_doc_details( method search_by_title (line 272) | async def search_by_title( method _query (line 297) | async def _query(self, query: TitleAuthorQuery | DOIQuery) -> DocDetai... FILE: src/paperqa/clients/retractions.py class RetractionDataPostProcessor (line 18) | class RetractionDataPostProcessor(MetadataPostProcessor[DOIQuery]): method __init__ (line 22) | def __init__(self, retraction_data_path: os.PathLike | str | None = No... method _has_cache_expired (line 42) | def _has_cache_expired(self) -> bool: method _is_csv_cached (line 55) | def _is_csv_cached(self) -> bool: method _filter_dois (line 58) | def _filter_dois(self) -> None: method load_data (line 66) | async def load_data(self) -> None: method _process (line 75) | async def _process(self, query: DOIQuery, doc_details: DocDetails) -> ... method query_creator (line 85) | def query_creator(self, doc_details: DocDetails, **kwargs) -> DOIQuery... FILE: src/paperqa/clients/semantic_scholar.py class SemanticScholarSearchType (line 61) | class SemanticScholarSearchType(IntEnum): method make_url_params (line 71) | def make_url_params( # noqa: PLR0911 function _s2_get_with_retrying (line 123) | async def _s2_get_with_retrying(url: str, **get_kwargs) -> dict[str, Any]: function s2_authors_match (line 138) | def s2_authors_match(authors: list[str], data: dict) -> bool: function parse_s2_to_doc_details (line 158) | async def parse_s2_to_doc_details( function semantic_scholar_headers (line 224) | def semantic_scholar_headers() -> dict[str, str]: function s2_title_search (line 238) | async def s2_title_search( function get_s2_doc_details_from_doi (line 302) | async def get_s2_doc_details_from_doi( function get_s2_doc_details_from_title (line 336) | async def get_s2_doc_details_from_title( class SemanticScholarProvider (line 371) | class SemanticScholarProvider(DOIOrTitleBasedProvider): method _query (line 372) | async def _query(self, query: TitleAuthorQuery | DOIQuery) -> DocDetai... FILE: src/paperqa/clients/unpaywall.py class Author (line 22) | class Author(BaseModel): class BestOaLocation (line 31) | class BestOaLocation(BaseModel): class UnpaywallResponse (line 49) | class UnpaywallResponse(BaseModel): class SearchResponse (line 71) | class SearchResponse(BaseModel): class SearchResults (line 77) | class SearchResults(BaseModel): class UnpaywallProvider (line 82) | class UnpaywallProvider(DOIOrTitleBasedProvider): method get_doc_details (line 84) | async def get_doc_details(self, doi: str, client: httpx.AsyncClient) -... method search_by_title (line 111) | async def search_by_title( method _create_doc_details (line 159) | def _create_doc_details(self, data: UnpaywallResponse) -> DocDetails: method _query (line 202) | async def _query(self, query: TitleAuthorQuery | DOIQuery) -> DocDetai... FILE: src/paperqa/contrib/openreview_paper_helper.py class PaperSuggestion (line 24) | class PaperSuggestion(BaseModel): class RelevantPapersResponse (line 29) | class RelevantPapersResponse(BaseModel): class OpenReviewPaperHelper (line 41) | class OpenReviewPaperHelper: method __init__ (line 42) | def __init__( method get_venues (line 66) | def get_venues(self) -> list[str]: method get_submissions (line 70) | def get_submissions(self) -> list[Any]: method create_submission_string (line 75) | def create_submission_string(self, submissions: list[Any]) -> str: method fetch_relevant_papers (line 87) | async def fetch_relevant_papers(self, question: str) -> dict[str, Any]: method _get_relevant_papers_chunk (line 108) | async def _get_relevant_papers_chunk(self, question: str, chunk: str) ... method download_papers (line 123) | async def download_papers(self, submissions: list[Any]) -> None: method _download_pdf (line 134) | async def _download_pdf(self, submission: Any) -> bool: method aadd_docs (line 151) | async def aadd_docs( FILE: src/paperqa/contrib/zotero.py class ZoteroPaper (line 24) | class ZoteroPaper(BaseModel): method __str__ (line 50) | def __str__(self) -> str: class ZoteroDB (line 59) | class ZoteroDB(zotero.Zotero): method __init__ (line 71) | def __init__( method get_pdf (line 118) | def get_pdf(self, item: dict) -> Path | None: method iterate (line 147) | def iterate( # noqa: PLR0912 method _sliced_collection_items (line 286) | def _sliced_collection_items(self, collection_id, limit, start): method _get_collection_id (line 293) | def _get_collection_id(self, collection_name: str) -> str: function _get_citation_key (line 323) | def _get_citation_key(item: dict) -> str: function _extract_pdf_key (line 345) | def _extract_pdf_key(item: dict) -> str | None: FILE: src/paperqa/core.py function llm_parse_json (line 19) | def llm_parse_json(text: str) -> dict[str, JsonValue]: class LLMContextError (line 127) | class LLMContextError(ValueError): method __init__ (line 131) | def __init__(self, message: str, llm_results: list[LLMResult]) -> None: class LLMBadContextJSONError (line 136) | class LLMBadContextJSONError(LLMContextError): class LLMContextTimeoutError (line 150) | class LLMContextTimeoutError(LLMContextError): class LLMContextRequestFailedError (line 163) | class LLMContextRequestFailedError(LLMContextError): function _map_fxn_summary (line 178) | async def _map_fxn_summary( # noqa: PLR0912 function map_fxn_summary (line 383) | async def map_fxn_summary(**kwargs) -> tuple[Context | None, list[LLMRes... FILE: src/paperqa/docs.py class Docs (line 45) | class Docs(BaseModel): # noqa: PLW1641 # TODO: add __hash__ method __eq__ (line 58) | def __eq__(self, other) -> bool: method clear_docs (line 78) | def clear_docs(self) -> None: method _get_unique_name (line 84) | def _get_unique_name(self, docname: str) -> str: method aadd_file (line 93) | async def aadd_file( method aadd_url (line 132) | async def aadd_url( method aadd (line 156) | async def aadd( # noqa: PLR0912 method aadd_texts (line 340) | async def aadd_texts( method delete (line 403) | def delete( method _build_texts_index (line 437) | async def _build_texts_index( method retrieve_texts (line 456) | async def retrieve_texts( method aget_evidence (line 492) | async def aget_evidence( method aquery (line 588) | async def aquery( FILE: src/paperqa/llms.py function cosine_similarity (line 50) | def cosine_similarity(a, b): class VectorStore (line 55) | class VectorStore(BaseModel, ABC): method __contains__ (line 68) | def __contains__(self, item) -> bool: method __len__ (line 71) | def __len__(self) -> int: method add_texts_and_embeddings (line 75) | async def add_texts_and_embeddings(self, texts: Iterable[Embeddable]) ... method similarity_search (line 80) | async def similarity_search( method clear (line 86) | def clear(self) -> None: method partitioned_similarity_search (line 89) | async def partitioned_similarity_search( method max_marginal_relevance_search (line 111) | async def max_marginal_relevance_search( class NumpyVectorStore (line 173) | class NumpyVectorStore(VectorStore): # noqa: PLW1641 # TODO: add __hash__ method __eq__ (line 178) | def __eq__(self, other) -> bool: method clear (line 196) | def clear(self) -> None: method add_texts_and_embeddings (line 202) | async def add_texts_and_embeddings(self, texts: Iterable[Embeddable]) ... method partitioned_similarity_search (line 207) | async def partitioned_similarity_search( method similarity_search (line 241) | async def similarity_search( class QdrantVectorStore (line 277) | class QdrantVectorStore(VectorStore): # noqa: PLW1641 # TODO: add __ha... method __del__ (line 289) | def __del__(self): method aclose (line 300) | async def aclose(self): method __eq__ (line 304) | def __eq__(self, other) -> bool: method validate_client (line 318) | def validate_client(self): method _collection_exists (line 338) | async def _collection_exists(self) -> bool: method clear (line 342) | def clear(self) -> None: method aclear (line 359) | async def aclear(self) -> None: method add_texts_and_embeddings (line 367) | async def add_texts_and_embeddings(self, texts: Iterable[Embeddable]) ... method similarity_search (line 410) | async def similarity_search( method load_docs (line 445) | async def load_docs( function embedding_model_factory (line 526) | def embedding_model_factory(embedding: str, **kwargs) -> EmbeddingModel: FILE: src/paperqa/readers.py class SyncPDFParserFn (line 30) | class SyncPDFParserFn(Protocol): method __call__ (line 33) | def __call__( class AsyncPDFParserFn (line 43) | class AsyncPDFParserFn(Protocol): method __call__ (line 46) | async def __call__( function resolve_page_range (line 58) | def resolve_page_range( function parse_image (line 69) | async def parse_image( function _make_chunk (line 92) | def _make_chunk( function chunk_pdf (line 105) | def chunk_pdf( function parse_text (line 146) | def parse_text( function parse_office_doc (line 203) | def parse_office_doc( function chunk_text (line 258) | def chunk_text( function chunk_code_text (line 318) | def chunk_code_text( function read_doc (line 367) | async def read_doc( function read_doc (line 379) | async def read_doc( function read_doc (line 391) | async def read_doc( function read_doc (line 403) | async def read_doc( function read_doc (line 415) | async def read_doc( function read_doc (line 426) | async def read_doc( # noqa: PLR0912 FILE: src/paperqa/settings.py class AsyncContextSerializer (line 94) | class AsyncContextSerializer(Protocol): method __call__ (line 97) | async def __call__( class AnswerSettings (line 106) | class AnswerSettings(BaseModel): class ChunkingOptions (line 176) | class ChunkingOptions(StrEnum): function get_default_pdf_parser (line 180) | def get_default_pdf_parser() -> PDFParserFn: function default_pdf_parser_configurator (line 198) | def default_pdf_parser_configurator() -> None: class MultimodalOptions (line 207) | class MultimodalOptions(IntEnum): method from_value (line 216) | def from_value(cls, value: "bool | MultimodalOptions") -> "MultimodalO... method should_parse_and_enrich_media (line 222) | def should_parse_and_enrich_media(self) -> tuple[bool, bool]: class ParsingSettings (line 233) | class ParsingSettings(BaseModel): method _resolve_parse_pdf (line 305) | def _resolve_parse_pdf(cls, v: str | PDFParserFn) -> PDFParserFn: method _custom_serializer (line 317) | def _custom_serializer( method should_parse_and_enrich_media (line 382) | def should_parse_and_enrich_media(self) -> tuple[bool, bool]: class _FormatDict (line 388) | class _FormatDict(dict): # noqa: FURB189 method __init__ (line 391) | def __init__(self) -> None: method __missing__ (line 394) | def __missing__(self, key: str) -> str: function get_formatted_variables (line 399) | def get_formatted_variables(s: str) -> set[str]: class PromptSettings (line 406) | class PromptSettings(BaseModel): method check_summary (line 456) | def check_summary(cls, v: str) -> str: method check_qa (line 468) | def check_qa(cls, v: str) -> str: method check_select (line 478) | def check_select(cls, v: str) -> str: method check_post (line 490) | def check_post(cls, v: str | None) -> str | None: method check_context_outer (line 502) | def check_context_outer(cls, v: str) -> str: method check_context_inner (line 514) | def check_context_inner(cls, v: str) -> str: class IndexSettings (line 521) | class IndexSettings(BaseModel): method get_named_index_directory (line 593) | def get_named_index_directory(self) -> anyio.Path: method finalize_manifest_file (line 607) | async def finalize_manifest_file(self) -> anyio.Path | None: class AgentSettings (line 616) | class AgentSettings(BaseModel): function make_default_litellm_model_list_settings (line 728) | def make_default_litellm_model_list_settings( class Settings (line 750) | class Settings(BaseSettings): method _update_temperature (line 824) | def _update_temperature(self) -> Self: method md5 (line 845) | def md5(self) -> str: method get_index_name (line 853) | def get_index_name(self) -> str: method from_name (line 877) | def from_name( method get_llm (line 925) | def get_llm(self) -> LiteLLMModel: method get_summary_llm (line 932) | def get_summary_llm(self) -> LiteLLMModel: method get_agent_llm (line 941) | def get_agent_llm(self) -> LiteLLMModel: method get_embedding_model (line 950) | def get_embedding_model(self) -> EmbeddingModel: method get_enrichment_llm (line 953) | def get_enrichment_llm(self) -> LiteLLMModel: method make_aviary_tool_selector (line 962) | def make_aviary_tool_selector(self, agent_type: str | type) -> ToolSel... method make_ldp_agent (line 983) | async def make_ldp_agent( method make_media_enricher (line 1051) | def make_media_enricher(self) -> Callable[[ParsedText], Awaitable[str]]: method adjust_tools_for_agent_llm (line 1195) | def adjust_tools_for_agent_llm(self, tools: list[Tool]) -> None: method context_serializer (line 1202) | async def context_serializer( function get_settings (line 1283) | def get_settings(config_or_name: MaybeSettings = None) -> Settings: FILE: src/paperqa/sources/clinical_trials.py function api_search_clinical_trials (line 44) | async def api_search_clinical_trials(query: str, client: httpx.AsyncClie... function api_get_clinical_trial (line 76) | async def api_get_clinical_trial(nct_id: str, client: httpx.AsyncClient)... function search_retrieve_clinical_trials (line 86) | async def search_retrieve_clinical_trials( function format_to_doc_details (line 115) | def format_to_doc_details(trial_data: dict) -> DocDetails: function parse_clinical_trial (line 174) | def parse_clinical_trial(json_data: dict[str, Any]) -> str: function add_clinical_trials_to_docs (line 237) | async def add_clinical_trials_to_docs( function partition_clinical_trials_by_source (line 343) | def partition_clinical_trials_by_source(text: Embeddable) -> int: FILE: src/paperqa/types.py class Doc (line 75) | class Doc(Embeddable): method remove_computed_fields (line 98) | def remove_computed_fields(cls, data: Mapping[str, Any]) -> dict[str, ... method __hash__ (line 101) | def __hash__(self) -> int: method formatted_citation (line 106) | def formatted_citation(self) -> str: method matches_filter_criteria (line 109) | def matches_filter_criteria(self, filter_criteria: Mapping[str, Any]) ... method to_csv (line 133) | def to_csv(cls, values: Iterable[Self], target_csv_path: str | os.Path... class Text (line 155) | class Text(Embeddable): method __eq__ (line 176) | def __eq__(self, other) -> bool: method __hash__ (line 190) | def __hash__(self) -> int: method get_embeddable_text (line 208) | async def get_embeddable_text(self, with_enrichment: bool = False) -> ... class Context (line 238) | class Context(BaseModel): method __str__ (line 284) | def __str__(self) -> str: method __hash__ (line 288) | def __hash__(self) -> int: method populate_id (line 306) | def populate_id(cls, data: dict[str, Any]) -> dict[str, Any]: class PQASession (line 319) | class PQASession(BaseModel): method __str__ (line 387) | def __str__(self) -> str: method remove_computed (line 393) | def remove_computed(cls, data: Any) -> Any: method used_contexts (line 400) | def used_contexts(self) -> set[str]: method get_citation (line 404) | def get_citation(self, name: str) -> str: method add_tokens (line 414) | def add_tokens(self, result: LLMResult | Message) -> None: method get_unique_docs_from_contexts (line 435) | def get_unique_docs_from_contexts(self, score_threshold: int = 0) -> s... method filter_content_for_user (line 442) | def filter_content_for_user(self) -> None: method populate_formatted_answers_and_bib_from_raw_answer (line 474) | def populate_formatted_answers_and_bib_from_raw_answer( class ChunkMetadata (line 529) | class ChunkMetadata(BaseModel): class ParsedMetadata (line 542) | class ParsedMetadata(BaseModel): class ParsedMedia (line 567) | class ParsedMedia(BaseModel): method _check_data_xor_url (line 603) | def _check_data_xor_url(self) -> Self: method _get_info_hashable (line 615) | def _get_info_hashable(self) -> Hashable: method __hash__ (line 621) | def __hash__(self) -> int: method to_id (line 625) | def to_id(self) -> UUID: method __eq__ (line 653) | def __eq__(self, other) -> bool: method to_image_url (line 670) | def to_image_url(self) -> str: method save (line 683) | def save(self, path: str | os.PathLike) -> None: function create_multimodal_message (line 697) | def create_multimodal_message( class ParsedText (line 716) | class ParsedText(BaseModel): method encode_content (line 738) | def encode_content( method reduce_content (line 752) | def reduce_content(self) -> str: class BibTeXSource (line 763) | class BibTeXSource(StrEnum): method update_other (line 772) | def update_other(self, other: dict[str, Any] | None = None) -> dict[st... class DocDetails (line 808) | class DocDetails(Doc): method clean_key (line 897) | def clean_key(cls, value: str) -> str: method add_tzinfo (line 903) | def add_tzinfo(cls, value: datetime | None) -> datetime | None: method lowercase_doi_and_populate_doc_id (line 911) | def lowercase_doi_and_populate_doc_id(cls, data: dict[str, Any]) -> di... method is_bibtex_complete (line 941) | def is_bibtex_complete(bibtex: str, fields: list[str] | None = None) -... method merge_bibtex_entries (line 948) | def merge_bibtex_entries(entry1: Entry, entry2: Entry) -> Entry: method misc_string_cleaning (line 960) | def misc_string_cleaning(data: dict[str, Any]) -> dict[str, Any]: method inject_clean_doi_url_into_data (line 967) | def inject_clean_doi_url_into_data(data: dict[str, Any]) -> dict[str, ... method add_preprint_journal_from_doi_if_missing (line 983) | def add_preprint_journal_from_doi_if_missing( method remove_invalid_authors (line 1009) | def remove_invalid_authors(cls, data: dict[str, Any]) -> dict[str, Any]: method overwrite_docname_dockey_for_compatibility_w_doc (line 1022) | def overwrite_docname_dockey_for_compatibility_w_doc( method populate_bibtex_key_citation (line 1037) | def populate_bibtex_key_citation(cls, data: dict[str, Any]) -> dict[st... method populate_content_hash (line 1142) | def populate_content_hash(cls, data: dict[str, Any]) -> dict[str, Any]: method validate_all_fields (line 1154) | def validate_all_fields(cls, data: Mapping[str, Any]) -> dict[str, Any]: method __getitem__ (line 1186) | def __getitem__(self, item: str): method make_filename (line 1193) | def make_filename(self, title_limit: int | None = 48) -> str: method formatted_citation (line 1218) | def formatted_citation(self) -> str: method source_quality_message (line 1242) | def source_quality_message(self) -> str: method is_hydration_needed (line 1253) | def is_hydration_needed( method __add__ (line 1267) | def __add__(self, other: DocDetails | int) -> DocDetails: # noqa: PLR... method __radd__ (line 1373) | def __radd__(self, other: DocDetails | int) -> DocDetails: method __iadd__ (line 1379) | def __iadd__(self, other: DocDetails | int) -> DocDetails: # noqa: PY... FILE: src/paperqa/utils.py class ImpossibleParsingError (line 40) | class ImpossibleParsingError(Exception): function clean_invalid_unicode (line 51) | def clean_invalid_unicode(text: str, repl: str = REPLACEMENT_CHAR) -> str: function name_in_text (line 62) | def name_in_text(name: str, text: str) -> bool: function maybe_is_text (line 68) | def maybe_is_text(s: str, thresh: float = 2.5) -> bool: function maybe_is_pdf (line 93) | def maybe_is_pdf(file: BinaryIO) -> bool: function maybe_is_html (line 99) | def maybe_is_html(file: BinaryIO) -> bool: function strings_similarity (line 105) | def strings_similarity(s1: str, s2: str, case_insensitive: bool = True) ... function hexdigest (line 117) | def hexdigest(data: str | bytes) -> str: function md5sum (line 123) | def md5sum(file_path: str | os.PathLike) -> str: function strip_citations (line 127) | def strip_citations(text: str) -> str: function extract_score (line 134) | def extract_score(text: str) -> int: function get_parenthetical_substrings (line 170) | def get_parenthetical_substrings(text: str) -> list[str]: function get_citation_ids (line 191) | def get_citation_ids(text: str) -> list[str]: function extract_doi (line 197) | def extract_doi(reference: str) -> str: function batch_iter (line 214) | def batch_iter(iterable: list, n: int = 1) -> Iterator[list]: function get_loop (line 227) | def get_loop() -> asyncio.AbstractEventLoop: function run_or_ensure (line 236) | def run_or_ensure(coro: Awaitable[T]) -> T | asyncio.Task[T]: function encode_id (line 244) | def encode_id(value: str | bytes | UUID, maxsize: int | None = 16) -> str: function compute_unique_doc_id (line 253) | def compute_unique_doc_id(doi: str | None, content_hash: str | None) -> ... function get_year (line 261) | def get_year(ts: datetime | None = None) -> str: class CitationConversionError (line 268) | class CitationConversionError(Exception): function clean_upbibtex (line 272) | def clean_upbibtex(bibtex: str) -> str: function format_bibtex (line 314) | def format_bibtex( function remove_substrings (line 371) | def remove_substrings(target: str, substr_removal_list: Collection[str])... function mutate_acute_accents (line 381) | def mutate_acute_accents(text: str, replace: bool = False) -> str: function bibtex_field_extract (line 409) | def bibtex_field_extract( function create_bibtex_key (line 434) | def create_bibtex_key(author: list[str], year: str | int, title: str) ->... function is_retryable (line 453) | def is_retryable( function _get_with_retrying (line 479) | async def _get_with_retrying( # type: ignore[return] # noqa: RET503 function union_collections_to_ordered_list (line 519) | def union_collections_to_ordered_list(collections: Iterable) -> list: function pqa_directory (line 523) | def pqa_directory(name: str) -> Path: function setup_default_logs (line 533) | def setup_default_logs() -> None: function extract_thought (line 547) | def extract_thought(content: str | None) -> str: function logging_filters (line 589) | def logging_filters( function citation_to_docname (line 612) | def citation_to_docname(citation: str) -> str: function maybe_get_date (line 632) | def maybe_get_date(date: str | datetime | None) -> datetime | None: function clean_possessives (line 654) | def clean_possessives(text: str) -> str: function parse_enrichment_irrelevance (line 671) | def parse_enrichment_irrelevance(enrichment: str) -> tuple[bool, str]: function get_stable_str (line 691) | def get_stable_str(fn: Callable, for_hash: bool = False) -> str: FILE: tests/conftest.py function _load_env (line 38) | def _load_env() -> None: function _setup_default_logs (line 43) | def _setup_default_logs() -> None: function _defeat_litellm_callbacks (line 56) | def _defeat_litellm_callbacks() -> None: function _patch_litellm_logging_worker_for_race_condition (line 61) | def _patch_litellm_logging_worker_for_race_condition() -> Iterator[None]: function fixture_vcr_config (line 109) | def fixture_vcr_config() -> dict[str, Any]: function fixture_tmp_path_cleanup (line 127) | def fixture_tmp_path_cleanup(tmp_path: Path) -> Iterator[Path]: function fixture_agent_home_dir (line 135) | def fixture_agent_home_dir( function fixture_agent_index_dir (line 144) | def fixture_agent_index_dir(agent_home_dir: Path) -> Path: function fixture_stub_data_dir (line 149) | def fixture_stub_data_dir() -> Path: function agent_test_settings (line 154) | def agent_test_settings(agent_index_dir: Path, stub_data_dir: Path) -> S... function agent_stub_session (line 173) | def agent_stub_session() -> PQASession: function stub_data_dir_w_near_dupes (line 184) | def stub_data_dir_w_near_dupes(stub_data_dir: Path, tmp_path: Path) -> I... class PreReadCompatibleAiohttpResponseStream (line 201) | class PreReadCompatibleAiohttpResponseStream( method __aiter__ (line 206) | async def __aiter__(self) -> AsyncIterator[bytes]: function _vcr_handle_async_request (line 219) | async def _vcr_handle_async_request( function _build_response_with_raw_headers (line 245) | def _build_response_with_raw_headers(vcr_request, vcr_response, history): FILE: tests/test_agents.py function test_get_directory_index (line 68) | async def test_get_directory_index( function test_resuming_crashed_index_build (line 183) | async def test_resuming_crashed_index_build(agent_test_settings: Setting... function test_getting_manifest (line 238) | async def test_getting_manifest( function test_get_directory_index_w_manifest (line 281) | async def test_get_directory_index_w_manifest(agent_test_settings: Setti... function test_get_directory_index_w_no_citations (line 334) | async def test_get_directory_index_w_no_citations( function test_agent_types (line 350) | async def test_agent_types( function test_successful_memory_agent (line 403) | async def test_successful_memory_agent(agent_test_settings: Settings) ->... function test_timeout (line 484) | async def test_timeout(agent_test_settings: Settings, agent_type: str | ... function test_propagate_options (line 514) | async def test_propagate_options(agent_test_settings: Settings) -> None: function test_gather_evidence_rejects_empty_docs (line 562) | async def test_gather_evidence_rejects_empty_docs( function test_agent_sharing_state (line 620) | async def test_agent_sharing_state( function test_settings_model_config (line 819) | def test_settings_model_config() -> None: function test_tool_schema (line 848) | def test_tool_schema(agent_test_settings: Settings) -> None: function test_answers_are_striped (line 993) | def test_answers_are_striped() -> None: function test_clinical_tool_usage (line 1029) | async def test_clinical_tool_usage(agent_test_settings) -> None: function test_search_pagination (line 1060) | async def test_search_pagination(agent_test_settings: Settings) -> None: function test_empty_index_without_index_rebuild (line 1079) | async def test_empty_index_without_index_rebuild(agent_test_settings: Se... class TestClinicalTrialSearchTool (line 1092) | class TestClinicalTrialSearchTool: method test_continuation (line 1094) | async def test_continuation(self) -> None: function test_index_build_concurrency (line 1119) | async def test_index_build_concurrency(agent_test_settings: Settings) ->... function test_env_from_name (line 1156) | async def test_env_from_name(subtests: SubTests) -> None: FILE: tests/test_cli.py function test_can_modify_settings (line 17) | def test_can_modify_settings(capsys, stub_data_dir: Path) -> None: function test_cli_ask (line 51) | def test_cli_ask(agent_index_dir: Path, stub_data_dir: Path) -> None: function test_cli_can_build_and_search_index (line 72) | def test_cli_can_build_and_search_index( function test_settings_index_name_used_when_index_arg_is_default (line 95) | def test_settings_index_name_used_when_index_arg_is_default( FILE: tests/test_clients.py function test_title_search (line 121) | async def test_title_search(paper_attributes: dict[str, str]) -> None: function test_doi_search (line 273) | async def test_doi_search(paper_attributes: dict[str, str | list[str]]) ... function test_bulk_doi_search (line 308) | async def test_bulk_doi_search() -> None: function test_bulk_title_search (line 326) | async def test_bulk_title_search() -> None: function test_bad_titles (line 351) | async def test_bad_titles() -> None: function test_client_os_error (line 366) | async def test_client_os_error() -> None: function test_s2_title_search_edge_cases (line 392) | async def test_s2_title_search_edge_cases( function test_s2_title_search_empty_data (line 406) | async def test_s2_title_search_empty_data() -> None: function test_bad_dois (line 415) | async def test_bad_dois() -> None: function test_minimal_fields_filtering (line 424) | async def test_minimal_fields_filtering() -> None: function test_s2_only_fields_filtering (line 458) | async def test_s2_only_fields_filtering() -> None: function test_crossref_journalquality_fields_filtering (line 484) | async def test_crossref_journalquality_fields_filtering() -> None: function test_author_matching (line 535) | async def test_author_matching() -> None: function test_odd_client_requests (line 577) | async def test_odd_client_requests() -> None: function test_ensure_robust_to_timeouts (line 626) | async def test_ensure_robust_to_timeouts() -> None: function test_bad_init (line 636) | def test_bad_init() -> None: function test_ensure_sequential_run (line 645) | async def test_ensure_sequential_run(caplog) -> None: function test_ensure_sequential_run_early_stop (line 691) | async def test_ensure_sequential_run_early_stop(caplog) -> None: function test_crossref_retraction_status (line 729) | async def test_crossref_retraction_status(stub_data_dir: Path) -> None: function test_reformat_name (line 772) | def test_reformat_name(name: str, expected: str) -> None: function test_arxiv_doi_is_used_when_available (line 779) | async def test_arxiv_doi_is_used_when_available() -> None: function test_tricky_journal_quality_results (line 808) | async def test_tricky_journal_quality_results(doi: str, score: int) -> N... function test_does_openalex_work (line 848) | async def test_does_openalex_work( function test_journal_quality_csv_values_are_valid (line 869) | def test_journal_quality_csv_values_are_valid() -> None: FILE: tests/test_clinical_trials.py function mock_bucket_client (line 34) | def mock_bucket_client(): function fixture_mock_client (line 40) | def fixture_mock_client() -> httpx.AsyncClient: function test_api_search_clinical_trials_success (line 45) | async def test_api_search_clinical_trials_success(mock_client) -> None: function test_api_get_clinical_trial_success (line 62) | async def test_api_get_clinical_trial_success(mock_client) -> None: function test_api_get_clinical_trial_not_found (line 75) | async def test_api_get_clinical_trial_not_found(mock_client) -> None: function test_format_to_doc_details (line 85) | def test_format_to_doc_details(): function test_add_clinical_trials_to_docs (line 99) | async def test_add_clinical_trials_to_docs(mock_client) -> None: function test_parse_clinical_trial (line 128) | def test_parse_clinical_trial(): FILE: tests/test_configs.py function test_prompt_settings_validation (line 27) | def test_prompt_settings_validation() -> None: function test_get_formatted_variables (line 40) | def test_get_formatted_variables() -> None: function test_get_settings_with_valid_config (line 53) | def test_get_settings_with_valid_config(value: MaybeSettings) -> None: function test_get_settings_missing_file (line 58) | def test_get_settings_missing_file() -> None: function test_settings_default_instantiation (line 69) | def test_settings_default_instantiation(tmpdir, subtests: SubTests) -> N... function test_index_naming (line 95) | def test_index_naming(subtests: SubTests) -> None: function test_router_kwargs_present_in_models (line 106) | def test_router_kwargs_present_in_models() -> None: function test_models_requiring_temp_1 (line 122) | def test_models_requiring_temp_1(model_name: str) -> None: function test_matches_filter_criteria (line 204) | def test_matches_filter_criteria(doc_class, doc_data, filter_criteria, e... function test_citation_prompt_current_year (line 209) | def test_citation_prompt_current_year(): function test_validity_of_bundled_configs (line 218) | def test_validity_of_bundled_configs(subtests: SubTests) -> None: function test_readme_settings_cheatsheet_accuracy (line 230) | def test_readme_settings_cheatsheet_accuracy(subtests: SubTests) -> None: FILE: tests/test_paperqa.py function fixture_docs_fixture (line 111) | async def fixture_docs_fixture(stub_data_dir: Path) -> Docs: function test_encode_id (line 123) | def test_encode_id() -> None: function test_single_author (line 131) | def test_single_author() -> None: function test_multiple_authors (line 136) | def test_multiple_authors() -> None: function test_multiple_citations (line 141) | def test_multiple_citations() -> None: function test_citations_with_pages (line 146) | def test_citations_with_pages() -> None: function test_citations_without_space (line 151) | def test_citations_without_space() -> None: function test_citations_with_commas (line 156) | def test_citations_with_commas() -> None: function test_citations_with_text (line 161) | def test_citations_with_text() -> None: function test_no_citations (line 166) | def test_no_citations() -> None: function test_malformed_citations (line 171) | def test_malformed_citations() -> None: function test_edge_case_citations (line 176) | def test_edge_case_citations() -> None: function test_citations_with_special_characters (line 181) | def test_citations_with_special_characters() -> None: function test_citations_with_nonstandard_chars (line 186) | def test_citations_with_nonstandard_chars() -> None: function test_maybe_is_text (line 197) | def test_maybe_is_text() -> None: function test_name_in_text (line 250) | def test_name_in_text() -> None: function test_extract_score (line 291) | def test_extract_score() -> None: function test_chain_completion (line 439) | async def test_chain_completion(caplog) -> None: function test_model_chain (line 512) | async def test_model_chain( function test_docs_lifecycle (line 736) | async def test_docs_lifecycle(subtests: SubTests, stub_data_dir: Path) -... function test_evidence (line 783) | async def test_evidence(stub_data_dir: Path) -> None: function test_nonduplicate_contexts (line 844) | async def test_nonduplicate_contexts() -> None: function test_json_evidence (line 875) | async def test_json_evidence(docs_fixture: Docs) -> None: function test_ablations (line 926) | async def test_ablations(docs_fixture: Docs) -> None: function test_location_awareness (line 946) | async def test_location_awareness(stub_data_dir: Path) -> None: function test_query (line 1012) | async def test_query(docs_fixture) -> None: function test_custom_context_str_fn (line 1018) | async def test_custom_context_str_fn(docs_fixture) -> None: function test_aquery_groups_contexts_by_question (line 1043) | async def test_aquery_groups_contexts_by_question(docs_fixture) -> None: function test_query_with_iteration (line 1118) | async def test_query_with_iteration(docs_fixture) -> None: function test_llmresult_callback (line 1142) | async def test_llmresult_callback(docs_fixture: Docs) -> None: function test_get_reasoning (line 1184) | async def test_get_reasoning(docs_fixture: Docs, llm: str, llm_settings:... function test_duplicate (line 1194) | async def test_duplicate(stub_data_dir: Path, tmp_path) -> None: function test_docs_with_custom_embedding (line 1253) | async def test_docs_with_custom_embedding( function test_sparse_embedding (line 1326) | async def test_sparse_embedding( function test_hybrid_embedding (line 1351) | async def test_hybrid_embedding( function test_custom_llm_custom_media (line 1386) | async def test_custom_llm_custom_media(stub_data_dir: Path) -> None: function test_docs_pickle (line 1479) | async def test_docs_pickle(stub_data_dir) -> None: function test_unrelated_context (line 1508) | async def test_unrelated_context( function test_repeat_keys (line 1541) | async def test_repeat_keys(stub_data_dir) -> None: function test_pdf_reader_w_no_match_doc_details (line 1565) | async def test_pdf_reader_w_no_match_doc_details(stub_data_dir: Path) ->... function test_pdf_reader_w_no_chunks (line 1584) | async def test_pdf_reader_w_no_chunks(stub_data_dir: Path) -> None: function test_partly_embedded_texts (line 1605) | async def test_partly_embedded_texts(defer_embeddings: bool) -> None: function test_pdf_reader_match_doc_details (line 1651) | async def test_pdf_reader_match_doc_details(stub_data_dir: Path) -> None: function test_fileio_reader_pdf (line 1712) | async def test_fileio_reader_pdf(stub_data_dir: Path) -> None: function test_fileio_reader_txt (line 1725) | async def test_fileio_reader_txt(stub_data_dir: Path) -> None: function test_resolve_page_range (line 1752) | def test_resolve_page_range( function test_parser_only_reader (line 1762) | async def test_parser_only_reader(pdf_parser: PDFParserFn, stub_data_dir... function test_chunk_metadata_reader (line 1793) | async def test_chunk_metadata_reader( function test_media_to_image_url (line 1890) | def test_media_to_image_url(subtests: SubTests) -> None: function test_parsed_media_data_or_url (line 1916) | def test_parsed_media_data_or_url() -> None: function test_parsed_media_url_only_hash_eq (line 1942) | def test_parsed_media_url_only_hash_eq() -> None: function test_image_aggregation (line 1959) | async def test_image_aggregation(stub_data_dir: Path) -> None: function test_read_doc_images_metadata (line 2000) | async def test_read_doc_images_metadata(stub_data_dir: Path) -> None: function test_read_doc_images_concurrency (line 2052) | async def test_read_doc_images_concurrency(stub_data_dir: Path) -> None: class TestMultimodalOptions (line 2082) | class TestMultimodalOptions: method test_from_value (line 2099) | def test_from_value( method test_should_parse_and_enrich_media (line 2114) | def test_should_parse_and_enrich_media( function record_non_llm_requests (line 2123) | def record_non_llm_requests( function test_image_enrichment_normal_use (line 2136) | async def test_image_enrichment_normal_use(stub_data_dir: Path) -> None: function test_image_enrichment_invalid_image (line 2266) | async def test_image_enrichment_invalid_image(caplog) -> None: function test_image_enrichment_with_oversized_image (line 2287) | async def test_image_enrichment_with_oversized_image(caplog) -> None: function test_code (line 2325) | async def test_code() -> None: function test_querying_tables (line 2338) | async def test_querying_tables(stub_data_dir: Path) -> None: function test_images (line 2382) | async def test_images(stub_data_dir: Path) -> None: function test_duplicate_media_context_creation (line 2425) | async def test_duplicate_media_context_creation(stub_data_dir: Path) -> ... function test_images_corrupt (line 2465) | async def test_images_corrupt(stub_data_dir: Path, caplog) -> None: function test_equations (line 2532) | async def test_equations(stub_data_dir: Path, parser: PDFParserFn) -> None: function test_missing_page_doesnt_crash_us (line 2563) | def test_missing_page_doesnt_crash_us() -> None: function test_zotero (line 2579) | def test_zotero() -> None: function test_too_much_evidence (line 2588) | async def test_too_much_evidence( function test_custom_prompts (line 2610) | async def test_custom_prompts(stub_data_dir: Path) -> None: function test_pre_prompt (line 2629) | async def test_pre_prompt(stub_data_dir: Path) -> None: function test_post_prompt (line 2650) | async def test_post_prompt(stub_data_dir: Path) -> None: function test_external_doc_index (line 2663) | async def test_external_doc_index(stub_data_dir: Path) -> None: function test_context_inner_outer_prompt (line 2676) | async def test_context_inner_outer_prompt(stub_data_dir: Path) -> None: function test_get_index_name_uniqueness (line 2717) | def test_get_index_name_uniqueness( function test_case_insensitive_matching (line 2731) | def test_case_insensitive_matching(): function test_dois_resolve_to_correct_journals (line 2752) | def test_dois_resolve_to_correct_journals(doi_journals): function test_none_values (line 2757) | def test_none_values() -> None: function test_docdetails_merge_with_non_list_fields (line 2765) | def test_docdetails_merge_with_non_list_fields() -> None: function test_docdetails_merge_with_list_fields (line 2799) | def test_docdetails_merge_with_list_fields() -> None: function test_docdetails_deserialization (line 2833) | def test_docdetails_deserialization(tmp_path) -> None: function test_docdetails_doc_id_roundtrip (line 2892) | def test_docdetails_doc_id_roundtrip() -> None: function test_partitioning_fn_docs (line 3048) | async def test_partitioning_fn_docs(use_partition: bool) -> None: class TestLLMParseJson (line 3159) | class TestLLMParseJson: method test_basic_json_extraction (line 3197) | def test_basic_json_extraction(self, input_text: str) -> None: method test_handling_newlines (line 3211) | def test_handling_newlines(self, input_text: str) -> None: method test_relevance_score_parsing (line 3260) | def test_relevance_score_parsing(self, input_text: str) -> None: method test_json_keys (line 3304) | def test_json_keys(self, input_text: str) -> None: method test_json_broken_formatting (line 3338) | def test_json_broken_formatting(self, input_text: str) -> None: method test_fallback_non_json (line 3355) | def test_fallback_non_json(self, input_text: str) -> None: method test_llm_parse_json_with_escaped_characters (line 3366) | def test_llm_parse_json_with_escaped_characters(self, input_text, expe... method test_llm_subquotes_and_newlines (line 3378) | def test_llm_subquotes_and_newlines(self, input_text: str) -> None: function test_maybe_get_date (line 3388) | def test_maybe_get_date(): function test_clean_possessives (line 3418) | def test_clean_possessives(raw_text: str, cleaned_text: str) -> None: function test_pqa_context_id_parsing (line 3475) | def test_pqa_context_id_parsing(raw_text: str, cleaned_text: str) -> None: function test_timeout_resilience (line 3543) | async def test_timeout_resilience() -> None: function test_parse_pdf_string_resolution (line 3593) | def test_parse_pdf_string_resolution() -> None: function test_reader_config_propagation (line 3648) | async def test_reader_config_propagation(stub_data_dir: Path, multimodal... function test_parse_office_doc (line 3687) | async def test_parse_office_doc(stub_data_dir: Path, filename: str, quer... function test_text_comparison (line 3711) | def test_text_comparison() -> None: function test_context_comparison (line 3768) | def test_context_comparison() -> None: FILE: tests/test_utils.py function test_citation_to_docname_acronym_title (line 4) | def test_citation_to_docname_acronym_title() -> None: function test_citation_to_docname_non_text_fallback_is_deterministic (line 9) | def test_citation_to_docname_non_text_fallback_is_deterministic() -> None: