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
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@ Python projects contained in this directory or lower will be discovered. Defaul
18
18
19
19
-**projects**: JSON array of all found projects ([project object](#project-object-output-shape))
20
20
21
-
-**testable-projects**: JSON array of all found projects ([project object](#project-object-output-shape)) that implement a `test` command in `pyproject.toml` (See [Project Commands](#project-commands))
22
-
23
-
-**packageable-projects**: JSON array of all found projects ([project object](#project-object-output-shape)) that implement a `package`command in `pyproject.toml` (See [Project Commands](#project-commands))
21
+
-**projects-by-command**: JSON object with keys corresponding to the name of discovered commands
22
+
(eg `install`, `test`, `package`, etc.) in all projects, with an array value containing each
23
+
[project object](#project-object-output-shape) that implements the command.
24
24
25
25
26
26
## Project object output shape
@@ -36,21 +36,19 @@ These are the fields for `project` objects in the output:
36
36
37
37
-**pythonVersion**: Value of `[project.requires-python]` or `[tool.poetry.dependencies.python]` from `pyproject.toml`
38
38
39
-
-**installCommand**: The shell command to run to create and install dependencies into the virtual environment.
40
-
This can either be specified explicitly in `[tool.tasks.install]` or deduced from the `[build-system.build-backend]`
41
-
42
-
-**testCommand**: The shell command to run to execute the tests for the project.
43
-
44
-
-**packageCommand**: The shell command to run to execute packaging operations for the project.
39
+
-**commands**: Object with keys for each discovered command and the shell command as the value.
40
+
This is dynamically constructed from the `pyproject.toml` content.
45
41
46
42
47
43
## Project Commands
48
44
In the absence of Python standards for expressing internal project CI/CD/Dev operations, this action tries to unify the various known ways in the wild.
49
45
50
-
This action recognizes the following typical CI related shell commands:
46
+
This action will surface any command you specify in the pyproject.toml files. Typically you'll
47
+
want to define one or more of the following for your CI/CD system::
51
48
52
49
-`test`
53
50
-`package`
51
+
-`publish`
54
52
55
53
In order to make these commands available in the action output, you'll need to define them in `pyproject.toml` using a section appropriate for the particular tools you are using in the project. You can specify all, some, or none, depending on what you need available.
56
54
@@ -59,6 +57,9 @@ This action will pull the command from the first entry it finds in any of the fo
This action perfoms special treatment for surfacing the `install` command. Namely, if it is not explicitly specified, the action will attempt to generate a default based on the packaging backend (eg Poetry, PDM) that it discovers.
62
+
The intent is that you do not need to specify an `install` command in your pyproject.toml, but you can if necessary.
62
63
63
64
### Where is the support for `[tool.poetry.scripts]`?
64
65
Unfortunately, [Poetry scripts](https://python-poetry.org/docs/pyproject/#scripts) is for specifying commands that are made available to consumers of a package. It isn't meant for CI/CD or developer operations and doesn't meet those needs, primarily because any scripts you define in this section will be added as executable shortcuts to your virtual environment or any virtual environment your package is installed into.
0 commit comments