Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.
/ hmda-rule-spec Public archive

Language-agnostic rule specification for the HMDA file specification and edit checks.

License

Notifications You must be signed in to change notification settings

cfpb/hmda-rule-spec

Repository files navigation

HMDA Rule Spec

This project is a work in progress

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.

Build Status Coverage Status

How to get this running or how to use it

The project requires NodeJS and brij-spec to validate the rules are written correctly.

Installation Steps For Development

  • 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

Testing

Spec validation

To validate if a JSON file is BRIJ compliant:

./node_modules/brij-spec/bin/brij-validate -f <path to JSON file>

Unit Tests

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

Interface Documentation

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

Getting involved

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.


Open source licensing info

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

About

Language-agnostic rule specification for the HMDA file specification and edit checks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published