This commit is contained in:
Sina Atalay 2023-10-15 18:45:14 +02:00
parent 4860bdf785
commit ca2a2719f6
3 changed files with 8 additions and 17 deletions

View File

@ -38,27 +38,17 @@ Source = 'https://github.com/sinaatalay/rendercv'
rendercv = 'rendercv.rendering:main' rendercv = 'rendercv.rendering:main'
[project.optional-dependencies] [project.optional-dependencies]
docs = [ docs = ["mkdocs", "mkdocs-material", "mkdocstrings-python"]
"mkdocs", testing = ["coverage", "pytest", "pytest-cov"]
"mkdocs-material", linting = ["black", "ruff"]
"mkdocstrings-python",
]
testing = [
"coverage",
"pytest",
"pytest-cov",
]
linting = [
"black",
"ruff"
]
[build-system] [build-system]
# Use setuptools-scm to be able to include TinyTeX in the package
requires = ['setuptools>=68.2.2', "setuptools-scm>=8.0.4"] requires = ['setuptools>=68.2.2', "setuptools-scm>=8.0.4"]
build-backend = 'setuptools.build_meta' build-backend = 'setuptools.build_meta'
# [tool.ruff] [tool.ruff]
# line-length = 88 line-length = 88
[tool.coverage.run] [tool.coverage.run]
source = ['rendercv'] source = ['rendercv']

View File

@ -31,5 +31,6 @@ def main(args=sys.argv[1:]):
output_latex_file = render_template(data) output_latex_file = render_template(data)
run_latex(output_latex_file) run_latex(output_latex_file)
if __name__ == "__main__": if __name__ == "__main__":
main(args=["tests/inputs/personal.yaml"]) main(args=["tests/inputs/personal.yaml"])

View File

@ -1236,7 +1236,7 @@ class RenderCVDataModel(BaseModel):
design: Design = model.design design: Design = model.design
cv: CurriculumVitae = model.cv cv: CurriculumVitae = model.cv
section_titles = [section.title for section in cv.sections] section_titles = [section.title for section in cv.sections]
for title in design.options.show_timespan_in: # type: ignore for title in design.options.show_timespan_in: # type: ignore
if title not in section_titles: if title not in section_titles:
raise ValueError( raise ValueError(
f'The section "{title}" that is specified in the' f'The section "{title}" that is specified in the'