diff --git a/.arclint b/.arclint index 36d7633..a661aef 100644 --- a/.arclint +++ b/.arclint @@ -1,8 +1,9 @@ { - "exclude": "(^LICENSE)", + "exclude": "(^LICENSE|.gitignore)", "linters": { - "sample": { - "type": "flake8" + "python": { + "type": "flake8", + "exclude": "(\\.html$)" } } } diff --git a/metrics b/metrics index afdb30c..959ed35 100755 --- a/metrics +++ b/metrics @@ -117,19 +117,19 @@ if __name__ == "__main__": # Parse CLI arguments parser = argparse.ArgumentParser() parser.add_argument("--db-location", type=str, default=":memory:", - help="Specify the location for the SQLite database") + help="Specify the location for the SQLite database") parser.add_argument("--log", type=str, default="WARNING", - help="Default logging level") + help="Default logging level") args = parser.parse_args() # Ensure the logging level is set properly num_level = getattr(log, args.log.upper(), None) if not isinstance(num_level, int): - raise ValueError("Invalid log level: %s" % loglevel) + raise ValueError("Invalid log level: %s" % args.log) # Fully configure the logger log.basicConfig(format="%(asctime)s\t%(levelname)s\t%(message)s", - level=num_level) + level=num_level) # Initialize a dict to store data for the summary page summary_page = {} diff --git a/modules/jenkins.py b/modules/jenkins.py index cff5e06..68d5e87 100755 --- a/modules/jenkins.py +++ b/modules/jenkins.py @@ -188,7 +188,7 @@ class JenkinsModule: # Write it back to the filename in the output dir with open(path.join("output", "jenkins_%sdays.html" % days), - "w+") as f: + "w+") as f: f.write(template) # Return the averages for use in the summary diff --git a/templates/index.html b/templates/index.html index 52b0de2..b937b49 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,15 +5,11 @@ - +
Time (days) | -Average Failing | -Average Non-passing | -Average Total | +Average Failing | +Average Non-passing | +Average Total | {{ day }} | {% for avg in page.Jenkins[day] %}{{ avg }} | - {% endfor %} + {% endfor %} - {% endfor %} + {% endfor %}
---|