httk.core.citations¶
Import-tracked citation credits for scientific dependencies.
Modules register Reference records for what they scientifically rely
on. print(httk.core.credits) shows what the running program ought to cite
and why.
Attributes¶
Classes¶
Present the citation credits registered by imported modules. |
Functions¶
|
Register one or more references under a human-readable explanation. |
Module Contents¶
- httk.core.citations.register_citation(*, applies_to, references)[source]¶
Register one or more references under a human-readable explanation.
References are normalized on registration and duplicate references under the same explanation are retained only once. The registration is visible through
credits, allowing imported modules to contribute their citation requirements as they are loaded.- Parameters:
applies_to (str) – Human-readable explanation of when the references apply.
references (httk.core.entry_types.Reference | collections.abc.Mapping[str, Any] | collections.abc.Sequence[httk.core.entry_types.Reference | collections.abc.Mapping[str, Any]]) – One reference, mapping, or sequence of references to register.
- Raises:
TypeError – If
referencesis not a reference, mapping, or sequence of references.ValueError – If
applies_tois invalid orreferencesis empty.
- class httk.core.citations.Credits[source]¶
Present the citation credits registered by imported modules.
- httk.core.citations.HTTK_REFERENCE: httk.core.entry_types.Reference[source]¶