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
{{ message }}
Repository navigation
Commit 0ca72a3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@ GitHub Action to create a [Boutiques descriptor](https://boutiques.github.io/) f
8
8
|------|-------------|----------|---------|
9
9
|`parser-type`| Type of parser to serialize. Either `"argparse"` or `"click"`. | yes |`argparse`|
10
10
|`parser-location`| Module path to and name of function that produces the `argparse.ArgumentParser` or `click.Command` object. E.g., `"my_package.my_module:my_func_name"`. | yes | — |
11
+
|`prog-name`| Program name to use. **Highly recommended** if the name is not explicitly set in the parser source code. | no | — |
11
12
|`output-path`| Where the output Boutiques description file should be written. | yes | — |
12
13
|`open-pr`| Whether to open a pull request with the generated descriptor. A GitHub token must be provided as well. | no |`true`|
13
14
|`token`| GitHub token with write permissions for `contents` and `pull-requests`. Required if `open-pr` is true. | no | — |
14
-
|`click-prog-name`| Program name to use for the Click parser type. By default this will be the name of the decorated function. | no | — |
15
15
|`click-parent-location`| Module path to and name of function that produces the `click.Group` object that contains the `click.Command` object to serialize. E.g., `"my_package.my_module:my_func_name"`. Needed for nested commands. | no | — |
16
16
|`exclude-version`| Whether to exclude the `tool-version` field in the Boutiques descriptor even if version information is available. Enabled by default because dynamic versioning schemes can cause the descriptor to be updated on every commit. | no |`true`|
17
17
|`updates-file`| Path to a JSON file with updates to apply to the generated Boutiques descriptor. The file should contain a map of dot/bracket paths to values (e.g. `{"description": "new desc"}`). | no | — |
@@ -46,6 +46,7 @@ jobs:
46
46
with:
47
47
parser-type: argparse
48
48
parser-location: my_tool.cli:get_parser
49
+
prog-name: my_tool
49
50
output-path: descriptor.json
50
51
token: ${{ secrets.TOKEN }}
51
52
```
@@ -62,6 +63,7 @@ This can be used for example to add a `"container-image"` field:
Copy file name to clipboardExpand all lines: action.yml
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ inputs:
8
8
parser-location:
9
9
description: Module path to and name of function that produces the argparse.ArgumentParser or click.Command objects. E.g., "my_package.my_module:my_func_name"
10
10
required: true
11
+
prog-name:
12
+
description: Program name to use. Highly recommended if the name is not explicitly set in the parser source code.
13
+
required: false
11
14
output-path:
12
15
description: Where the output Boutiques description file should be written
13
16
required: true
@@ -18,9 +21,6 @@ inputs:
18
21
token:
19
22
description: GitHub token with write permissions for "contents" and "pull-requests". Required if open-pr is true.
20
23
required: false
21
-
click-prog-name:
22
-
description: Program name to use for the Click parser type. By default this will be the name of the decorated function.
23
-
required: false
24
24
click-parent-location:
25
25
description: Module path to and name of function that produces the click.Group object that contains the click.Command object to serialize. E.g., "my_package.my_module:my_func_name". This is needed for nested commands.
26
26
required: false
@@ -38,6 +38,11 @@ inputs:
38
38
description: Whether to validate the generated Boutiques descriptor. If this is set to true, the action will fail if the descriptor is invalid.
39
39
required: false
40
40
default: false
41
+
# TODO deprecate in v2
42
+
click-prog-name:
43
+
description: Program name to use for the Click parser type. By default this will be the name of the decorated function.
44
+
deprecationMessage: This input is deprecated and will be removed in a future release. Use the "prog-name" input instead.
45
+
required: false
41
46
42
47
runs:
43
48
using: composite
@@ -53,6 +58,9 @@ runs:
53
58
echo "::error::token must be provided if open-pr is true"
54
59
exit 2
55
60
fi
61
+
if [[ ! -z "${{ inputs.click-prog-name }}" && ! -z "${{ inputs.prog-name }}" ]]; then
62
+
echo "::warning::Both click-prog-name and prog-name were provided: using prog-name."
0 commit comments