This change sets an environment variable in the subprocess run by
pw_cli.process.run() to indicate that it is running as a subprocess.
Change-Id: I1def3259b62578a156a4b374d41af99692147699
- Use env_setup/virtualenv/init.py to setup the Python venv.
- Improve diff colorization.
- Add function for finding Python packages from .py file changes.
- Add check that runs Python tests.
- Enable full pylint and yapf as warnings.
- Delete unused code in watch.py that used an undefined variable.
- Enable required python -E check.
Change-Id: I5ba9882ea9ec93f006260d5636031dd0b5005a85
This starts a basic Pigweed meta-module tool. The first tool is a simple
checker invoked with
pw module-check
which for now does two super-simple checks. Example output:
$ pw module-check pw_module
20191125 07:53:57 PM INF Checking module: pw_module
20191125 07:53:57 PM INF OK: Module pw_module looks good; no errors or warnings found
$ pw module-check pw_foo
20191125 07:54:00 PM INF Checking module: pw_foo
20191125 07:54:00 PM ERR PWCK001: Python code present but no setup.py.
20191125 07:54:00 PM ERR PWCK002: C++ code present but no tests at all (you monster).
20191125 07:54:00 PM ERR FAIL: Found errors when checking module pw_foo
Change-Id: I6eb3bfa941abc450a33affbec3e005477b9b2dc4
This change adds a module within pw_cli that provides a function for
running a subprocess and capturing its stdout and stderr to the main
pw log. A new log level is defined for the captured output.
The pw_unit_test runner script is updated to use this function instead
of running its subprocess directly.
The pw command is updated to run its subcommand in an async context,
preventing subcommands from needing to create their own. Fully
synchronous subcommands continue to function transparently to this.
Change-Id: Ia9efb1fbda8a38ef91a0e14113929711038710a8
This renames pw_cmd to pw_cli, since our plan is for the cli module to
contain general command line interface related tooling, rather than just
the pw_cmd itself.
Change-Id: I1dc7185db25b89d725601ac5d47e0793ea907bf1