mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
doc updates for api pages
This commit is contained in:
parent
d5db870738
commit
b5fd733e29
8 changed files with 75 additions and 9 deletions
|
@ -30,9 +30,11 @@ def get_datetime_str(record):
|
||||||
"""
|
"""
|
||||||
Get the datetime string for a record.
|
Get the datetime string for a record.
|
||||||
|
|
||||||
:param record: the record to get data for.
|
Args:
|
||||||
|
record: the record to get data for.
|
||||||
|
|
||||||
:returns: datetime string.
|
Returns:
|
||||||
|
datetime string.
|
||||||
"""
|
"""
|
||||||
return str(record.getDataTime())[0:19].replace(" ","_") + ".0"
|
return str(record.getDataTime())[0:19].replace(" ","_") + ".0"
|
||||||
|
|
||||||
|
@ -40,9 +42,11 @@ def get_data_type(azdat):
|
||||||
"""
|
"""
|
||||||
Get the radar file type (radial or raster).
|
Get the radar file type (radial or raster).
|
||||||
|
|
||||||
:param azdat: Boolean.
|
Args:
|
||||||
|
azdat: Boolean.
|
||||||
|
|
||||||
:returns: Radial or raster.
|
Returns:
|
||||||
|
Radial or raster.
|
||||||
"""
|
"""
|
||||||
if azdat:
|
if azdat:
|
||||||
dattyp = "radial"
|
dattyp = "radial"
|
||||||
|
|
|
@ -46,6 +46,17 @@ else:
|
||||||
|
|
||||||
|
|
||||||
def getMetarObs(response):
|
def getMetarObs(response):
|
||||||
|
"""
|
||||||
|
Processes a DataAccessLayer "obs" response into a dictionary,
|
||||||
|
with special consideration for multi-value parameters
|
||||||
|
"presWeather", "skyCover", and "skyLayerBase".
|
||||||
|
|
||||||
|
Args:
|
||||||
|
response: DAL getGeometry() list
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A dictionary of METAR obs
|
||||||
|
"""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
single_val_params = ["timeObs", "stationName", "longitude", "latitude",
|
single_val_params = ["timeObs", "stationName", "longitude", "latitude",
|
||||||
"temperature", "dewpoint", "windDir",
|
"temperature", "dewpoint", "windDir",
|
||||||
|
@ -87,6 +98,16 @@ def getMetarObs(response):
|
||||||
|
|
||||||
|
|
||||||
def getSynopticObs(response):
|
def getSynopticObs(response):
|
||||||
|
"""
|
||||||
|
Processes a DataAccessLayer "sfcobs" response into a dictionary
|
||||||
|
of available parameters.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
response: DAL getGeometry() list
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A dictionary of synop obs
|
||||||
|
"""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
station_names = []
|
station_names = []
|
||||||
params = response[0].getParameters()
|
params = response[0].getParameters()
|
||||||
|
@ -109,9 +130,16 @@ def getSynopticObs(response):
|
||||||
|
|
||||||
def getForecastRun(cycle, times):
|
def getForecastRun(cycle, times):
|
||||||
"""
|
"""
|
||||||
:param cycle: Forecast cycle reference time
|
Get the latest forecast run (list of objects) from all
|
||||||
:param times: All available times/cycles
|
all cycles and times returned from DataAccessLayer "grid"
|
||||||
:return: DataTime array for a single forecast run
|
response.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
cycle: Forecast cycle reference time
|
||||||
|
times: All available times/cycles
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
DataTime array for a single forecast run
|
||||||
"""
|
"""
|
||||||
fcstRun = []
|
fcstRun = []
|
||||||
for t in times:
|
for t in times:
|
||||||
|
|
|
@ -93,7 +93,8 @@ def getGridDataUpdates(request):
|
||||||
response = router.getNotificationFilter(request)
|
response = router.getNotificationFilter(request)
|
||||||
notificationFilter = response.getNotificationFilter()
|
notificationFilter = response.getNotificationFilter()
|
||||||
jmsInfo = _getJmsConnectionInfo(response)
|
jmsInfo = _getJmsConnectionInfo(response)
|
||||||
notifier = PyGridNotification(request, notificationFilter, requestHost=THRIFT_HOST, **jmsInfo)
|
notifier = PyGridNotification(request, notificationFilter,
|
||||||
|
requestHost=THRIFT_HOST, **jmsInfo)
|
||||||
return notifier
|
return notifier
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +112,8 @@ def getGeometryDataUpdates(request):
|
||||||
response = router.getNotificationFilter(request)
|
response = router.getNotificationFilter(request)
|
||||||
notificationFilter = response.getNotificationFilter()
|
notificationFilter = response.getNotificationFilter()
|
||||||
jmsInfo = _getJmsConnectionInfo(response)
|
jmsInfo = _getJmsConnectionInfo(response)
|
||||||
notifier = PyGeometryNotification(request, notificationFilter, requestHost=THRIFT_HOST, **jmsInfo)
|
notifier = PyGeometryNotification(request, notificationFilter,
|
||||||
|
requestHost=THRIFT_HOST, **jmsInfo)
|
||||||
return notifier
|
return notifier
|
||||||
|
|
||||||
|
|
||||||
|
|
7
docs/source/api/CombinedTimeQuery.rst
Normal file
7
docs/source/api/CombinedTimeQuery.rst
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
=================
|
||||||
|
CombinedTimeQuery
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. automodule:: awips.dataaccess.CombinedTimeQuery
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
7
docs/source/api/IFPClient.rst
Normal file
7
docs/source/api/IFPClient.rst
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
=========
|
||||||
|
IFPClient
|
||||||
|
=========
|
||||||
|
|
||||||
|
.. automodule:: awips.gfe.IFPClient
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
7
docs/source/api/ThriftClient.rst
Normal file
7
docs/source/api/ThriftClient.rst
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
======================
|
||||||
|
ThriftClient
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. automodule:: awips.ThriftClient
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
7
docs/source/api/TimeUtil.rst
Normal file
7
docs/source/api/TimeUtil.rst
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
======================
|
||||||
|
TimeUtil
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. automodule:: awips.TimeUtil
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
|
@ -12,7 +12,11 @@ API Documentation
|
||||||
PyGeometryData
|
PyGeometryData
|
||||||
SoundingsSupport
|
SoundingsSupport
|
||||||
ThriftClientRouter
|
ThriftClientRouter
|
||||||
|
ThriftClient
|
||||||
|
TimeUtil
|
||||||
RadarCommon
|
RadarCommon
|
||||||
|
IFPClient
|
||||||
DateTimeConverter
|
DateTimeConverter
|
||||||
|
CombinedTimeQuery
|
||||||
|
|
||||||
* :ref:`genindex`
|
* :ref:`genindex`
|
||||||
|
|
Loading…
Add table
Reference in a new issue