forked from openstates/openstates-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
billy_settings.py
62 lines (53 loc) · 1.6 KB
/
billy_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# This shims around folks that have openstates/ on virtualenv's .pth, but
# not the root. This throws openstates.utils off, and isn't worth fiddling
# that much with.
# check billy_metadata first, in case this is just a pupa import
SCRAPER_PATHS = [
os.path.join(os.getcwd(), 'openstates'),
os.path.join(os.getcwd(), 'billy_metadata'),
]
MONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')
MONGO_PORT = 27017
MONGO_DATABASE = 'fiftystates'
here = os.path.abspath(os.path.dirname(__file__))
BILLY_DATA_DIR = os.environ.get('BILLY_DATA_DIR', os.path.join(here, 'data'))
BILLY_CACHE_DIR = os.environ.get('BILLY_CACHE_DIR', os.path.join(here, 'cache'))
BILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR', os.path.join(here, 'manual_data'))
LEGISLATOR_FILTERS = {
"billy.importers.filters.single_space_filter": [
"full_name",
"first_name",
"last_name",
"middle_name",
],
"billy.importers.filters.phone_filter": [
"office_phone",
"phone",
"offices.phone",
"offices.fax",
],
"billy.importers.filters.email_filter": [
"offices.email",
],
}
BILL_FILTERS = {
"billy.importers.filters.single_space_filter": [
"actions.action",
"title",
]
}
EVENT_FILTERS = {
"billy.importers.filters.single_space_filter": [
"description",
"participants.participant",
"related_bills.bill_id",
"related_bills.description",
]
}
try:
from billy_local import *
except ImportError:
pass