python-poetry / python-poetry/poetry

Saving custom scripts in pyproject.toml (alias npm run)

Open
#2,496 13 comments 91 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/plugin-api kind/feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.