Skip to content

Citations

REvoDesign.citations.CitationManager

Bases: SingletonAbstract

CitationManager is responsible for managing citations in a singleton pattern, ensuring that only one instance of the citation manager exists throughout the application's lifecycle.

collected_citations property

Collect all citations and return them as a list of strings.

Returns:

Type Description
list[str]

list[str]: A list containing all collected citations.

update(new_citations)

Update the citation manager with new citations.

Parameters:

Name Type Description Default
new_citations dict

A dictionary containing new citations.

required

clear()

Clear all citations from the citation manager.

output(cwd='.')

Output the citations to a .bib file in the specified directory.

Parameters:

Name Type Description Default
cwd str

The directory where the citations should be output. Defaults to the current directory.

'.'

dismiss(modulename)

Dismiss the citation for a specific module, preventing it from being included in the output.

Parameters:

Name Type Description Default
modulename str

The name of the module whose citation is to be dismissed.

required

REvoDesign.citations.CitableModuleAbstract

Bases: ABC

An abstract base class for modules that require citation.

This class provides methods to handle the citation notice and citation information in a standardized way.

notice() classmethod

Display the citation notice.

This method checks if there are citations to be displayed, and if the current module's citations have not been silenced, it logs the citation information.

cite() classmethod

Add citation to the citation manager.

This method adds the current module's citation information to the citation manager and then displays the citation notice.

get_citable_class(func) classmethod

Get the citable class from a function.

Parameters:

Name Type Description Default
func Callable

The function from which to get the citable class.

required

Returns: CitableModuleAbstract: The citable class associated with the function.