-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Make project table optional for pyproject.toml
manifests
#1732
feat: Make project table optional for pyproject.toml
manifests
#1732
Conversation
pyproject.toml
manifestspyproject.toml
manifests
9434b92
to
4962401
Compare
4962401
to
e8fb7bd
Compare
19dd54d
to
704d02f
Compare
704d02f
to
2782880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !! Looks good to me! And works like a charm.
Asked @tdejager for another quick review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The only thing I would change, is maybe if the name does not exist add it to the pyproject
project
table instead of the tool.pixi
this makes it more standard-compliant. The only downside I can see is if you want to not use that name for a wheel build, but that would be pretty strange. WDYT @olivier-lacroix ?
With some closer look, it seems to be a bit difficult to do this, I would like it but lets postpone, I'll approve and merge as is for now. |
Thx @tdejager ! Maybe useful to have @pavelzw thoughts on this as well: I think I remember him not liking pixi imposing the creation of that table. I do not see any difficulty in implementing it though: if |
This Fixes #1687 and #1207 by keeping the
[project]
table optional inpyproject.toml
.The
[project]
table had been made mandatory to make sure a name was defined. Now, the project name is read from, in order of priority[tool.pixi.project]
table[project]
table[tool.poetry]
tableThe same is done for project description, version and authors.
During init, if the name cannot be read from the
[project]
table or the[tool.poetry]
table, a default name (inferred from the directory name) is added to the[tool.pixi.project]
This PR also refactors handling of
pyproject.toml
: both pixi and non-pixipyproject.toml
are now read into the samePyProjectManifest
struct, with existence checking of the[tool.pixi.project]
table managed outside of serde when necessary.