You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support reading [project] name, version and description from pyproject.toml #638
Thanks for the input, but we're not going to support reading from pyproject.toml only partly. We either support what is stated in #79 or we should not read from the pyproject.toml at all in my opinion.
This is clearly not a duplicate of #79, which proposes that Pixi only uses pyproject.toml.
I don't understand why it would be so bad to read some [project] data from a pyproject.toml file while keeping a pixi.toml file. In my point of view, it is not necessary to put everything in pyproject.toml and I have nothing against pixi.toml (which anyway should be supported for projects not related to Python).
However, it is really very annoying for Python projects to duplicate in 2 files the same data, in particular things as basic as what is in pyproject.toml [project]. Do you really want your users to duplicate the version string in these two files? Why would it be useful? What happens if we accidentally change one (for example the proper one for a Python project, in pyproject.toml) and not the other?
Note that if you support using pyproject.toml to store pixi related data (#79), there will be the same problem because you will have
[project]
name = "fluidsim"
version = "0.8.0"
description = "..."
[tool.pixi.project]
# we don't want to duplicate the name, version and description here!
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.dependencies]
...
We appreciate you taking an interest in helping pixi improve. However, I'd like to request that we keep our discussions focused and constructive.
This way of reading two files is not what we want to do with pixi because we believe in "one source of truth", that being the pixi.toml.
That said you're always free to build it yourself and submit a PR which might change our view on the subject, this holds for any change.
I was confused by your argument as we don't force the user to define anything in the project accept name, platforms and channels which is a bare minimum for pixi to work. I updated the documentation to clarify that these are the only ones.
Since you believe in "one source of truth" (meaning only one file), for Python projects, this has to be pyproject.toml and only this file. Python has a Python Packaging Authority, many related recent PEPs and a nice dynamics on packaging related to what is done by PyPA (PDM is a nice example and IMHO Pixi should also take inspiration from this project). It's counter productive not to follow the results of this standardization effort when you can.
It sounds like a criticism and I don't think I deserve that.
This is how I felt about your earlier message, if that was not the case for your message maybe its the translation boundary that made me think that.
I think loosing version from the pixi init is a good idea. The meta information in the project is mostly there to support a build tool. We've had a PR in pixi to have a pixi build command which has been delayed but some of the preliminary work was already in. This is also the case for the build-dependencies and host-dependencies for instance. This doesn't win any beauty contests but I think we're such a fast moving development team that your unfortunately going to have some of these artifacts while developing.
Most of our PEP integrations are done in rip as that is the library we use to support PyPI specific work.
All current ideas seem to include that we will support the pyproject.toml in the future, but lets continue that story in issue #79.
Just a thought but I think some of this can already be achieved by using the dynamic feature of pyproject.toml. Instead of storing the version in the pyproject.toml it would actually be read from the pixi.toml.
But I guess that requires a little pixi-build-helpers library or something. 🤔 Would be very interesting to explore that a little further. Might be a good initial first step to support pyproject.toml
Activity
baszalmstra commentedon Jan 9, 2024
Duplicate of #79
pyproject.tomlas an alternative topixi.toml#79ruben-arts commentedon Jan 9, 2024
Thanks for the input, but we're not going to support reading from
pyproject.tomlonly partly. We either support what is stated in #79 or we should not read from the pyproject.toml at all in my opinion.Closing issue for now.
paugier commentedon Jan 10, 2024
This is clearly not a duplicate of #79, which proposes that Pixi only uses
pyproject.toml.I don't understand why it would be so bad to read some
[project]data from apyproject.tomlfile while keeping apixi.tomlfile. In my point of view, it is not necessary to put everything inpyproject.tomland I have nothing againstpixi.toml(which anyway should be supported for projects not related to Python).However, it is really very annoying for Python projects to duplicate in 2 files the same data, in particular things as basic as what is in
pyproject.toml [project]. Do you really want your users to duplicate the version string in these two files? Why would it be useful? What happens if we accidentally change one (for example the proper one for a Python project, inpyproject.toml) and not the other?Note that if you support using
pyproject.tomlto storepixirelated data (#79), there will be the same problem because you will haveruben-arts commentedon Jan 10, 2024
He @paugier,
We appreciate you taking an interest in helping pixi improve. However, I'd like to request that we keep our discussions focused and constructive.
This way of reading two files is not what we want to do with
pixibecause we believe in "one source of truth", that being thepixi.toml.That said you're always free to build it yourself and submit a PR which might change our view on the subject, this holds for any change.
I was confused by your argument as we don't force the user to define anything in the
projectacceptname,platformsandchannelswhich is a bare minimum for pixi to work. I updated the documentation to clarify that these are the only ones.paugier commentedon Jan 10, 2024
To be honest, I don't understand why you tell me that. It sounds like a criticism and I don't think I deserve that.
About version, it is filled by default by
pixi init. The user has to read the doc and find https://pixi.sh/configuration/#version-optional to discover that is it optional. But this documentation does not say how it is used by Pixi. Is it useful to maintain this field for a Python project? If it is useful I continue to think that this is not a good design for Python projects.Since you believe in "one source of truth" (meaning only one file), for Python projects, this has to be
pyproject.tomland only this file. Python has a Python Packaging Authority, many related recent PEPs and a nice dynamics on packaging related to what is done by PyPA (PDM is a nice example and IMHO Pixi should also take inspiration from this project). It's counter productive not to follow the results of this standardization effort when you can.If you think "only one file" is important:
pyproject.toml(Supportpyproject.tomlas an alternative topixi.toml#79)pixi initshould not createpixi.tomlfor projects usingpyproject.tomlpixi.tomlhas to be deprecated for projects usingpyproject.tomlruben-arts commentedon Jan 10, 2024
This is how I felt about your earlier message, if that was not the case for your message maybe its the translation boundary that made me think that.
I think loosing
versionfrom thepixi initis a good idea. The meta information in theprojectis mostly there to support a build tool. We've had a PR in pixi to have apixi buildcommand which has been delayed but some of the preliminary work was already in. This is also the case for thebuild-dependenciesandhost-dependenciesfor instance. This doesn't win any beauty contests but I think we're such a fast moving development team that your unfortunately going to have some of these artifacts while developing.Most of our PEP integrations are done in
ripas that is the library we use to support PyPI specific work.All current ideas seem to include that we will support the
pyproject.tomlin the future, but lets continue that story in issue #79.baszalmstra commentedon Jan 10, 2024
Just a thought but I think some of this can already be achieved by using the
dynamicfeature ofpyproject.toml. Instead of storing the version in thepyproject.tomlit would actually be read from thepixi.toml.E.g. (see: https://peps.python.org/pep-0621/#dynamic)
But I guess that requires a little
pixi-build-helperslibrary or something. 🤔 Would be very interesting to explore that a little further. Might be a good initial first step to supportpyproject.tomlWDYT @paugier ?
paugier commentedon Jan 15, 2024
To use
dynamic = ["version"]and read the version frompixi.toml, one would need to use a Pixi build-backend and to haveSo Pixi team would have to maintain a build backend: https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend
I personally think this task should not be done by Pixi since there are good specialized projects.