Skip to content

Commit

Permalink
Merge branch 'master' into ga-pub-logs-time
Browse files Browse the repository at this point in the history
  • Loading branch information
hayfield committed Oct 9, 2017
2 parents ed1894e + d2f7858 commit 6aebe02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion stats/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def add_years(d, years):


def all_true_and_not_empty(bool_iterable):
""" For a given list, check that all elements return true and that the list is not empty."""
"""For a given list, check that all elements return true and that the list is not empty.
Args:
bool_iterable (iterable of bool): An iterable containing values that can be cast to a bool.
"""

# Ensure that the given list is indeed a simple list
bool_list = list(bool_iterable)
Expand Down Expand Up @@ -1039,6 +1044,7 @@ def is_text_in_element(elementName):
}

def _is_sector_dac(self):
"""Determine whether an activity has comprehensive DAC sectors against the validation methodology."""
sector_dac_activity_level = self.element.xpath('sector[@vocabulary="{}" or @vocabulary="{}" or not(@vocabulary)]'.format(self._dac_5_code(), self._dac_3_code()))

if self._major_version() != '1':
Expand Down
5 changes: 2 additions & 3 deletions stats/tests/test_comprehensiveness.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def end_planned_date(datestring):
Create an activity_stats element with a specified 'end-planned' date.
Also sets the current date to 9990-06-01
Keyword arguments:
datestring -- An ISO date to be used as the 'end-planned' date for the
activity_stats element to be returned.
Args:
datestring (str): An ISO date to be used as the 'end-planned' date for the activity_stats element to be returned.
"""
activity_stats = MockActivityStats(major_version)
activity_stats.today = datetime.date(9990, 6, 1)
Expand Down
2 changes: 2 additions & 0 deletions statsrunner/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def call_stats(this_stats, args):
Args:
this_stats (cls): stats_module that specifies calculations for relevant input, processed by internal methods of process_file().
args: Object containing program run options (set by CLI arguments at runtime. See __init__ for more details).
"""
this_out = {}
# For each method within this_stats object check the method is an enabled stat, if it is not enabled continue to next method.
Expand Down

0 comments on commit 6aebe02

Please sign in to comment.