用于托管分数模型的Web服务器。
ores的Python项目详细描述
[![生成状态](https://travis-ci.org/wikimedia/ores.svg)](https://travis-ci.org/wikimedia/ores) [![测试覆盖率](https://codecov.io/gh/wikimedia/ores/branch/master/graph/badge.svg)](https://codecov.io/gh/wikimedia/ores)
目标修订评估服务
用于托管评分服务的Web服务器。有关更多信息,请参见[MediaWiki上的ORES文档](https://mediawiki.org/wiki/ORES)。
安装
ORES基于Python3。使用pip安装ores:
pip install ores(如果您的发行版默认为python 2,则为pip3 install ores)
如果使用默认的redis配置运行,则需要安装更多的可选库,
pip install ores[redis]
然后您可以通过以下方式轻松运行测试服务器:
ores applications.wsgi
使用-h参数查看其用法。
ores applications.wsgi -h
请访问这些页面,查看您的安装是否正常,
http://localhost:8080/http://localhost:8080/v2/scores/testwiki/revid/641962088?features=true
使用docker composer运行ores
作为运行ores进行开发的简单方法,下载并安装[docker compose](https://docs.docker.com/compose/),然后执行:
docker-compose up
可通过本地主机8080访问矿石
运行开发服务器
我们建议您设置一个python“虚拟环境”。我们在一起 [本指南](https://gist.github.com/halfak/9f4830895496af9e9731)帮助您 准备好一切。
安装需求和测试需求以运行默认 测试服务器并尝试不同的评分策略。
- $pip install-r requirements.txt
- $pip install-r test requirements.txt
使用/utility作为ores运行测试服务器,因此本地更改是 反射:使用-h查看其用法
- $./utility applications.wsgi
检查是否在http://localhost:8080上运行所有内容。