You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Starts a bash session inside the `delphi_web_python` container
82
+
$ [sudo] make bash
83
+
```
84
+
85
+
If the container was successfully started, you should see a prompt that looks like `root@containerhash:/usr/src/app#`.
86
+
87
+
From the container, run
88
+
89
+
```sh
90
+
# In production, acquisition injects secrets automatically, but for local runs we need to replace them manually. The values are found in the `sqlalchemy_uri` variable defined eariler in the Makefile.
91
+
$ sed -i -e 's/{SECRET_DB_USERNAME_EPI}/user/g' -e 's/{SECRET_DB_PASSWORD_EPI}/pass/g' -e 's/{SECRET_DB_HOST}/delphi_database_epidata/g' delphi/operations/secrets.py
92
+
# May need to run
93
+
$ pip install --upgrade mysql-connector-python
94
+
# Run an acquisition pipeline, e.g.
95
+
$ python -m delphi.epidata.acquisition.flusurv.flusurv_update all
96
+
```
97
+
98
+
You may need to add '$(M1)' flag to subcommands if using a new M\* chip Mac. The '$(M1)' flag is added to commands within the [Makefile](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/local/Makefile), so take a look there for guidance.
99
+
100
+
## Other useful commands and information
101
+
102
+
```sh
103
+
# Starts a MySQL prompt that can be used to query the local database.
104
+
# This connection can be kept open while adding data to the database.
105
+
$ [sudo] make sql
106
+
# Cleans up the docker environment
107
+
$ [sudo] make clean
108
+
```
109
+
110
+
The structure of the `driver` directory is largely replicated inside of the `delphi_web_python` container, with the following exceptions:
111
+
112
+
- Python package names can't contain hyphens, so hyphens in repo names are
113
+
replaced with underscores in the package hierarchy. (An exception is the
114
+
repo `delphi-epidata`, which is renamed to simply `epidata`.)
115
+
- Repos are organized such that the main code for the package is inside of
116
+
a `src/` directory. When deployed,
117
+
[the contents of `src/` are moved](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/docker/python/setup.sh#L22-L27).
118
+
(An [exception is the legacy `undef-analysis` repo](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/docker/python/setup.sh#L17-L18),
119
+
which has sources at the top-level.)
120
+
121
+
Dependencies in [`delphi-epidata/requirements.api.txt` and `delphi-epidata/requirements.dev.txt` are installed](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/docker/python/Dockerfile#L13).
122
+
123
+
The [`delphi-epidata` code is mounted](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/local/Makefile#L203-L204) for `test`, `r-test`, and `bash` Make targets so any changes to `delphi-epidata` code or tests are automatically reflected in the Docker container without needing to rebuild.
124
+
125
+
The `delphi-epidata` (and other repos) found in `driver/repos/delphi` is a full copy of the repo, using the default branch.
126
+
Other branches can be checked out too, so development can happen directly in this copy of the repo (_recommended_).
127
+
If you have pre-existing work elsewhere on your machine that would be inconvenient to move into the `driver` directory, it is possible to locally change the mount path in the Makefile or perhaps to create a symlink to your other local copy of the repo.
128
+
129
+
Depending on your GitHub authentication method, [the clone method used during setup](https://github.com/cmu-delphi/delphi-epidata/blob/cae43f8/dev/local/install.sh#L34) may not allow you to push changes or new branches to the remote. In this case, please re-authenticate, or re-clone the repo within `driver/repos/delphi` using your standard method.
130
+
67
131
# COVIDcast
68
132
69
133
At the present, our primary focus is developing and expanding the
0 commit comments