python-poetry / python-poetry/poetry
Saving custom scripts in pyproject.toml (alias npm run)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Feature Request
What do you think of having a scripts described in pyproject.toml ? Something like Procfile or script section in packages.json.
Here is a suggestion of configuration & usage:
[tools.poetry.proc]
build = "python manage.py collectstatic"
test = "pytest tests/unit/"
serve = "flask run"
$ poetry proc build
...
$ poetry proc serve
...
I think it would help project to not require Makefile nor tox to share commands and in the same time, ensure commands are properly executed in selected environment.
What do you think of this ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal centers on a new [tools.poetry.proc] section in pyproject.toml and poetry proc commands. Begin by tracing Poetry's existing command and configuration entry points; done would mean agreed behavior for defining and executing named scripts in the selected environment, including the build, test, and serve examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100