Recipe Metadata#
This section describes the recipe_metadata
submodule of the API (esmvalcore.experimental
).
API reference#
API for recipe metadata.
Classes:
|
Contains contributor (author or maintainer) information. |
|
Use this class to acknowledge a project associated with the recipe. |
|
Parse reference information from bibtex entries. |
Exceptions:
Error during rendering of object. |
- class esmvalcore.experimental.recipe_metadata.Contributor(name: str, institute: str, orcid: str | None = None)[source]#
Bases:
object
Contains contributor (author or maintainer) information.
- Parameters:
Methods:
from_dict
(attributes)Return an instance of Contributor from a dictionary.
from_tag
(tag)Return an instance of Contributor from a tag (
TAGS
).- classmethod from_dict(attributes)[source]#
Return an instance of Contributor from a dictionary.
- Parameters:
attributes (dict) – Dictionary containing name / institute [/ orcid].
- classmethod from_tag(tag: str) Contributor [source]#
Return an instance of Contributor from a tag (
TAGS
).- Parameters:
tag (str) – The contributor tags are defined in the authors section in
config-references.yml
.- Return type:
- class esmvalcore.experimental.recipe_metadata.Project(project: str)[source]#
Bases:
object
Use this class to acknowledge a project associated with the recipe.
- Parameters:
project (str) – The project title.
Methods:
from_tag
(tag)Return an instance of Project from a tag (
TAGS
).
- class esmvalcore.experimental.recipe_metadata.Reference(filename: str)[source]#
Bases:
object
Parse reference information from bibtex entries.
- Parameters:
filename (str) – Name of the bibtex file.
- Raises:
NotImplementedError – If the bibtex file contains more than 1 entry.
Methods:
from_tag
(tag)Return an instance of Reference from a bibtex tag.
render
([renderer])Render the reference.
- exception esmvalcore.experimental.recipe_metadata.RenderError[source]#
Bases:
BaseException
Error during rendering of object.
Methods:
add_note
(object, /)Exception.add_note(note) -- add a note to the exception
with_traceback
(object, /)Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note(object, /)#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback(object, /)#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.