hgi项目中使用的通用python代码。
hgicommon的Python项目详细描述
hgi项目中使用的通用python
如何使用
先决条件
- python>;=3.5
安装
稳定版本可以通过pypi安装:
$ pip3 install hgicommon
出血边缘版本可以直接从github安装:
$ pip3 install git+https://github.com/wtsi-hgi/python-common.git@<commit_id_or_branch_or_tag>#egg=hgicommon
若要将此库声明为项目的依赖项,请将其添加到 requirement.txt文件。
发展
设置
同时安装库依赖项和 测试:
$ pip3 install -q -r requirements.txt $ pip3 install -q -r test_requirements.txt
测试
使用nosetests,在项目目录中,运行:
$ nosetests -v
要生成包含nosetests的测试覆盖率报告,请执行以下操作:
$ nosetests -v --with-coverage --cover-package=hgicommon --cover-inclusive nosetests -v --with-coverage --cover-package=hgicommon --cover-inclusive --exclude-test-file=excluded_tests.txt