<commit_before>[![Build Status](https://travis-ci.org/caciviclab/disclosure-frontend.svg)](https://travis-ci.org/caciviclab/disclosure-frontend)

# 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](https://github.com/caciviclab/disclosure-backend)


## Contributing

### Tests

Don't forget to run the tests.

    $ npm test


### Where does the data come from?

The data comes from the [disclosure API][disclosure-api]. The
API is incomplete, but the
[repo][disclosure-backend] has useful information
about what the models are shaping up like, even for incomplete APIs. [Ballot models](https://github.com/caciviclab/disclosure-backend/blob/master/ballot/models.py)
are separate from [finance data](https://github.com/caciviclab/disclosure-backend/blob/master/netfile/models.py),
since that's how the data is ingested, but eventually should be combined for the
frontend views.


#### Links

Url                                      | Description
---                                      | -----------
[disclosure-backend][disclosure-backend] | Disclosure API repo.
[Disclosure API][disclosure-api]         | Documentation for the disclosure API.
[Disclosure Admin][disclosure-admin]     | Admin interface for entering ballot data.

[disclosure-backend]: https://github.com/caciviclab/disclosure-backend
[disclosure-api]: http://admin.caciviclab.org/docs/
[disclosure-admin]: http://admin.caciviclab.org/admin/

#### Testing against a development backend

If you want to test against a development backend, you can set an environment
variable

    $ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp build

And the tests

    $ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp test


### Setup Instructions

1. Install [node.js](http://nodejs.com)
2. Install [gulp.js](http://gulpjs.com) (```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.<commit_msg>update node link in readme<commit_after>[![Build Status](https://travis-ci.org/caciviclab/disclosure-frontend.svg)](https://travis-ci.org/caciviclab/disclosure-frontend)

# 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](https://github.com/caciviclab/disclosure-backend)


## Contributing

### Tests

Don't forget to run the tests.

    $ npm test


### Where does the data come from?

The data comes from the [disclosure API][disclosure-api]. The
API is incomplete, but the
[repo][disclosure-backend] has useful information
about what the models are shaping up like, even for incomplete APIs. [Ballot models](https://github.com/caciviclab/disclosure-backend/blob/master/ballot/models.py)
are separate from [finance data](https://github.com/caciviclab/disclosure-backend/blob/master/netfile/models.py),
since that's how the data is ingested, but eventually should be combined for the
frontend views.


#### Links

Url                                      | Description
---                                      | -----------
[disclosure-backend][disclosure-backend] | Disclosure API repo.
[Disclosure API][disclosure-api]         | Documentation for the disclosure API.
[Disclosure Admin][disclosure-admin]     | Admin interface for entering ballot data.

[disclosure-backend]: https://github.com/caciviclab/disclosure-backend
[disclosure-api]: http://admin.caciviclab.org/docs/
[disclosure-admin]: http://admin.caciviclab.org/admin/

#### Testing against a development backend

If you want to test against a development backend, you can set an environment
variable

    $ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp build

And the tests

    $ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp test


### Setup Instructions

1. Install the LTS version of [node.js](https://nodejs.org/en/)
2. Install [gulp.js](http://gulpjs.com) (```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.
{'fraction_non_alphanumeric': 0.12250868531724264, 'fraction_numerical': 0.011702322179557505, 'mean_word_length': 3.8535936113575864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4380897', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1599, 'n_words': 527}