diff --git a/dev.py b/dev.py index 7ed720a134..f09192f7be 100644 --- a/dev.py +++ b/dev.py @@ -203,6 +203,7 @@ def __init__(self) -> None: self.deps["all"] = set() for k in self.deps.values(): self.deps["all"] |= k + self.deps["install"] = self.deps["build"] def cmd_build(self): wheel_dir = self.args.get("wheel", DIST_DIR) @@ -275,6 +276,8 @@ def cmd_build(self): pprint(f"Installing in editable mode ({info_str})") pip_install(self.py, install_args) + cmd_install = cmd_build + def cmd_docs(self): full = self.args.get("full", False) @@ -355,7 +358,9 @@ def parse_args(self): ) # Build command - build_parser = subparsers.add_parser("build", help="Build the project") + build_parser = subparsers.add_parser( + "build", help="Build and install the project", aliases=["install"] + ) build_parser.add_argument( "--wheel", nargs="?", @@ -445,13 +450,20 @@ def parse_args(self): subparsers.add_parser("format", help="Format code") # All command - subparsers.add_parser( + all_parser = subparsers.add_parser( "all", help=( "Run all the subcommands. This is handy for checking that your work is " "ready to be submitted" ), ) + all_parser.add_argument( + "mod", + nargs="*", + help=( + "Name(s) of sub-module(s) to test. If no args are given all are tested" + ), + ) args = parser.parse_args() self.args = vars(args)