coldp.NameBundle

Class

NameBundle.__init__(coldp, accepted, incertae_sedis=False, sic=False)

Wrapper class to manage set of associated names, normally an accepted name and one or more synonyms. The bundle handles the logic of associated name variations.

Parameters:
  • coldpCOLDP object to handle logging of any issues and normalise name records

  • accepted – Dictionary mapping COLDP name elements to values for the accepted name - a name record and a taxon record will be added to the COLDP package for the accepted name

  • incertae_sedis – Flag to indicate if the resulting taxon record should be marked “incertae sedis”

  • sic – Flag to indicate if the accepted name should be processed without reporting issues for invalid format

The minimal usage is to create a new bundle with an accepted name. One or more synonyms can also be supplied using the add_synonym() method. The bundle is then submitted to the coldp.COLDP.add_names() method for processing.

NameBundle objects should not be created directly. Use the coldp.COLDP.start_name_bundle() method instead.

accepted should contain a dictionary with keys that match property names from the COLDP Name class

Methods

NameBundle.add_synonym(synonym, sic=False)

Register an additional name as a synonym for the accepted name

synonym should contain a dictionary with keys that match property names from the COLDP Name class

Parameters:
  • synonym – Dictionary mapping COLDP name elements to values for the synonymous name - a name record and a synonym record will be added to the COLDP package for the synonym

  • sic – Flag to indicate that the name does not follow expected formatting rules for a code-compliant name and that no issues should be logged for this

NameBundle.normalise_name(name, sic=False)

Ensure that a name record dictionary contains all necessary/appropriate elements

Parameters:
  • name – Dictionary containing name to be normalised

  • sic – Flag to indicate that the name does not follow expected formatting rules for a code-compliant name and that no issues should be logged for this

Returns:

Name dictionary updated with extra values

NameBundle.derive_name(name, values, sic=False)

Use supplied values to create new name dictionary with missing elements copied from an existing name dictionary

Parameters:
  • name – Dictionary containing name on which new name is to be based

  • values – Dictionary of values to override values in name

Returns:

Name dictionary with supplied values supplemented from name