CitationMixin

class torch_ecg.utils.CitationMixin[source]

Bases: bib_lookup.citation_mixin.CitationMixin

Mixin class for getting citations from DOIs.

get_citation(lookup: bool = True, format: Optional[str] = None, style: Optional[str] = None, timeout: Optional[float] = None, print_result: bool = True) Optional[str][source]

Get bib citation from DOIs.

Overrides the default method to make the print_result argument have default value True.

Parameters
  • lookup (bool, default True) – Whether to look up the citation from the cache.

  • format (str, optional) – The format of the citation. If not specified, the citation will be returned in the default format (bibtex).

  • style (str, optional) – The style of the citation. If not specified, the citation will be returned in the default style (apa). Valid only when format is "text".

  • timeout (float, optional) – The timeout for the request.

  • print_result (bool, default True) – Whether to print the citation.

Returns

bib citation(s) from the DOI(s), or None if print_result is True.

Return type

str or None