Spaces:
Runtime error
Runtime error
Nicky Nicolson
commited on
Commit
·
7cc6ee0
1
Parent(s):
054a467
Read DB from google drive, add reconciliation
Browse files- Dockerfile +5 -5
- metadata.json +25 -0
- metadata.yml +0 -1
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -6,11 +6,11 @@ COPY ./requirements.txt /code/requirements.txt
|
|
| 6 |
|
| 7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
|
| 9 |
-
ADD https://
|
| 10 |
|
| 11 |
-
RUN sqlite-utils tables /code/
|
| 12 |
-
RUN chmod 755 /code/
|
| 13 |
|
| 14 |
-
COPY ./metadata.
|
| 15 |
|
| 16 |
-
CMD ["datasette", "/code/
|
|
|
|
| 6 |
|
| 7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
|
| 9 |
+
ADD https://drive.google.com/file/d/17mI5W0qiGiBp_RV1jy3QR3KtN7Ah-1Ha/view?usp=sharing /code/ihinst.db
|
| 10 |
|
| 11 |
+
RUN sqlite-utils tables /code/ihinst.db --counts
|
| 12 |
+
RUN chmod 755 /code/ihinst.db
|
| 13 |
|
| 14 |
+
COPY ./metadata.json /code/metadata.json
|
| 15 |
|
| 16 |
+
CMD ["datasette", "/code/ihinst.db", "-m", "/code/metadata.json", "--host", "0.0.0.0", "--port", "7860"]
|
metadata.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"title": "nickyn-ih-test",
|
| 3 |
+
"databases": {
|
| 4 |
+
"ihinst": {
|
| 5 |
+
"tables": {
|
| 6 |
+
"ih-institutions": {
|
| 7 |
+
"plugins": {
|
| 8 |
+
"datasette-reconcile": {
|
| 9 |
+
"id_field": "irn",
|
| 10 |
+
"name_field": "code",
|
| 11 |
+
"type_field": "organization",
|
| 12 |
+
"type_default": [{
|
| 13 |
+
"id": "institution",
|
| 14 |
+
"name": "Institution"
|
| 15 |
+
}],
|
| 16 |
+
"max_limit": 5,
|
| 17 |
+
"service_name": "IH institution reconciliation",
|
| 18 |
+
"view_url": "https://sweetgum.nybg.org/science/ih/herbarium-details/?irn={{id}}"
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
metadata.yml
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
title: nickyn test
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
datasette
|
|
|
|
| 2 |
sqlite-utils
|
|
|
|
| 1 |
datasette
|
| 2 |
+
datasette-reconcile
|
| 3 |
sqlite-utils
|