Giter Site home page Giter Site logo

rittamdebnath / college-costs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cfpb/college-costs

0.0 0.0 0.0 40.34 MB

A tool to help students weigh the costs and rewards of a college program.

License: Creative Commons Zero v1.0 Universal

JavaScript 22.82% HTML 31.81% Python 10.97% CSS 34.29% Shell 0.12%

college-costs's Introduction

Build Status Coverage Status

Paying for College

Tools to help students make informed financial decisions about college.

  • Status: Beta
  • This project is under construction. Please wear a hardhat.

Setup dependencies

Code dependencies

Testing dependencies

Data specifications

Installation

This project is not fully functional, but feel free to give it a spin. Here's how:

  • Install the setup dependencies if you don't have them.
  • Go to the local directory where you want the project to be created, make a virtual environment, clone this repository (or your own fork of it).
mkvirtualenv college-costs
git clone https://github.com/cfpb/college-costs.git .
setvirtualenvproject
  • Set up database assets and front-end resources:
./standalone_setup.sh
  • Now you should be able to fire up a local web server:
./manage.py runserver

The college-cost tools should show up at localhost:8000/paying-for-college2/

The app is set up to run as a component of CFPB's website, consumerfinance.gov, so if you run it locally, some fonts and font-related icons may not load because of Cross-Origin Resource Sharing policies.

Search

The app has a simple API for searching schools by name or nickname. The endpoint, to which you can append a querystring, is:

/understanding-your-financial-aid-offer/api/search-schools.json

Elasticsearch needs to be running locally for search to work.
Your launch command will vary depending on which version of Elasticsearch is installed.

For 2.x versions installed on a mac with homebrew, this is an example command:

elasticsearch --path.conf=/Users/[MAC USERNAME]/homebrew/opt/elasticsearch/config/elasticsearch.yml

1.x versions use a --config= param instead of path.conf=

With elasticsearch running, you can now build an index of college data:

./manage.py rebuild_index

Now you should get a json response when hitting the search API. You can search by school name or nickname, such as:

http://localhost:8000/paying-for-college2/understanding-your-financial-aid-offer/api/search-schools.json?q=jayhawks

Running tests

Python Tests

You can run python tests from the project root with this command:

./pytest.sh

Javascript Tests

To run JavaScript unit tests:

npm test

To run functional tests, you need to make sure that you have version 4.0+ of Node.js. Install/upgrade it using either npm or brew.

You'll also need webdriver-manager and protractor:

npm install -g webdriver-manager protractor
webdriver-manager update --standalone

To run the tests:

# start webdriver in a terminal tab:
webdriver-manager start
# if you're running it on a localhost, in a fresh tab:
python manage.py runserver
# and in a third tab:
protractor test/functional/conf.js
Load Tests

Before you run load tests, you will first need to download and unzip JMeter 3.0.

In terminal, execute JMeter and run the following command to open JMeter GUI:

[Path to JMeter Folder]/bin/jmeter.sh -t [Path to this repository]/college-costs/test/load_testing/Offer.jmx -Jserver_url [parent domain to test] -Jthreads [number of users hitting the site, default: 1] -Jrampup [adding 1 user per specified second, default 5]

As an example to if I am in a folder where JMeter and this repository were in, and I am testing it locally on port 8000 with 8 users and add 1 user per 3 seconds:

apache-jmeter-3.0/bin/jmeter.sh -t college-costs/test/load_testing/Offer.jmx -Jserver_url localhost:8000 -Jthreads 8 -Jrampup 3

The corresponding Offer.csv in test/load_testing specified the parameters being used for testing. The order and name of each column is specified in the JMX file under CSV Offer.

Getting involved

If you find a bug or see a way to improve the project, we'd love to hear from you. Add an issue, or fork the project and send us a pull request with your suggested changes.


Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Credits and references

This project is based on the current CFPB Paying for College suite of tools for students.

college-costs's People

Contributors

amymok avatar anselmbradford avatar ascott1 avatar chosak avatar higs4281 avatar marteki avatar mistergone avatar niqjohnson avatar rosskarchner avatar scotchester avatar virginiacc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.