Skip to content

Commit

Permalink
updated docs and changelog, bumped to v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Feb 10, 2016
1 parent 80d296b commit 3294aee
Showing 30 changed files with 120 additions and 103 deletions.
8 changes: 8 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

0.2.0 (2016-02-10)
--------------------
* user-agent strings now passed in every http request to Crossref, including a `X-USER-AGENT` header in case the `User-Agent` string is lost (#33)
* added a disclaimer to docs about what is actually searched when searching the Crossref API - that is, only what is returned in the API, so no full text or abstracts are searched (#32)
* improved http error parsing - now passes on the hopefully meaningful error messages from the Crossref API (#31)
* more tests added (#30)
* habanero now supports cursor for deep paging. note that cursor only works with requests to the `/works` route (#18)

0.1.3 (2015-12-02)
--------------------
* Fix wheel file to be a universal to install on python2 and python3 (#25)
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ habanero

This is a low level client for working with Crossref's search API. It's been named to be more generic, as other organizations are/will adopt Crossref's search API, making it possible to ineract with all from one client.

`Crossref API docs <https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md](https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md>`__
`Crossref API docs <https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md>`__

Other Crossref API clients:

@@ -107,8 +107,8 @@ Content negotiation - get citations in many formats
Meta
====

* Please note that this project is released with a `Contributor Code of Conduct <CONDUCT.md>`__. By participating in this project you agree to abide by its terms.
* License: MIT; see `LICENSE file <LICENSE>`__
* Please note that this project is released with a `Contributor Code of Conduct <https://github.com/sckott/habanero/blob/master/CONDUCT.md>`__. By participating in this project you agree to abide by its terms.
* License: MIT; see `LICENSE file <https://github.com/sckott/habanero/blob/master/LICENSE>`__

.. |pypi| image:: https://img.shields.io/pypi/v/habanero.svg
:target: https://pypi.python.org/pypi/habanero
Binary file modified docs/_build/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/changelog_link.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 76e843e1f6fa7fb02dc37c1c78a9eec8
config: c3907f6de6b5d0edc0c46cd320f27f5b
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/habanero/cn/cn.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>habanero.cn.cn &mdash; habanero 0.1.3.9849 documentation</title>
<title>habanero.cn.cn &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../../../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


@@ -59,7 +59,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -233,7 +233,7 @@ <h1>Source code for habanero.cn.cn</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/habanero/cn/styles.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>habanero.cn.styles &mdash; habanero 0.1.3.9849 documentation</title>
<title>habanero.cn.styles &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../../../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


@@ -59,7 +59,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -198,7 +198,7 @@ <h1>Source code for habanero.cn.styles</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
11 changes: 6 additions & 5 deletions docs/_build/html/_modules/habanero/counts/counts.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>habanero.counts.counts &mdash; habanero 0.1.3.9849 documentation</title>
<title>habanero.counts.counts &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../../../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


@@ -59,7 +59,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -134,6 +134,7 @@
<h1>Source code for habanero.counts.counts</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">requests</span>
<span class="kn">from</span> <span class="nn">xml.dom</span> <span class="kn">import</span> <span class="n">minidom</span>
<span class="kn">from</span> <span class="nn">..habanero_utils</span> <span class="kn">import</span> <span class="n">make_ua</span>

<span class="k">def</span> <span class="nf">citation_count</span><span class="p">(</span><span class="n">doi</span><span class="p">,</span> <span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://www.crossref.org/openurl/&quot;</span><span class="p">,</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;cboettig@ropensci.org&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
@@ -157,7 +158,7 @@ <h1>Source code for habanero.counts.counts</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="n">args</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;doi:&quot;</span> <span class="o">+</span> <span class="n">doi</span><span class="p">,</span> <span class="s2">&quot;pid&quot;</span><span class="p">:</span> <span class="n">key</span><span class="p">,</span> <span class="s2">&quot;noredirect&quot;</span><span class="p">:</span> <span class="bp">True</span><span class="p">}</span>
<span class="n">args</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">((</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">args</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="k">if</span> <span class="n">v</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">params</span> <span class="o">=</span> <span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">params</span> <span class="o">=</span> <span class="n">args</span><span class="p">,</span> <span class="n">headers</span> <span class="o">=</span> <span class="n">make_ua</span><span class="p">(),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">xmldoc</span> <span class="o">=</span> <span class="n">minidom</span><span class="o">.</span><span class="n">parseString</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">content</span><span class="p">)</span>
<span class="n">val</span> <span class="o">=</span> <span class="n">xmldoc</span><span class="o">.</span><span class="n">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;query&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">attributes</span><span class="p">[</span><span class="s1">&#39;fl_count&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">value</span>
<span class="k">return</span> <span class="nb">int</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">val</span><span class="p">))</span>
@@ -194,7 +195,7 @@ <h1>Source code for habanero.counts.counts</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
12 changes: 6 additions & 6 deletions docs/_build/html/_modules/habanero/crossref/crossref.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>habanero.crossref.crossref &mdash; habanero 0.1.3.9849 documentation</title>
<title>habanero.crossref.crossref &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../../../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../../../index.html"/>
<link rel="up" title="Module code" href="../../index.html"/>


@@ -59,7 +59,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -629,8 +629,8 @@ <h1>Source code for habanero.crossref.crossref</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="n">res</span> <span class="o">=</span> <span class="n">request</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">base_url</span><span class="p">,</span> <span class="s2">&quot;/works/&quot;</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span>
<span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">sample</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span>
<span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">True</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="k">return</span> <span class="p">[</span> <span class="n">z</span><span class="p">[</span><span class="s1">&#39;DOI&#39;</span><span class="p">]</span> <span class="k">for</span> <span class="n">z</span> <span class="ow">in</span> <span class="n">res</span><span class="o">.</span><span class="n">result</span><span class="p">[</span><span class="s1">&#39;message&#39;</span><span class="p">][</span><span class="s1">&#39;items&#39;</span><span class="p">]</span> <span class="p">]</span>
<span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">True</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="k">return</span> <span class="p">[</span> <span class="n">z</span><span class="p">[</span><span class="s1">&#39;DOI&#39;</span><span class="p">]</span> <span class="k">for</span> <span class="n">z</span> <span class="ow">in</span> <span class="n">res</span><span class="p">[</span><span class="s1">&#39;message&#39;</span><span class="p">][</span><span class="s1">&#39;items&#39;</span><span class="p">]</span> <span class="p">]</span>
</div>
<span class="nd">@staticmethod</span>
<div class="viewcode-block" id="Crossref.filter_names"><a class="viewcode-back" href="../../../filters.html#habanero.Crossref.filter_names">[docs]</a> <span class="k">def</span> <span class="nf">filter_names</span><span class="p">():</span>
@@ -701,7 +701,7 @@ <h1>Source code for habanero.crossref.crossref</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/habanero/exceptions.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>habanero.exceptions &mdash; habanero 0.1.3.9849 documentation</title>
<title>habanero.exceptions &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


@@ -59,7 +59,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -203,7 +203,7 @@ <h1>Source code for habanero.exceptions</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
8 changes: 4 additions & 4 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Overview: module code &mdash; habanero 0.1.3.9849 documentation</title>
<title>Overview: module code &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="../index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="../index.html"/>


<script src="../_static/js/modernizr.min.js"></script>
@@ -58,7 +58,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -167,7 +167,7 @@ <h1>All modules for which code is available</h1>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
8 changes: 3 additions & 5 deletions docs/_build/html/_sources/index.txt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ habanero

This is a low level client for working with Crossref's search API. It's been named to be more generic, as other organizations are/will adopt Crossref's search API, making it possible to ineract with all from one client.

`Crossref API docs <https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md](https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md>`__
`Crossref API docs <https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md>`__

Other Crossref API clients:

@@ -107,8 +107,8 @@ Content negotiation - get citations in many formats
Meta
====

* Please note that this project is released with a `Contributor Code of Conduct <CONDUCT.md>`__. By participating in this project you agree to abide by its terms.
* License: MIT; see `LICENSE file <LICENSE>`__
* Please note that this project is released with a `Contributor Code of Conduct <https://github.com/sckott/habanero/blob/master/CONDUCT.md>`__. By participating in this project you agree to abide by its terms.
* License: MIT; see `LICENSE file <https://github.com/sckott/habanero/blob/master/LICENSE>`__

.. |pypi| image:: https://img.shields.io/pypi/v/habanero.svg
:target: https://pypi.python.org/pypi/habanero
@@ -126,8 +126,6 @@ Meta





Contents
--------

8 changes: 4 additions & 4 deletions docs/_build/html/api.html
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Crossref Search &mdash; habanero 0.1.3.9849 documentation</title>
<title>Crossref Search &mdash; habanero 0.2.0 documentation</title>



@@ -30,7 +30,7 @@



<link rel="top" title="habanero 0.1.3.9849 documentation" href="index.html"/>
<link rel="top" title="habanero 0.2.0 documentation" href="index.html"/>
<link rel="next" title="Crossref Search Filters" href="filters.html"/>
<link rel="prev" title="habanero" href="index.html"/>

@@ -60,7 +60,7 @@


<div class="version">
0.1.3.9849
0.2.0
</div>


@@ -743,7 +743,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.1.3.9849',
VERSION:'0.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Loading

0 comments on commit 3294aee

Please sign in to comment.