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

Credits

Present the citation credits registered by imported modules.

Functions

register_citation(*, applies_to, references)

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:
Raises:
  • TypeError – If references is not a reference, mapping, or sequence of references.

  • ValueError – If applies_to is invalid or references is empty.

class httk.core.citations.Credits[source]

Present the citation credits registered by imported modules.

entries()[source]

Return a snapshot of the registered citation entries.

Returns:

Explanations mapped to immutable snapshots of their references.

Return type:

dict[str, tuple[httk.core.entry_types.Reference, Ellipsis]]

httk.core.citations.credits[source]
httk.core.citations.HTTK_REFERENCE: httk.core.entry_types.Reference[source]