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
Copy file name to clipboardExpand all lines: README.md
+75-28Lines changed: 75 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,17 @@ The operations return the following status codes:
42
42
43
43
## Testing
44
44
45
-
To run the [integration tests](https://github.com/FHIR/genomics-operations/tree/main/tests), you can use the VS Code Testing functionality which should discover them automatically. You can also
46
-
run `python3 -m pytest` from the terminal to execute them all.
45
+
For local development, you will have to create a `secrets.env` file in the root of the repo and add in it the MongoDB
46
+
password and, optionally, the UTA Postgres database connection string (see the UTA section below for details):
47
+
48
+
```
49
+
MONGODB_READONLY_PASSWORD=...
50
+
UTA_DATABASE_URL=...
51
+
```
52
+
53
+
To run the [integration tests](https://github.com/FHIR/genomics-operations/tree/main/tests), you can use the VS Code
54
+
Testing functionality which should discover them automatically. You can also run `python3 -m pytest` from the terminal
55
+
to execute them all.
47
56
48
57
Additionally, since the tests run against the Mongo DB database, if you need to update the test data in this repo, you
49
58
can run `OVERWRITE_TEST_EXPECTED_DATA=true python3 -m pytest` from the terminal and then create a pull request with the
@@ -80,25 +89,60 @@ normalisation requires access to a copy of the [UTA](https://github.com/biocommo
80
89
We have provisioned a Heroku Postgres instance in the Prod environment which contains the imported data from a database
81
90
dump as described [here](https://github.com/biocommons/uta#installing-from-database-dumps).
82
91
83
-
The connection string for this database can be found in Heroku under the `UTA_DATABASE_URL` environment variable.
92
+
We define a `UTA_DATABASE_SCHEMA` environment variable in the [`.env`](.env) file which contains the name of the
93
+
currently imported database schema.
84
94
85
-
Additionally, we define a `UTA_DATABASE_SCHEMA` environment variable in the [`.env`](.env) file which contains the name
86
-
of the currently imported database schema.
95
+
#### Database import procedure (it will take about 30 minutes):
87
96
88
-
Database import procedure (it will take about 10 minutes):
97
+
- Go to the UTA dump download site (http://dl.biocommons.org/uta/) and get the latest `<UTA_SCHEMA>.pgd.gz` file.
98
+
- Go to https://dashboard.heroku.com/apps/fhir-gen-ops/resources and click on the "Heroku Postgres" instance (it will
99
+
open a new window)
100
+
- Go to the Settings tab
101
+
- Click "View Credentials"
102
+
- Use the fields from this window to fill in the variables below
89
103
90
104
```shell
91
-
> UTA_SCHEMA="uta_20210129b"# Specify the UTA schema you wish to use
0 commit comments