changed to sphinxcontrib-napoleon and google style

This commit is contained in:
dh1tw 2014-04-24 17:05:24 +02:00
parent d12f83c9c2
commit 366d5dc391
8 changed files with 92 additions and 139 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -72,59 +72,42 @@ lookup against the Clublog API.</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>lookuptype</strong> : str</p>
<blockquote>
<div><p>&#8220;clublogxml&#8221; or &#8220;clublogapi&#8221; or &#8220;countryfile&#8221;</p>
</div></blockquote>
<p><strong>apikey</strong> : str</p>
<blockquote>
<div><p>Clublog API Key</p>
</div></blockquote>
<p><strong>filename</strong> : str, optional</p>
<blockquote>
<div><p>Filename for Clublog XML or Country-files.com cty.plist file</p>
</div></blockquote>
<p><strong>logger</strong> : logging.getLogger(__name__), optional</p>
<blockquote class="last">
<div><p>Python logger</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>lookuptype</strong> (<em>str</em>) &#8211; &#8220;clublogxml&#8221; or &#8220;clublogapi&#8221; or &#8220;countryfile&#8221;</li>
<li><strong>apikey</strong> (<em>str</em>) &#8211; Clublog API Key</li>
<li><strong>filename</strong> (<em>str, optional</em>) &#8211; Filename for Clublog XML or Country-files.com cty.plist file</li>
<li><strong>logger</strong> (<em>logging.getLogger(__name__), optional</em>) &#8211; Python logger</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.is_invalid_operation">
<tt class="descname">is_invalid_operation</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>1</em>, <em>26</em>, <em>14</em>, <em>12004</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.is_invalid_operation" title="Permalink to this definition"></a></dt>
<tt class="descname">is_invalid_operation</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>15</em>, <em>3</em>, <em>44</em>, <em>979191</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.is_invalid_operation" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if an operations is known as invalid</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>callsign</strong> : string</p>
<blockquote>
<div><p>Amateur Radio callsign</p>
</div></blockquote>
<p><strong>timestamp</strong> : datetime, optional</p>
<blockquote>
<div><p>datetime in UTC (tzinfo=pytz.UTC)</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>callsign</strong> (<em>string</em>) &#8211; Amateur Radio callsign</li>
<li><strong>timestamp</strong> (<em>datetime, optional</em>) &#8211; datetime in UTC (tzinfo=pytz.UTC)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>bool</strong> :</p>
<blockquote>
<div><p>True if a record exists for this callsign (at the given time)</p>
</div></blockquote>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if a record exists for this callsign (at the given time)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>NoResult</strong> :</p>
<blockquote>
<div><p>No matching callsign found</p>
</div></blockquote>
<p><strong>APIKeyMissingError</strong> :</p>
<blockquote class="last">
<div><p>API Key for Clublog missing or incorrect</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">bool</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><tt class="xref py py-exc docutils literal"><span class="pre">NoResult</span></tt> &#8211;
No matching callsign found</li>
<li><tt class="xref py py-exc docutils literal"><span class="pre">APIKeyMissingError</span></tt> &#8211;
API Key for Clublog missing or incorrect</li>
</ul>
</td>
</tr>
</tbody>
@ -138,36 +121,30 @@ lookup against the Clublog API.</p>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_callsign">
<tt class="descname">lookup_callsign</tt><big>(</big><em>callsign=None</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>1</em>, <em>26</em>, <em>14</em>, <em>11988</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_callsign" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_callsign</tt><big>(</big><em>callsign=None</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>15</em>, <em>3</em>, <em>44</em>, <em>979170</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_callsign" title="Permalink to this definition"></a></dt>
<dd><p>Returns lookup data if an exception exists for a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>callsign</strong> : string</p>
<blockquote>
<div><p>Amateur radio callsign</p>
</div></blockquote>
<p><strong>timestamp</strong> : datetime, optional</p>
<blockquote>
<div><p>datetime in UTC (tzinfo=pytz.UTC)</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>callsign</strong> (<em>string</em>) &#8211; Amateur radio callsign</li>
<li><strong>timestamp</strong> (<em>datetime, optional</em>) &#8211; datetime in UTC (tzinfo=pytz.UTC)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>dict</strong> :</p>
<blockquote>
<div><p>Dictionary containing the country specific data of the callsign</p>
</div></blockquote>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Dictionary containing the country specific data of the callsign</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>NoResult</strong> :</p>
<blockquote>
<div><p>No matching callsign found</p>
</div></blockquote>
<p><strong>APIKeyMissingError</strong> :</p>
<blockquote class="last">
<div><p>API Key for Clublog missing or incorrect</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">dict</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><tt class="xref py py-exc docutils literal"><span class="pre">NoResult</span></tt> &#8211;
No matching callsign found</li>
<li><tt class="xref py py-exc docutils literal"><span class="pre">APIKeyMissingError</span></tt> &#8211;
API Key for Clublog missing or incorrect</li>
</ul>
</td>
</tr>
</tbody>
@ -189,65 +166,55 @@ lookup against the Clublog API.</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>entity</strong> : int</p>
<blockquote>
<div><p>ADIF identifier of country</p>
</div></blockquote>
</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entity</strong> (<em>int</em>) &#8211; ADIF identifier of country</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>dict</strong> :</p>
<blockquote>
<div><p>Dictionary containing the country specific data</p>
</div></blockquote>
</td>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Dictionary containing the country specific data</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>NoResult</strong> :</p>
<blockquote class="last">
<div><p>No matching entity found</p>
</div></blockquote>
</td>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><tt class="xref py py-exc docutils literal"><span class="pre">NoResult</span></tt> &#8211;
No matching entity found</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>This method is available for:</p>
<ul class="simple">
<div class="admonition note">
<p class="first admonition-title">Note</p>
<dl class="last docutils">
<dt>This method is available for:</dt>
<dd><ul class="first last simple">
<li>clublogxml</li>
</ul>
</dd>
</dl>
</div>
</dd></dl>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_prefix">
<tt class="descname">lookup_prefix</tt><big>(</big><em>prefix</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>1</em>, <em>26</em>, <em>14</em>, <em>11988</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_prefix" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_prefix</tt><big>(</big><em>prefix</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>15</em>, <em>3</em>, <em>44</em>, <em>979170</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_prefix" title="Permalink to this definition"></a></dt>
<dd><p>Returns lookup data of a Prefix</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>prefix</strong> : string</p>
<blockquote>
<div><p>Prefix of a Amateur Radio callsign</p>
</div></blockquote>
<p><strong>timestamp</strong> : datetime, optional</p>
<blockquote>
<div><p>datetime in UTC (tzinfo=pytz.UTC)</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>prefix</strong> (<em>string</em>) &#8211; Prefix of a Amateur Radio callsign</li>
<li><strong>timestamp</strong> (<em>datetime, optional</em>) &#8211; datetime in UTC (tzinfo=pytz.UTC)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>dict</strong> :</p>
<blockquote>
<div><p>Dictionary containing the country specific data of the Prefix</p>
</div></blockquote>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Dictionary containing the country specific data of the Prefix</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>NoResult</strong> :</p>
<blockquote>
<div><p>No matching Prefix found</p>
</div></blockquote>
<p><strong>APIKeyMissingError</strong> :</p>
<blockquote class="last">
<div><p>API Key for Clublog missing or incorrect</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">dict</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><tt class="xref py py-exc docutils literal"><span class="pre">NoResult</span></tt> &#8211;
No matching Prefix found</li>
<li><tt class="xref py py-exc docutils literal"><span class="pre">APIKeyMissingError</span></tt> &#8211;
API Key for Clublog missing or incorrect</li>
</ul>
</td>
</tr>
</tbody>
@ -262,36 +229,30 @@ lookup against the Clublog API.</p>
<dl class="method">
<dt id="pyhamtools.lookuplib.LookupLib.lookup_zone_exception">
<tt class="descname">lookup_zone_exception</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>1</em>, <em>26</em>, <em>14</em>, <em>12009</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_zone_exception" title="Permalink to this definition"></a></dt>
<tt class="descname">lookup_zone_exception</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>24</em>, <em>15</em>, <em>3</em>, <em>44</em>, <em>979197</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.lookuplib.LookupLib.lookup_zone_exception" title="Permalink to this definition"></a></dt>
<dd><p>Returns a CQ Zone if an exception exists for the given callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>callsign</strong> : string</p>
<blockquote>
<div><p>Amateur radio callsign</p>
</div></blockquote>
<p><strong>timestamp</strong> : datetime, optional</p>
<blockquote>
<div><p>datetime in UTC (tzinfo=pytz.UTC)</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>callsign</strong> (<em>string</em>) &#8211; Amateur radio callsign</li>
<li><strong>timestamp</strong> (<em>datetime, optional</em>) &#8211; datetime in UTC (tzinfo=pytz.UTC)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>int</strong> :</p>
<blockquote>
<div><p>Value of the the CQ Zone exception which exists for this callsign (at the given time)</p>
</div></blockquote>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Value of the the CQ Zone exception which exists for this callsign (at the given time)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>NoResult</strong> :</p>
<blockquote>
<div><p>No matching callsign found</p>
</div></blockquote>
<p><strong>APIKeyMissingError</strong> :</p>
<blockquote class="last">
<div><p>API Key for Clublog missing or incorrect</p>
</div></blockquote>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">int</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><tt class="xref py py-exc docutils literal"><span class="pre">NoResult</span></tt> &#8211;
No matching callsign found</li>
<li><tt class="xref py py-exc docutils literal"><span class="pre">APIKeyMissingError</span></tt> &#8211;
API Key for Clublog missing or incorrect</li>
</ul>
</td>
</tr>
</tbody>

View file

@ -1 +1 @@
Search.setIndex({envversion:42,terms:{all:3,code:0,identifi:3,text:[],prefix:3,radio:[0,3],same:3,follow:0,entiti:3,xml:3,current:0,clublogxml:3,zone:3,explain:[],except:3,dict:3,tzinfo:3,bool:3,logger:3,match:3,applic:0,lookup_ent:3,sourc:3,"return":3,string:3,variou:3,utc:3,python:[0,3],timestamp:3,veri:[],requir:3,infrequ:3,like:0,specif:3,bla:2,"default":3,stuff:[],necessari:0,contain:[0,3],found:3,readthedoc:0,page:0,some:0,see:0,callsign:[0,3],connect:3,download:3,librari:[0,3],even:3,index:0,lookuptyp:3,lookup_prefix:3,lookup_zone_except:3,content:[],version:0,internet:3,print:[],irc:0,complic:[],method:3,kei:3,differ:3,dictionari:3,org:[0,3],come:0,lookup_callsign:3,valu:3,search:0,cty:3,against:3,datetim:3,countri:3,dh1tw:[0,1,2],com:[0,3],frequent:0,oper:3,apikeymissingerror:3,modul:[],filenam:3,api:3,"__name__":3,noresult:3,miss:3,given:3,log:3,wai:3,three:3,avail:3,interfac:3,paramet:3,more:3,amateur:[0,3],option:3,is_invalid_oper:3,pytz:3,pars:0,known:3,getter:3,"true":3,countryfil:3,none:3,provid:3,access:3,structur:3,record:3,apikei:3,can:3,str:3,webirc:0,creat:0,"int":3,clublogapi:3,exist:3,file:[0,3],deltaxrai:0,plist:3,incorrect:3,perform:3,detail:3,invalid:3,note:3,lookup:3,which:[0,3],you:0,mit:2,lookuplib:[],updat:3,http:[0,3],clublog:3,rais:3,adif:3,bsd:0,data:3,"class":[0,3],homogen:3,github:0,faster:0,descript:[],issu:0,hamtest:0,contact:[],getlogg:3,thi:3,time:3,hello:[],daili:3},objtypes:{"0":"py:module","1":"py:method","2":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"]},filenames:["index","help","license","LookupLib"],titles:["PyHamTools","help","license","LookupLib"],objects:{pyhamtools:{lookuplib:[3,0,0,"-"]},"pyhamtools.lookuplib":{LookupLib:[3,2,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[3,1,1,""],lookup_entity:[3,1,1,""],lookup_zone_exception:[3,1,1,""],lookup_callsign:[3,1,1,""],is_invalid_operation:[3,1,1,""]}},titleterms:{help:1,anoth:[],licens:2,clase:0,indic:0,content:[],header:[],contact:2,tabl:0,pyhamtool:0,document:[],simpl:[],modul:0,lookuplib:3,welcom:[]}})
Search.setIndex({envversion:42,terms:{all:3,code:0,identifi:3,text:[],prefix:3,radio:[0,3],same:3,follow:0,entiti:3,xml:3,current:0,clublogxml:3,zone:3,explain:[],except:3,dict:3,tzinfo:3,bool:3,logger:3,match:3,applic:0,lookup_ent:3,sourc:3,"return":3,string:3,variou:3,utc:3,python:[0,3],timestamp:3,veri:[],requir:3,infrequ:3,like:0,specif:3,bla:2,"default":3,stuff:[],necessari:0,contain:[0,3],found:3,readthedoc:0,page:0,some:0,see:0,callsign:[0,3],connect:3,download:3,librari:[0,3],even:3,index:0,lookuptyp:3,lookup_prefix:3,lookup_zone_except:3,content:[],version:0,internet:3,print:[],irc:0,complic:[],method:3,kei:3,differ:3,dictionari:3,org:[0,3],come:0,lookup_callsign:3,valu:3,search:0,cty:3,against:3,datetim:3,countri:3,dh1tw:[0,1,2],com:[0,3],frequent:0,oper:3,apikeymissingerror:3,modul:[],filenam:3,api:3,"__name__":3,noresult:3,miss:3,given:3,log:3,wai:3,three:3,avail:3,interfac:3,paramet:3,type:3,more:3,amateur:[0,3],option:3,is_invalid_oper:3,pytz:3,pars:0,known:3,getter:3,"true":3,countryfil:3,none:3,provid:3,access:3,structur:3,record:3,apikei:3,can:3,str:3,webirc:0,creat:0,"int":3,clublogapi:3,exist:3,file:[0,3],deltaxrai:0,plist:3,incorrect:3,perform:3,detail:3,invalid:3,note:3,lookup:3,which:[0,3],you:0,mit:2,lookuplib:[],updat:3,http:[0,3],clublog:3,rais:3,adif:3,bsd:0,data:3,"class":[0,3],homogen:3,github:0,faster:0,descript:[],issu:0,hamtest:0,contact:[],getlogg:3,thi:3,time:3,hello:[],daili:3},objtypes:{"0":"py:module","1":"py:method","2":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"]},filenames:["index","help","license","LookupLib"],titles:["PyHamTools","help","license","LookupLib"],objects:{pyhamtools:{lookuplib:[3,0,0,"-"]},"pyhamtools.lookuplib":{LookupLib:[3,2,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[3,1,1,""],lookup_entity:[3,1,1,""],lookup_zone_exception:[3,1,1,""],lookup_callsign:[3,1,1,""],is_invalid_operation:[3,1,1,""]}},titleterms:{help:1,anoth:[],licens:2,clase:0,indic:0,content:[],header:[],contact:2,tabl:0,pyhamtool:0,document:[],simpl:[],modul:0,lookuplib:3,welcom:[]}})

View file

@ -34,7 +34,7 @@ sys.path.insert(0,"/Users/user/projects/pyhamtools/pyhamtools")
# ones.
extensions = [
'sphinx.ext.autodoc',
'numpydoc',
'sphinxcontrib.napoleon',
]
# Add any paths that contain templates here, relative to this directory.

View file

@ -93,26 +93,18 @@ class LookupLib(object):
def lookup_entity(self, entity=None):
"""Returns lookup data of a ADIF Entity
Parameters
----------
entity : int
ADIF identifier of country
Args:
entity (int): ADIF identifier of country
Returns
-------
dict
Dictionary containing the country specific data
Returns:
dict: Dictionary containing the country specific data
Raises
------
NoResult
No matching entity found
Raises:
NoResult: No matching entity found
Notes
-----
This method is available for:
- clublogxml
Note:
This method is available for:
- clublogxml
"""

View file

@ -1,4 +1,4 @@
numpydoc>=0.4
sphinxcontrib-napoleon>=0.2.7
requests>=2.2.1
pytz>=2014.2