We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Link Docker's `data` (and maybe `cache`) directory to local file system
> @mshenfield [12:47 PM] I think we could make it easier by changing some of the configuration in `docker-compose` or the docker files so that it would write `data` to the openstates repository directory.

This is also something that @jamesturk and I have talked about internally. Let's get the `docker-compose` file updated so that users can see the `data` directory locally, and more easily hand-inspect the scraped JSON.

Maybe also link the `cache` directory, too, so that it's easier to throw out old scrapes? (But also fine if this is considered a bad idea, or if another solution to flushing old scrapes is suggested.)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `billy_settings.py`
Content:
```
1 import os
2 
3 from os.path import abspath, dirname, join
4 
5 import sys
6 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
7 # This shims around folks that have openstates/ on virtualenv's .pth, but
8 # not the root. This throws openstates.utils off, and isn't worth fiddling
9 # that much with.
10 
11 SCRAPER_PATHS=[os.path.join(os.getcwd(), 'openstates')]
12 MONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')
13 MONGO_PORT = 27017
14 MONGO_DATABASE = 'fiftystates'
15 
16 BILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR')
17 if BILLY_MANUAL_DATA_DIR is None:
18     BILLY_MANUAL_DATA_DIR = os.path.join(
19         os.path.abspath(os.path.dirname(__file__)),
20         "manual_data",
21     )
22 
23 LEGISLATOR_FILTERS = {
24     "billy.importers.filters.single_space_filter": [
25         "full_name",
26         "first_name",
27         "last_name",
28         "middle_name",
29     ],
30     "billy.importers.filters.phone_filter": [
31         "office_phone",
32         "phone",
33         "offices.phone",
34         "offices.fax",
35     ],
36     "billy.importers.filters.email_filter": [
37         "offices.email",
38     ],
39 }
40 
41 BILL_FILTERS = {
42     "billy.importers.filters.single_space_filter": [
43         "actions.action",
44         "title",
45     ]
46 }
47 
48 EVENT_FILTERS = {
49     "billy.importers.filters.single_space_filter": [
50         "description",
51         "participants.participant",
52         "related_bills.bill_id",
53         "related_bills.description",
54     ]
55 }
56 
57 
58 try:
59     from billy_local import *
60 except ImportError:
61     pass
62
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/billy_settings.py b/billy_settings.py
--- a/billy_settings.py
+++ b/billy_settings.py
@@ -1,24 +1,20 @@
 import os
 
-from os.path import abspath, dirname, join
-
 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.
 
-SCRAPER_PATHS=[os.path.join(os.getcwd(), 'openstates')]
+SCRAPER_PATHS = [os.path.join(os.getcwd(), 'openstates')]
 MONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')
 MONGO_PORT = 27017
 MONGO_DATABASE = 'fiftystates'
 
-BILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR')
-if BILLY_MANUAL_DATA_DIR is None:
-    BILLY_MANUAL_DATA_DIR = os.path.join(
-        os.path.abspath(os.path.dirname(__file__)),
-        "manual_data",
-    )
+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": [

{"golden_diff": "diff --git a/billy_settings.py b/billy_settings.py\n--- a/billy_settings.py\n+++ b/billy_settings.py\n@@ -1,24 +1,20 @@\n import os\n \n-from os.path import abspath, dirname, join\n-\n import sys\n sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))\n # This shims around folks that have openstates/ on virtualenv's .pth, but\n # not the root. This throws openstates.utils off, and isn't worth fiddling\n # that much with.\n \n-SCRAPER_PATHS=[os.path.join(os.getcwd(), 'openstates')]\n+SCRAPER_PATHS = [os.path.join(os.getcwd(), 'openstates')]\n MONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')\n MONGO_PORT = 27017\n MONGO_DATABASE = 'fiftystates'\n \n-BILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR')\n-if BILLY_MANUAL_DATA_DIR is None:\n-    BILLY_MANUAL_DATA_DIR = os.path.join(\n-        os.path.abspath(os.path.dirname(__file__)),\n-        \"manual_data\",\n-    )\n+here = os.path.abspath(os.path.dirname(__file__))\n+BILLY_DATA_DIR = os.environ.get('BILLY_DATA_DIR', os.path.join(here, 'data'))\n+BILLY_CACHE_DIR = os.environ.get('BILLY_CACHE_DIR', os.path.join(here, 'cache'))\n+BILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR', os.path.join(here, 'manual_data'))\n \n LEGISLATOR_FILTERS = {\n     \"billy.importers.filters.single_space_filter\": [\n", "issue": "Link Docker's `data` (and maybe `cache`) directory to local file system\n> @mshenfield [12:47 PM] I think we could make it easier by changing some of the configuration in `docker-compose` or the docker files so that it would write `data` to the openstates repository directory.\r\n\r\nThis is also something that @jamesturk and I have talked about internally. Let's get the `docker-compose` file updated so that users can see the `data` directory locally, and more easily hand-inspect the scraped JSON.\r\n\r\nMaybe also link the `cache` directory, too, so that it's easier to throw out old scrapes? (But also fine if this is considered a bad idea, or if another solution to flushing old scrapes is suggested.)\n", "before_files": [{"content": "import os\n\nfrom os.path import abspath, dirname, join\n\nimport sys\nsys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))\n# This shims around folks that have openstates/ on virtualenv's .pth, but\n# not the root. This throws openstates.utils off, and isn't worth fiddling\n# that much with.\n\nSCRAPER_PATHS=[os.path.join(os.getcwd(), 'openstates')]\nMONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')\nMONGO_PORT = 27017\nMONGO_DATABASE = 'fiftystates'\n\nBILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR')\nif BILLY_MANUAL_DATA_DIR is None:\n    BILLY_MANUAL_DATA_DIR = os.path.join(\n        os.path.abspath(os.path.dirname(__file__)),\n        \"manual_data\",\n    )\n\nLEGISLATOR_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"full_name\",\n        \"first_name\",\n        \"last_name\",\n        \"middle_name\",\n    ],\n    \"billy.importers.filters.phone_filter\": [\n        \"office_phone\",\n        \"phone\",\n        \"offices.phone\",\n        \"offices.fax\",\n    ],\n    \"billy.importers.filters.email_filter\": [\n        \"offices.email\",\n    ],\n}\n\nBILL_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"actions.action\",\n        \"title\",\n    ]\n}\n\nEVENT_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"description\",\n        \"participants.participant\",\n        \"related_bills.bill_id\",\n        \"related_bills.description\",\n    ]\n}\n\n\ntry:\n    from billy_local import *\nexcept ImportError:\n    pass\n", "path": "billy_settings.py"}], "after_files": [{"content": "import os\n\nimport sys\nsys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))\n# This shims around folks that have openstates/ on virtualenv's .pth, but\n# not the root. This throws openstates.utils off, and isn't worth fiddling\n# that much with.\n\nSCRAPER_PATHS = [os.path.join(os.getcwd(), 'openstates')]\nMONGO_HOST = os.environ.get('BILLY_MONGO_HOST', 'localhost')\nMONGO_PORT = 27017\nMONGO_DATABASE = 'fiftystates'\n\nhere = os.path.abspath(os.path.dirname(__file__))\nBILLY_DATA_DIR = os.environ.get('BILLY_DATA_DIR', os.path.join(here, 'data'))\nBILLY_CACHE_DIR = os.environ.get('BILLY_CACHE_DIR', os.path.join(here, 'cache'))\nBILLY_MANUAL_DATA_DIR = os.environ.get('BILLY_MANUAL_DATA_DIR', os.path.join(here, 'manual_data'))\n\nLEGISLATOR_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"full_name\",\n        \"first_name\",\n        \"last_name\",\n        \"middle_name\",\n    ],\n    \"billy.importers.filters.phone_filter\": [\n        \"office_phone\",\n        \"phone\",\n        \"offices.phone\",\n        \"offices.fax\",\n    ],\n    \"billy.importers.filters.email_filter\": [\n        \"offices.email\",\n    ],\n}\n\nBILL_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"actions.action\",\n        \"title\",\n    ]\n}\n\nEVENT_FILTERS = {\n    \"billy.importers.filters.single_space_filter\": [\n        \"description\",\n        \"participants.participant\",\n        \"related_bills.bill_id\",\n        \"related_bills.description\",\n    ]\n}\n\n\ntry:\n    from billy_local import *\nexcept ImportError:\n    pass\n", "path": "billy_settings.py"}]}