adsfolio.cv.config

Configuration loading for adsfolio cv.

class adsfolio.cv.config.CVConfig(query, orcid, use_orcid, debut_year, retire_year, exclude_bibstems, first_author_prefix, me_target, me_display, output_format, style, n_max_authors, n_min_authors, n_me, author_sep, me_fmt, author_format, markers, status, output_dir, output_filename, journal_legend, latex_list_env, latex_left_margin, latex_item_sep, template=<factory>)[source]

Bases: object

Immutable runtime config for CV generation.

Parameters:
author_format: str
author_sep: str
debut_year: int | None
exclude_bibstems: tuple[str, ...]
first_author_prefix: str
journal_legend: bool
latex_item_sep: str
latex_left_margin: str
latex_list_env: str
markers: dict[str, adsfolio.cv.config.MarkerConfig]
me_display: str
me_fmt: str
me_target: str
n_max_authors: int
n_me: int
n_min_authors: int
orcid: str
output_dir: pathlib.Path
output_filename: str
output_format: Literal['latex', 'markdown', 'template']
property output_path: pathlib.Path[source]

Path where generated output is written.

query: str
retire_year: int | None
status: dict[str, str]
style: str
template: adsfolio.cv.template.CVTemplate
use_orcid: bool
class adsfolio.cv.config.MarkerConfig(symbol, description, bibcodes)[source]

Bases: object

Marker configuration for a bibcode category.

Parameters:
bibcodes: frozenset[str]
description: str
symbol: str
adsfolio.cv.config.build_query(cfg)[source]

Combine base query and bibstem exclusions into one Solr query.

Parameters:

cfg (adsfolio.cv.config.CVConfig)

Return type:

str

adsfolio.cv.config.config_from_mapping(raw, config_path)[source]

Validate a parsed cv.yaml mapping and build a CVConfig.

Parameters:
  • raw (dict) – The YAML content as a mapping.

  • config_path (Path) – The YAML location. Relative output.dir values resolve against its folder.

Raises:

ValueError – If a field has an invalid value or author.query is empty.

Return type:

adsfolio.cv.config.CVConfig

adsfolio.cv.config.load_config(path)[source]

Load cv.yaml from disk.

Parameters:

path (pathlib.Path)

Return type:

adsfolio.cv.config.CVConfig

adsfolio.cv.config.load_template(template_cfg)[source]

Build a CVTemplate from the template YAML section.

A preset key fills every part from TEMPLATE_PRESETS. Explicit keys then replace the preset’s parts.

Returns:

The template and the preset name, or None without a preset.

Return type:

tuple[CVTemplate, str or None]

Parameters:

template_cfg (dict[str, Any])

adsfolio.cv.config.normalize_author_format(author_format)[source]

Normalize and validate CV author format option.

Parameters:

author_format (str)

Return type:

str