Nothing presented in the issues or in this repo is a final product unless it is marked as such.
Description: The HMDA Rule Spec is a collection of HMDA Edits written in the brij-spec standard. The HMDA Rule Engine interprets these rules to validate a HMDA data file.
The project requires NodeJS and brij-spec to validate the rules are written correctly.
- Make sure you have NodeJS installed (version 0.10.x), and you can use the
npm
command:
$ npm version
- Install Grunt globally:
$ npm install -g grunt-cli
- Checkout this repository:
$ git clone https://github.com/cfpb/hmda-rule-engine.git
- Go into the created directory:
$ cd hmda-rule-engine
- Then install dependencies from the project root directory:
$ npm install
To validate if a JSON file is BRIJ compliant:
./node_modules/brij-spec/bin/brij-validate -f <path to JSON file>
To run the unit tests, use the grunt task:
$ grunt test
When complete, you will see the results of the tests (pass/fail) as well as a text summary of the code coverage if there are no failures:
7 passing (9ms)
...
=============================== Coverage summary ===============================
Statements : 95.77% ( 883/922 )
Branches : 89.6% ( 379/423 )
Functions : 96.02% ( 217/226 )
Lines : 95.77% ( 883/922 )
================================================================================
You can view the full details of this coverage in a drill-down enabled report by opening coverage/lcov-report/index.html
in your browser.
If you are on a Mac, you can use a grunt task to run the tests and automatically open the coverage report in your browser:
$ grunt coverage
Documentation of this project is maintained inline with the source code using JSDoc style code comments.
To generate the documentation, run the grunt task:
$ grunt generate-docs
You can now open ./docs/index.html
in your browser to view the documentation.
If you are on a Mac, you can use a grunt task to generate the documentation and automatically open them in your browser:
$ grunt view-docs
For details on how to get involved, please first read our CONTRIBUTING guidelines. This project follows an adapted pull request workflow on top of GitHub, please consult the details before adding features to the project.