HumanSignal / HumanSignal/label-studio
Changes to the "pyproject.toml" file when executing the command "poetry install"
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
When installing locally through the source code, execute the command `poetry install`, the actual operation times error, prompt:
```
The Poetry configuration is invalid:
- 'name' is a required property
- 'version' is a required property
- 'description' is a required property
- 'authors' is a required property
```
**The reason is that "pyproject.toml" uses a mixture of `[project]` and `[tool.poetry]` configurations, and if there is a conflict between the two, you should just cut the contents of the former into the latter.**
When you run the command again, there is still an error, as follows:
```
The Poetry configuration is invalid:
- [authors.0] {'name': 'HumanSignal', 'email': 'support@humansignal.com'} is not of type 'string'
- Additional properties are not allowed ('requires-python' was unexpected)
```
**In this case:**
1. Change `authors = ["HumanSignal "]` because Poetry requires authors to be lists of strings;
2. Remove the "requirements-python" line from `[tool.poetry]` because it is configured correctly under `[tool.poetry.dependencies]`. This is because Python version constraints should be defined in the python field under `[tool.poetry.dependencies]`, not directly in `[tool.poetry]`.
When you modify "pyproject.toml" correctly, you can execute a series of official guidance commands smoothly.
Therefore, I raise this issue and hope it will be helpful. Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.