用于refget服务器实现的符合性实用程序报告系统
refget-compliance的Python项目详细描述
refget合规套件
refget API符合性文档和测试套件的存储库。
重要网址
安装符合性套件
pip3 install refget-compliance
运行合规套件
下面将为您的服务器生成一个html报告并提供所述html。它还会在报告的本地生成一个tarball
refget-compliance report -s https://refget.server.com/ --serve
下面将生成服务器的json报告:
refget-compliance report -s https://refget.server.com/ --json server.json
设置--json -
将使符合性套件将json写入stdout。
附加部件
构建包并将其上载到pypi
首先进行编辑,测试并用新版本号更新setup.py
。然后运行以下命令并在执行此操作之前提供用户凭据。这将把符合性套件上传到测试pypi服务器。
python3 setup.py sdist bdist_wheel twine upload --repository-url https://test.pypi.org/legacy/ dist/*
假设这是可行的,那么上传到live pypi并提供您的live登录详细信息。
twine upload dist/*
合规性文档
要在本地生成此文档,请执行以下步骤:
git clone https://github.com/ga4gh/refget-compliance.git
cd refget-compliance
pip3 install mkdocs
mkdocs serve
符合性测试套件
一致性测试套件是用于refget服务器的api测试套件。
要运行测试,请执行以下步骤:
git clone https://github.com/ga4gh/refget-compliance.git
cd refget-compliance-suite/test_suite
pip3 install -r requirements.txt
如果要测试的服务器支持循环序列,则运行
py.test --server <your-server-base-url-without-http://-prefix> --cir
如果它不支持循环序列,则运行
py.test --server <your-server-base-url-without-http://-prefix>
如果要测试的服务器支持trunc512算法,则运行
py.test --server <your-server-base-url-without-http://-prefix> --trunc512
如果不支持trunc512算法,则运行
py.test --server <your-server-base-url-without-http://-prefix>
如果要测试的服务器重定向成功查询,则运行
py.test --server <your-server-base-url-without-http://-prefix> --redir
如果没有重定向,则运行
py.test --server <your-server-base-url-without-http://-prefix>
您可以根据服务器实现尝试这些标志的多种组合,例如
py.test --server <your-server-base-url-without-http://-prefix> --cir --trunc512 py.test --server <your-server-base-url-without-http://-prefix> --cir --redir py.test --server <your-server-base-url-without-http://-prefix> --redir --trunc512 py.test --server <your-server-base-url-without-http://-prefix> --cir --trunc512 --redir