gunshotmatch_pipeline.utils

General utility functions.

Classes:

NameMapping

Class for mapping IUPAC preferred names to more common, friendlier names.

Data:

friendly_name_mapping

Mapping of IUPAC preferred names to more common, friendlier names.

Functions:

project_plural(n)

unknown_plural(n)

project_plural(*args, **kwargs) = Plural('project', 'projects')

domdf_python_tools.words.Plural for project.

unknown_plural(*args, **kwargs) = Plural('unknown', 'unknowns')

domdf_python_tools.words.Plural for unknown.

New in version 0.9.0.

friendly_name_mapping

Type:    NameMapping

Mapping of IUPAC preferred names to more common, friendlier names.

class NameMapping[source]

Bases: Dict[str, str]

Class for mapping IUPAC preferred names to more common, friendlier names.

On lookup, if the name has no known alias the looked-up name is returned.

New in version 0.4.0.

The module also provides either tomli or tomllib (depending on Python version) through the tomllib attribute.