-
Notifications
You must be signed in to change notification settings - Fork 210
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
pixi init
broken with incomplete pyproject.toml
#1207
Comments
Another option would be to gate the pyproject.toml init behind the —pyproject flag for both new and existing pyproject.toml |
I guess that would makes sense, or spawn a interactive choice |
This Fixes #1687 and #1207 by keeping the `[project]` table optional in `pyproject.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 - the `[tool.pixi.project]` table - the `[project]` table - the `[tool.poetry]` table The 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-pixi `pyproject.toml` are now read into the same `PyProjectManifest` struct, with existence checking of the `[tool.pixi.project]` table managed outside of serde when necessary. --------- Co-authored-by: Ruben Arts <[email protected]>
I believe we can close this issue, as pixi init is no more broken with incomplete pyproject.toml :-) And the choice between pixi.toml / pyproject.toml on init is tracked in #1615 |
…1640) Adds a dialog for `pyproject.toml` use, and an option to overwrite the dialog with `--format pixi` ``` > pixi init --format pixi # forces to always use pixi.toml # And: > touch pyproject.toml > pixi init A 'pyproject.toml' file already exists. Do you want to extend it with the [tool.pixi] configuration? [y/N] ``` Fixes #1615 #1207 --------- Co-authored-by: Bas Zalmstra <[email protected]>
Fixed by #1640 Now you can do |
I personally would prefer to still be able to use the
pixi.toml
workflow and not be forced to usepyproject.toml
as thepyproject.toml
workflow always(?) introduces[pypi-dependencies]
as this results in other issues (#1046). Maybe a prompt asking whether pixi should init intopyproject.toml
orpixi.toml
?The text was updated successfully, but these errors were encountered: