-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from cbrainerd/feat_public_dev
Move development to the public repo
- Loading branch information
Showing
35 changed files
with
1,174 additions
and
59,799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.DS_Store | ||
*.pyc | ||
dist | ||
env | ||
.coverage | ||
.cache | ||
stat_key_browser/data/key_cats.json | ||
stat_key_browser/data/key_tags.json | ||
web_app/js/keys.js | ||
web_app/index.html | ||
isilon_stat_browser_*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
|
||
virtualenv: | ||
system_site_packages: false | ||
|
||
install: | ||
- pip install -r requirements-dev.txt | ||
- git clone https://github.com/Isilon/isilon_sdk_7_2_python.git | ||
- cd isilon_sdk_7_2_python | ||
- python setup.py install | ||
- cd .. | ||
|
||
script: | ||
- make travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
PYTHON=`which python` | ||
PIP=`which pip` | ||
PYLINT=`which pylint` | ||
HEXAPARSE=./hexaparse.py | ||
|
||
DIST_DIR=dist | ||
|
||
clean: | ||
-rm -rf $(DIST_DIR) | ||
-rm -rf test_results | ||
-rm stat_key_browser/data/key_tags.json | ||
-rm stat_key_browser/data/key_cats.json | ||
-rm web_app/js/keys.js | ||
-rm web_app/index.html | ||
-rm isilon_stat_browser_v*.zip | ||
|
||
tags: | ||
$(HEXAPARSE) stat_key_browser/data/key_tags.hexa > stat_key_browser/data/key_tags.json | ||
$(HEXAPARSE) stat_key_browser/data/key_cats.hexa > stat_key_browser/data/key_cats.json | ||
|
||
lint: | ||
$(PYLINT) -E -f colorized -r n stat_key_browser bin/ tests/ | ||
|
||
unittests: lint | ||
$(PYTHON) -m pytest -v tests/unit/ *.py | ||
|
||
coverage: lint | ||
$(PYTHON) -m pytest -v --cov=stat_key_browser --cov-report term-missing --cov-config tests/unit/.coveragerc tests/unit/ *.py | ||
|
||
travis-ci: tags lint | ||
$(PYTHON) -m pytest -v tests/unit/ hexaparse.py | ||
|
||
check_cluster: | ||
if [ -z $$BUILD_BROWSER_ARGS ]; then echo BUILD_BROWSER_ARGS not set, builder will pause for input; fi | ||
|
||
functional_tests: check_cluster clean unittests tags | ||
$(PYTHON) -m pytest -v tests/functional/ | ||
|
||
dist: check_cluster clean unittests tags | ||
./build_stat_browser.py -x $(BUILD_BROWSER_ARGS) | ||
mkdir -p $(DIST_DIR) | ||
cp build_stat_browser.py $(DIST_DIR) | ||
cp requirements.txt $(DIST_DIR) | ||
cp README.md $(DIST_DIR) | ||
cp -r stat_key_browser $(DIST_DIR) | ||
cp -r web_app $(DIST_DIR) | ||
zip -r isilon_stat_browser_$$(git describe --exact-match --abbrev=0).zip dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
[![Master Build Status](https://travis-ci.org/Isilon/isilon_stat_browser.svg?branch=master)](https://travis-ci.org/Isilon/isilon_stat_browser) | ||
[![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") | ||
|
||
#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 | ||
Python: 2.7, 3.3, 3.4, 3.5 | ||
|
||
Dependencies listed in requirements-dev.txt | ||
|
||
Isilon SDK Python language bindings | ||
|
||
[`https://github.com/isilon/`](https://github.com/isilon) | ||
|
||
##Development getting started | ||
|
||
###Clone this repo: | ||
|
||
`git clone <repo>` | ||
|
||
`cd isilon_stat_browser` | ||
|
||
### Install the dependencies: | ||
|
||
`pip install -r requirements-dev.txt` | ||
|
||
### Run unit tests: | ||
|
||
`make unittests` | ||
|
||
### Check unit test coverage: | ||
|
||
`make coverage` | ||
|
||
### Run functional tests: | ||
The functional tests are only a stub currently. | ||
|
||
`make functional_tests` | ||
|
||
###Run the page building tool | ||
|
||
`./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:** | ||
This is a temporary manual process to be used by repo owners to cut a release until automated build/release is implemented. | ||
|
||
|
||
Once the master branch is in a state ready for a release, tag the current commit | ||
with a version number. | ||
|
||
`git tag -a v0.0.1 -m 'version 0.0.1'` | ||
|
||
Push the tag to git | ||
|
||
`git push origin v0.0.1` | ||
|
||
This creates a release in [isilon\_stat\_browser/releases](../../releases) | ||
|
||
Create the distribution for release | ||
|
||
`make dist BUILD_BROWSER_ARGS='-c <cluster IP> -u <username> -p <password>'` | ||
|
||
This creates a .zip file in the top-level project directory. The file will be | ||
automatically named with the version specified in the tag. If no version number | ||
appears in the file name something has gone wrong. | ||
|
||
Go to [isilon\_stat\_browser/releases](../../releases) and draft a new release. | ||
Enter the tag into the tag version box and the tag should be recognized as an | ||
existing tag. | ||
|
||
Enter any needed release notes | ||
|
||
Attach the zipped release distribution to the release. | ||
|
||
Publish the release. | ||
|
||
# Files | ||
|
||
* `README-dev.md` | ||
|
||
The developer facing readme that you are reading now. | ||
|
||
* `README.md` | ||
|
||
The user-facing readme that gets packaged into the distributable zip. | ||
|
||
* `stat_key_browser/data/key_cats.hexa` | ||
|
||
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`. | ||
|
||
* `stat_key_browser/data/key_cats.json`: | ||
|
||
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. | ||
|
||
* `stat_key_browser/data/key_tags.hexa` | ||
|
||
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. | ||
|
||
* `stat_key_browser/data/key_tags.json`: | ||
|
||
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. | ||
|
||
* `keys.js` | ||
|
||
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. | ||
|
||
* `stat_key_browser/templates/app_template.html` | ||
|
||
The main template for the app. Contains the main html plus categories. | ||
|
||
* `stat_key_browser/template/key_template.html` | ||
|
||
Contains a template representing a single key and all of its info, including its extra info. | ||
|
||
* `web_app/index.html` | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.