Skip to content

fix(pyproject): allow long project description - #171

Open
noelmcloughlin wants to merge 1 commit into
linkml:mainfrom
lmodel:pyproject
Open

fix(pyproject): allow long project description#171
noelmcloughlin wants to merge 1 commit into
linkml:mainfrom
lmodel:pyproject

Conversation

@noelmcloughlin

Copy link
Copy Markdown
Contributor

Description

This PR allows long project descriptions

Issue

When a long value is supplied for the project description, the template produces value inside a basic TOML string ("...") that wraps onto a second physical line. TOML basic strings cannot contain a raw newline.

To reproduce, generate a project (e.g. via copier copy of linkml-project-copier) and answer the project.description question with a long string such as:

Project with a really long description that should be shorter but is long because we decided to expand acronyms to be descriptive

The rendered pyproject.toml contains:

The rendered pyproject.toml contains:

[project]
name = "nist_ai_600_1"
description = "Project with a really long description that should be shorter but is long because we
decided to expand acronyms to be descriptive"

Running any uv command then fails:

warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 8, column 14

@dalito

dalito commented May 29, 2026

Copy link
Copy Markdown
Member

Can you look at where the description is re-used (it is at least in the package __init__.py) and wrap it with the wordwrap filter.

Another solution could be to use """ multiline-strings of toml in pyproject.toml.

@noelmcloughlin

Copy link
Copy Markdown
Contributor Author

Probably this would work since its part of spec.

description = """{{project_description}}""""

I think its best to fix at source since some other tools could trip over this pyproject.toml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants