orcid服务客户端
inspire-service-orcid的Python项目详细描述
[![构建状态](https://travis-ci.org/puntonim/inspire-service-orcid.svg?branch=master)(https://travis ci.org/puntonim/inspire service orcid)
使用者密钥='myorcidappkey',
使用者密钥='myorcidappsecret',
请求超时=30,
)
激励服务orcid.conf.settings.configure(**d)
使用客户端。
来自激励服务orcid.client import orcidclient
client=orcidclient('mytoken',,'0000-0002-0942-3697')
response=client.get_all_works_summary()
response.raise_for_result()
put code=response['group'][0]['work-summary'][0]['put-code']
````
以便使用时间执行收集度量,首先配置它:
``python
import time_execution
from inspire_service_orcid import hooks
hooks=[
hooks.status_code_hook,
hooks.orcid_error_code_hook,
hooks.orcid_service_exception_hook,
time_execution.settings.configure(
backends=[mybackend],
hooks=hooks,
origin'inspire
````
` ` ` ` ` ` ` bash
<创建一个venv并安装要求:
$make venv
$$make isort
$$make isort
$$make lint
<
/>
/><运行所有测试:
/>/>针对Python27和Python36。
$tox-e py27python版本。
$py test对活动的venv进行pytest对活动的venv进行pytest测试。
对python27和python36进行特定的测试:
$make test/tests/test/test对python27和python36进行特定的python37和python36进行特定的测试。
$tox-e py27-tests/test-client.py对特定的python版本进行测试。
$pytesttesttesttest/test-client.pytest对活动的venv进行pytest对活动的venv进行pytest测试。
````` ` ` ` ` ` ` ` ` ` `>
至在pypi上发布,首先设置pypi凭据:
``bash
发布并提交setup.py文件:
$git add.
$git commit-m'1.1.1 released'
$git push origin master--标记
```
使用者密钥='myorcidappkey',
使用者密钥='myorcidappsecret',
请求超时=30,
)
激励服务orcid.conf.settings.configure(**d)
使用客户端。
来自激励服务orcid.client import orcidclient
client=orcidclient('mytoken',,'0000-0002-0942-3697')
response=client.get_all_works_summary()
response.raise_for_result()
put code=response['group'][0]['work-summary'][0]['put-code']
````
以便使用时间执行收集度量,首先配置它:
``python
import time_execution
from inspire_service_orcid import hooks
hooks=[
hooks.status_code_hook,
hooks.orcid_error_code_hook,
hooks.orcid_service_exception_hook,
time_execution.settings.configure(
backends=[mybackend],
hooks=hooks,
origin'inspire
````
` ` ` ` ` ` ` bash
<创建一个venv并安装要求:
$make venv
$$make isort
$$make isort
$$make lint
<
/>
/><运行所有测试:
/>/>针对Python27和Python36。
$tox-e py27python版本。
$py test对活动的venv进行pytest对活动的venv进行pytest测试。
对python27和python36进行特定的测试:
$make test/tests/test/test对python27和python36进行特定的python37和python36进行特定的测试。
$tox-e py27-tests/test-client.py对特定的python版本进行测试。
$pytesttesttesttest/test-client.pytest对活动的venv进行pytest对活动的venv进行pytest测试。
````` ` ` ` ` ` ` ` ` ` `>
至在pypi上发布,首先设置pypi凭据:
``bash
发布并提交setup.py文件:
$git add.
$git commit-m'1.1.1 released'
$git push origin master--标记
```