|
| 1 | +[](https://travis-ci.org/Isilon/isilon_stat_browser) |
| 2 | +[](http://isitmaintained.com/project/isilon/isilon_stat_browser "Average time to resolve an issue") |
| 3 | +[](http://isitmaintained.com/project/isilon/isilon_stat_browser "Percentage of issues still open") |
| 4 | + |
| 5 | +#Statistics Key Browser Development |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +##Requirements |
| 10 | +Python: 2.7, 3.3, 3.4, 3.5 |
| 11 | + |
| 12 | +Dependencies listed in requirements-dev.txt |
| 13 | + |
| 14 | +Isilon SDK Python language bindings |
| 15 | + |
| 16 | +[`https://github.com/isilon/`](https://github.com/isilon) |
| 17 | + |
| 18 | +##Development getting started |
| 19 | + |
| 20 | +###Clone this repo: |
| 21 | + |
| 22 | +`git clone <repo>` |
| 23 | + |
| 24 | +`cd isilon_stat_browser` |
| 25 | + |
| 26 | +### Install the dependencies: |
| 27 | + |
| 28 | +`pip install -r requirements-dev.txt` |
| 29 | + |
| 30 | +### Run unit tests: |
| 31 | + |
| 32 | +`make unittests` |
| 33 | + |
| 34 | +### Check unit test coverage: |
| 35 | + |
| 36 | +`make coverage` |
| 37 | + |
| 38 | +### Run functional tests: |
| 39 | +The functional tests are only a stub currently. |
| 40 | + |
| 41 | +`make functional_tests` |
| 42 | + |
| 43 | +###Run the page building tool |
| 44 | + |
| 45 | +`./build_stat_browser.py -c <cluster IP>` |
| 46 | + |
| 47 | +### Generate a distributable zip file: |
| 48 | +The build will pause to request cluster IP, username and password. |
| 49 | + |
| 50 | +`make dist` |
| 51 | + |
| 52 | +### Generate a distributable zip file non-interactively: |
| 53 | + |
| 54 | +Supply the cluster IP, username and password when building via automation. |
| 55 | + |
| 56 | +`make dist BUILD_BROWSER_ARGS='-c <cluster IP> -u <username> -p <password>'` |
| 57 | + |
| 58 | +# Release process |
| 59 | + |
| 60 | +**Note:** |
| 61 | +This is a temporary manual process to be used by repo owners to cut a release until automated build/release is implemented. |
| 62 | + |
| 63 | + |
| 64 | +Once the master branch is in a state ready for a release, tag the current commit |
| 65 | +with a version number. |
| 66 | + |
| 67 | +`git tag -a v0.0.1 -m 'version 0.0.1'` |
| 68 | + |
| 69 | +Push the tag to git |
| 70 | + |
| 71 | +`git push origin v0.0.1` |
| 72 | + |
| 73 | +This creates a release in [isilon\_stat\_browser/releases](../../releases) |
| 74 | + |
| 75 | +Create the distribution for release |
| 76 | + |
| 77 | +`make dist BUILD_BROWSER_ARGS='-c <cluster IP> -u <username> -p <password>'` |
| 78 | + |
| 79 | +This creates a .zip file in the top-level project directory. The file will be |
| 80 | +automatically named with the version specified in the tag. If no version number |
| 81 | +appears in the file name something has gone wrong. |
| 82 | + |
| 83 | +Go to [isilon\_stat\_browser/releases](../../releases) and draft a new release. |
| 84 | +Enter the tag into the tag version box and the tag should be recognized as an |
| 85 | +existing tag. |
| 86 | + |
| 87 | +Enter any needed release notes |
| 88 | + |
| 89 | +Attach the zipped release distribution to the release. |
| 90 | + |
| 91 | +Publish the release. |
| 92 | + |
| 93 | +# Files |
| 94 | + |
| 95 | +* `README-dev.md` |
| 96 | + |
| 97 | +The developer facing readme that you are reading now. |
| 98 | + |
| 99 | +* `README.md` |
| 100 | + |
| 101 | +The user-facing readme that gets packaged into the distributable zip. |
| 102 | + |
| 103 | +* `stat_key_browser/data/key_cats.hexa` |
| 104 | + |
| 105 | +A human written and readable file that defines which categories and subcategories are to be applied to lists of key names. Parsed into json by hexaparse.py during `make tags`. |
| 106 | + |
| 107 | +* `stat_key_browser/data/key_cats.json`: |
| 108 | + |
| 109 | +The automatically generated JSON that results when hexaparse.py parses key\_cats.hexa during the build process. This file is referenced by build\_stat\_browser.py to categorize stat keys received from PAPI. |
| 110 | + |
| 111 | +* `stat_key_browser/data/key_tags.hexa` |
| 112 | + |
| 113 | +A human written and readable file that defines which tags are to be applied to lists of key names. Parsed into json by hexaparse.py during the build process. |
| 114 | + |
| 115 | +* `stat_key_browser/data/key_tags.json`: |
| 116 | + |
| 117 | +The automatically generated JSON that results when hexaparse.py parsed key\_tags.hexa during the build process. This file is referenced by build\_stat\_browser.py to tag stat keys received from PAPI and is part of the distributable zip. |
| 118 | + |
| 119 | +* `keys.js` |
| 120 | + |
| 121 | +JSON formatted stat keys with tags and categories attached. This is created by build\_stat\_browser.py and read by the html app's JavaScript. |
| 122 | + |
| 123 | +* `stat_key_browser/templates/app_template.html` |
| 124 | + |
| 125 | +The main template for the app. Contains the main html plus categories. |
| 126 | + |
| 127 | +* `stat_key_browser/template/key_template.html` |
| 128 | + |
| 129 | +Contains a template representing a single key and all of its info, including its extra info. |
| 130 | + |
| 131 | +* `web_app/index.html` |
| 132 | + |
| 133 | +This is the file opened by the user to view the stat browser. This file is rendered by build_stat_browser.py from the templates, the definitions in key_tags.json and from the PAPI supplied list of keys. |
0 commit comments