CitationMixin

class torch_ecg.utils.CitationMixin[source]

Bases: CitationMixin

Mixin class for getting citations from DOIs.

get_citation(lookup: bool = True, format: str | None = None, style: str | None = None, timeout: float | None = None, print_result: bool = True) str | None[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