From beb8862ebe07559d64a78dd9cc1489345d9c9c11 Mon Sep 17 00:00:00 2001 From: dh1tw Date: Sun, 28 Sep 2014 00:59:42 +0200 Subject: [PATCH] removed print statement in locator.calculate_sunrise_sunset(); fixed small errors in documentation --- docs/source/examples.rst | 2 +- pyhamtools/locator.py | 8 ++++++-- readthedocs-pip-requirements.txt | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/source/examples.rst b/docs/source/examples.rst index 0700c7e..58d3867 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -57,7 +57,7 @@ First we need to instanciate a LookupLib object for Country-files.com database. >>> my_lookuplib = LookupLib(lookuptype="countryfile") -Next, a Callinfo class needs to be instanciated. The lookuplib object will be injected on construction. +Next, a Callinfo object needs to be instanciated. The lookuplib object will be injected on construction. .. code-block:: none diff --git a/pyhamtools/locator.py b/pyhamtools/locator.py index 7208cc7..17bd0d4 100644 --- a/pyhamtools/locator.py +++ b/pyhamtools/locator.py @@ -287,7 +287,12 @@ def calculate_sunrise_sunset(locator, calc_date=datetime.utcnow()): >>> UTC = pytz.UTC >>> myDate = datetime(year=2014, month=1, day=1, tzinfo=UTC) >>> calculate_sunrise_sunset("JN48QM", myDate) - 74.3136 + { + 'morning_dawn': datetime.datetime(2014, 1, 1, 6, 36, 51, 710524, tzinfo=), + 'sunset': datetime.datetime(2014, 1, 1, 16, 15, 23, 31016, tzinfo=), + 'evening_dawn': datetime.datetime(2014, 1, 1, 15, 38, 8, 355315, tzinfo=), + 'sunrise': datetime.datetime(2014, 1, 1, 7, 14, 6, 162063, tzinfo=) + } """ morning_dawn = None @@ -349,6 +354,5 @@ def calculate_sunrise_sunset(locator, calc_date=datetime.utcnow()): result['evening_dawn'] = evening_dawn.replace(tzinfo=UTC) if sunset: result['sunset'] = sunset.replace(tzinfo=UTC) - print result return result \ No newline at end of file diff --git a/readthedocs-pip-requirements.txt b/readthedocs-pip-requirements.txt index db60d5f..1ba74c9 100644 --- a/readthedocs-pip-requirements.txt +++ b/readthedocs-pip-requirements.txt @@ -2,5 +2,6 @@ sphinxcontrib-napoleon>=0.2.7 requests>=2.2.1 pytz>=2014.2 pyephem>=3.7.5.3 +redis>=2.10.2