英文:
Should the toml file be added to version control for a python poetry managed project?
问题
"Should the pyproject.toml
file be added to version control for a python poetry managed project? The poetry documentation mentions adding the lock file, however I was unable to find guidance on the pyproject.toml
file."
https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
英文:
Should the pyproject.toml
file be added to version control for a python poetry managed project? The poetry documentation mentions adding the lock file, however I was unable to find guidance on the pyproject.toml
file.
https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
答案1
得分: 2
是的,你应该这样做。
pyproject.toml
是基于 Poetry 的项目的核心。它包含了像名称和版本之类的元数据以及直接依赖项的定义。
没有这个文件,就无法安装项目及其依赖项。此外,你也无法构建和发布包。
锁定文件本身并不包含足够的信息来安装项目(https://github.com/python-poetry/poetry/issues/1301)。
英文:
Yes, you should.
The pyproject.toml
is the heart of your Poetry based project. It contains the metadata like name and version and the definitions of the direct dependencies.
Without this file it is impossible to install the project and its dependencies. Furthermore you cannot build and publish the package.
The lock file only does not include enough information to install the project (https://github.com/python-poetry/poetry/issues/1301).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论