在子目录中运行命令的命令行应用程序。
sub-do的Python项目详细描述
子do
在子目录中运行命令的命令行应用程序。
目录
安装
sub do需要python 3.6或更新版本。
pip install --upgrade sub-do
用法
$ sub-do --help usage: sub-do [-h] [-V] [-d [directory [directory ...]]] commandpositional arguments: command command to runoptional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit -d [directory [directory ...]], --directory [directory [directory ...]] directories to run the command in (default: all subdirectories except those whose names begin with a dot)When using -d, use -- to separate directories from the command or put the command first
在当前目录的所有子目录中运行命令:
$ sub-do 'ls | wc -l'['ls | wc -l' in sub_do/ exited with 0][stdout] 3['ls | wc -l' in dist/ exited with 0][stdout] 2['ls | wc -l' in ci/ exited with 0][stdout] 2['ls | wc -l' in tests/ exited with 0][stdout] 3['ls | wc -l' in sub_do.egg-info/ exited with 0][stdout] 6['ls | wc -l' in docs/ exited with 0][stdout] 2['ls | wc -l' in build/ exited with 0][stdout] 4
最近的更改
开发sub do
安装开发环境和依赖项
运行pip install -r requirements-dev.txt
安装开发依赖项。
运行单元测试
运行单元测试并检查其代码覆盖率:
$ ci/unittest.sh ----------------------------------------------------------------------Ran 14 tests in 0.017sOKName Stmts Miss Branch BrPart Cover----------------------------------------------------------------------------------TOTAL 115 0 21 0 100%7 files skipped due to complete coverage.
HTML覆盖率报告将写入build/unittest-coverage/
。
生成文档
这个README.md
文件是用python docs/generate_readme.py
生成的。