Skip to content

Latest commit

 

History

History
executable file
·
84 lines (54 loc) · 3.24 KB

README.md

File metadata and controls

executable file
·
84 lines (54 loc) · 3.24 KB

Build Status

Open Disclosure California

This is the front-end AngularJS application for viewing ballot measure funding data. This front-end application works from an API defined by the back-end Django application

Contributing

Tests

Don't forget to run the tests.

$ npm test

Where does the data come from?

The data comes from the disclosure API. The API is incomplete, but the repo has useful information about what the models are shaping up like, even for incomplete APIs. Ballot models are separate from finance data, since that's how the data is ingested, but eventually should be combined for the frontend views.

Links

Url Description
disclosure-backend Disclosure API repo.
Disclosure API Documentation for the disclosure API.
Disclosure Admin Admin interface for entering ballot data.

Setup Instructions

  1. Install node.js
  2. Install gulp.js (npm install -g gulp)
  3. Clone the repository.
  4. Run: npm install from inside the repository directory, to install all project dependencies.
  5. Run gulp build (in most cases, gulp alone will be enough; gulp build rebuilds static files).
  6. Open http://localhost:5000 in your browser

To tweak the install,

  • Edit gulpfile.js to change the port.

To point this front-end to another (e.g. local test) back-end:

  • Run python manage.py runserver from your back-end repo; this should start your back-end server on port 8000.
  • Edit app/app-init.js, set $rootScope.swaggerSpec = 'http://127.0.0.1:8000/docs/api-docs/';.

Contributing

This project is open source so collaboration is welcome.

A brief guide:

  • If you see a way to improve something in this project, please feel free to open a Pull Request to the develop branch so we can discuss your code.
  • Review our docs for contributing to learn more about the application structure, coding style, etc.
  • Run npm test before submitting a pull request.

Learning Resouces

Deployment

Travis will deploy the master branch to Github Pages. You shouldn't need to manually deploy but, here are the instructions.

To deploy, just set a personal access token via GITHUB_TOKEN in your environment and run the deploy script. The script will build your working directory as is, and push it to Github pages.

$ GITHUB_TOKEN=<your personal token> ./deploy.sh