Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aschonfeld/index_builder
Build and compete for best index
https://github.com/aschonfeld/index_builder
flask jinja pandas python react react-redux webpack
Last synced: 10 days ago
JSON representation
Build and compete for best index
- Host: GitHub
- URL: https://github.com/aschonfeld/index_builder
- Owner: aschonfeld
- Created: 2018-04-01T16:30:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T10:46:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T08:44:56.699Z (23 days ago)
- Topics: flask, jinja, pandas, python, react, react-redux, webpack
- Language: CSS
- Homepage: http://aschonfeld.pythonanywhere.com/index-builder
- Size: 2.27 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Index Builder [![Build Status](https://travis-ci.org/aschonfeld/index_builder.svg?branch=master)](https://travis-ci.org/aschonfeld/index_builder) [![Coverage Status](https://coveralls.io/repos/github/aschonfeld/index_builder/badge.svg?branch=master)](https://coveralls.io/github/aschonfeld/index_builder?branch=master) [![BCH compliance](https://bettercodehub.com/edge/badge/aschonfeld/index_builder?branch=master)](https://bettercodehub.com/)
This is a nice little interactive survey using completely randomized data in which users can:
- create unique usernames
- select factors by giving them a weight, pro/anti direction & supporting reasons
- lock-in selections in order to see what kind of index your combination of factors have built
- compare performance of your index against some default indexes as well as other users
- an admin user can:
- view interesting breakdowns of all factor selections made by users as well as make these breakdowns available for users to see
- archive off user selections for further future analysis and to reset the app for another round of users## Demo
Live demo (choose any username you'd like): [index-builder](http://aschonfeld.pythonanywhere.com/index-builder)
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Once you've checked out this project you must make sure you have the following installed:Include instructions on setting up virtualenv
To get up and running perform the following:
pip install -r requirements.txtIn order to install scipy I had to run the following:
sudo apt-get install gfortran libopenblas-dev liblapack-dev python-dev
pip install scipy==0.15.1
easy_install numpy==1.9.2
easy_install pandas==0.16.2You'll need node, npm & yarn installed
yarn install
npm run build### Prerequisites
* pip
* easy_install
* virtualenv
* node
* npm
* yarn### Installing
Setting up your virtual environment
```
1) mkdir -p ~/pyenvs
2) virtualenv ~/pyenvs/index_builder
3) source ~/pyenvs/index_build/bin/activate
4) pip install -r requirements.txt
5) sudo apt-get install gfortran libopenblas-dev liblapack-dev python-dev (assuming you're running linux)
6) pip install scipy==0.15.1
7) easy_install numpy==1.9.2
8) easy_install pandas==0.16.2
```Building the javascript
```
1) yarn install
2) npm run build
```Running the Flask back-end
```
python index_builder/server.py --HOST 0.0.0.0 --PORT 8080 --AUTH true
```Running the Flask back-end with gunicorn
```
gunicorn server:app --config gunicorn_config.py --bind 0.0.0.0:8080 -w 8 -t 120 --limit-request-line 8190 --log-file=- --access-logfile ~/stdout --error-logfile ~/stderr --log-level=info
```Building the javascript files in "watch" mode (this is good for development so it will hot swap changes)
```
npm run watch
```## Running the tests
Python tests
```
python setup.py test
```All JS tests
```
npm run test
```Specific JS tests
```
TEST=static/__tests__/factor_viewer/*-test.jsx npm run test-file
```JS coverage report
```
npm run test-with-coverage
```JS Duplication report
```
npm run report-duplicate-code
```JS formatting
```
npm run format
```JS linting
```
npm run lint -s
```## Deployment
You can run this application on a larger scale using gunicorn
```
export AUTH=true (if you want authentication turned on)
gunicorn server:app --config gunicorn_config.py --bind 0.0.0.0:8080 -w 8 -t 120 --limit-request-line 8190 --log-file=- --access-logfile ~/stdout --error-logfile ~/stderr --log-level=info```
TBA: notes on docker deployment
## Built With
* [Flask](http://flask.pocoo.org/) - The back-end web framework used
* [jinja](http://jinja.pocoo.org/) - Core HTML templating
* [yarn](https://yarnpkg.com/en/) - JS Dependency Management
* [Webpack](https://webpack.js.org/) - JS Bundler
* [React](https://reactjs.org/) - Core JS library our components are built on## Authors
* **Andrew Schonfeld** - *Initial work* - [plutoplate](https://github.com/aschonfeld/plutoplate)
See also the list of [contributors](https://github.com/aschonfeld/index_builder/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Acknowledgments
* [Wilfred Hughes](https://github.com/Wilfred) was truly an inspiration and a driving force behind many of the solutions to initial infrastructure headaches