Skip to content

Commit

Permalink
docstring improvements and requirements cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Brainerd committed May 20, 2016
1 parent a0551be commit 1430a82
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
.DS_Store
*.pyc
stat_key_browser.egg-info
build
dist
env
.coverage
keys.json
.cache
app.html
stat_key_browser/data/key_cats.json
stat_key_browser/data/key_tags.json
web_app/js/keys.js
Expand Down
34 changes: 17 additions & 17 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/isilon/isilon_stat_browser.svg)](http://isitmaintained.com/project/isilon/isilon_stat_browser "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/isilon/isilon_stat_browser.svg)](http://isitmaintained.com/project/isilon/isilon_stat_browser "Percentage of issues still open")

#stat-key-browser
#Statistics Key Browser Development

A single page web app that provides a browsable, searchable view of Isilon statistics keys. A Python script generates the html by querying an Isilon cluster for the list of statistics keys, then organizing and categorizing the keys before outputting the html app to web_app.

##requirements
##Requirements
Python: 2.7, 3.3, 3.4, 3.5

Dependencies listed in requirements-dev.txt
Expand All @@ -27,25 +27,14 @@ Isilon SDK Python language bindings

`pip install -r requirements-dev.txt`

### Build the html and js output in ./webapp:

`./build_stat_browser`

### Build a distributable zip file:
The build will pause to request cluster IP, username and password.

`make dist`

### Build a distributable zip file non-interactively:

Supply the cluster IP, username and password when building via automation.

`make dist BUILD_BROWSER_ARGS='-c <cluster IP> -u <username> -p <password>'`

### Run unit tests:

`make unittests`

### Check unit test coverage:

`make coverage`

### Run functional tests:
The functional tests are only a stub currently.

Expand All @@ -55,6 +44,17 @@ The functional tests are only a stub currently.

`./build_stat_browser.py -c <cluster IP>`

### Generate a distributable zip file:
The build will pause to request cluster IP, username and password.

`make dist`

### Generate a distributable zip file non-interactively:

Supply the cluster IP, username and password when building via automation.

`make dist BUILD_BROWSER_ARGS='-c <cluster IP> -u <username> -p <password>'`

# Release process

**Note:**
Expand Down
6 changes: 5 additions & 1 deletion hexaparse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#! /usr/bin/env python
"""
Parse a hexa key/lists-of-values doc into a dict.
Parse a hexa key/lists-of-values doc into a list of dicts.
Each list item is a dict. The contain lists referenced by keyname.
-Input-
::::::
Expand All @@ -27,6 +29,7 @@
import logging
import pytest


def is_new_block(line):
"""Determine whether a string marks a new block."""
if re.match('::::::$', line):
Expand All @@ -44,6 +47,7 @@ def is_key(line):
else:
return False


def is_comment(line):
"""Determine whether a string is a key."""
if re.match('#', line):
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pytest-cov>=2.2.1
mock>=2.0.0
jinja2>=2.8
pylint>=1.5.5
urllib3 >= 1.15
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
future>=0.15.2
jinja2>=2.8
urllib3 >= 1.15

0 comments on commit 1430a82

Please sign in to comment.