File: run_optional.py

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (28 lines) | stat: -rw-r--r-- 934 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import argparse
from ci_tools.scenario.generation import prepare_and_test_optional


if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description="""This entrypoint provides automatic invocation of the 'optional' requirements for a given package. View the pyproject.toml within the targeted package folder to see configuration.""",
    )

    parser.add_argument("-t", "--target", dest="target", help="The target package path", required=True)

    parser.add_argument(
        "-o",
        "--optional",
        dest="optional",
        help="The target environment. If not provided, all optional environments will be run.",
        required=False,
    )

    parser.add_argument(
        "--temp",
        dest="temp_dir",
        help="The temp directory this script will work in.",
        required=False,
    )

    args, _ = parser.parse_known_args()
    exit(prepare_and_test_optional(mapped_args=args))