cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Begin to modularize layer data by adding a setting #764

Open cmc333333 opened 8 years ago

cmc333333 commented 8 years ago

Previously, the mega generator module knew about most of the different types of layers. It created a big dictionary of them for iterating through. This patch moves that listing into a settings file so that it can be replaced by different clients. Further, it moves data related to where the layer information comes from and how it should be applied into the individual layer classes; it also introduces a few constants and creates a common abstract base class for most layers.

This does not make the section-by-section analyses on the right hand side configurable; they are currently hard coded into the sidebar view.

A.K.A. 18f/regulations-site#56. We'll have a similar group of settings for the sidebar, too. I don't remember how consumerfinance.gov's settings are configured; the default setting here may not be enough.