Skip to content

Commit f713e39

Browse files
authored
Merge pull request #1056 from cmu-delphi/release/delphi-epidata-0.4.4
Release Delphi Epidata 0.4.4
2 parents 9280f04 + c5777c6 commit f713e39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+360
-324
lines changed

.bumpversion.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.4.3
2+
current_version = 0.4.4
33
commit = False
44
tag = False
55

@@ -14,3 +14,5 @@ tag = False
1414
[bumpversion:file:src/client/packaging/pypi/setup.py]
1515

1616
[bumpversion:file:src/client/packaging/pypi/delphi_epidata/__init__.py]
17+
18+
[bumpversion:file:dev/local/setup.cfg]

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151

5252
- name: Build docker images
5353
run: |
54-
docker build -t delphi_database -f repos/delphi/operations/dev/docker/database/Dockerfile .
55-
docker build -t delphi_python -f repos/delphi/operations/dev/docker/python/Dockerfile .
5654
docker build -t delphi_database_epidata -f ./repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .
5755
docker build -t delphi_web_python -f repos/delphi/delphi-epidata/dev/docker/python/Dockerfile .
5856
cd ./repos/delphi/delphi-epidata

dev/docker/database/epidata/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV MYSQL_ROOT_PASSWORD pass
1313
# create the `epidata` database
1414
ENV MYSQL_DATABASE epidata
1515

16-
# create the `epi` user account with a development-only password
16+
# create the `user` account with a development-only password
1717
ENV MYSQL_USER user
1818
ENV MYSQL_PASSWORD pass
1919

dev/docker/database/epidata/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# `delphi_database_epidata`
22

3-
This image extends Delphi's database by:
3+
This image extends a Percona database by:
44

5-
- adding the `epi` user account
6-
- adding the `epidata` database
7-
- creating empty tables in `epidata`
5+
- adding the `user` account
6+
- adding the `epidata` & other appropriate databases
7+
- creating empty tables in those databases
88

99
To start a container from this image, run:
1010

dev/docker/python/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# start with the `delphi_python` image
2-
FROM delphi_python
1+
FROM python:3.8-buster
32

4-
RUN pip install --no-cache-dir -r repos/delphi/delphi-epidata/requirements.txt -r repos/delphi/delphi-epidata/requirements.dev.txt
3+
WORKDIR /usr/src/app
4+
5+
COPY repos repos
6+
COPY repos/delphi/delphi-epidata/dev/docker/python/setup.sh .
7+
8+
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime && \
9+
chmod -R o+r repos/ && \
10+
bash setup.sh && \
11+
pip install --no-cache-dir -r repos/delphi/delphi-epidata/requirements.api.txt -r repos/delphi/delphi-epidata/requirements.dev.txt

dev/docker/python/setup.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This script sets up the correct directory structure within the `delphi_img`
2+
# docker image.
3+
4+
# Some notes on package structure:
5+
# - Python package names can't contain hyphens, so hyphens in repo names are
6+
# replaced with underscores in the package hierarchy. (An exception is the
7+
# repo `delphi-epidata`, which is renamed to simply `epidata`.)
8+
# - Repos are organized such that the main code for the package is inside of
9+
# a `src/` directory. When deployed, `src/` is elided. (An exception is the
10+
# legacy `undef-analysis` repo, which has sources at the top-level.)
11+
12+
# bail if anything fails
13+
set -e
14+
15+
# create python package `undefx`
16+
mkdir undefx
17+
mv repos/undefx/py3tester/src undefx/py3tester
18+
mv repos/undefx/undef-analysis undefx/undef_analysis
19+
20+
# create python package `delphi`
21+
mkdir delphi
22+
mv repos/delphi/operations/src delphi/operations
23+
mv repos/delphi/utils/src delphi/utils
24+
mv repos/delphi/github-deploy-repo/src delphi/github_deploy_repo
25+
mv repos/delphi/delphi-epidata/src delphi/epidata
26+
mv repos/delphi/flu-contest/src delphi/flu_contest
27+
mv repos/delphi/nowcast/src delphi/nowcast

dev/local/Makefile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
#
88
# Checks for the delphi-net bridge and creates if it doesn't exist.
99
#
10-
# Creates all prereq images (delphi_database, delphi_python) only if they don't
11-
# exist. If you need to rebuild a prereq, you're probably doing something
12-
# complicated, and can figure out the rebuild command on your own.
13-
#
1410
#
1511
# Commands:
1612
#
@@ -78,7 +74,7 @@ web:
7874
@# Build the web_epidata image
7975
@cd repos/delphi/delphi-epidata;\
8076
docker build -t delphi_web_epidata -f ./devops/Dockerfile .;\
81-
cd ../../../
77+
cd -
8278

8379
@# Run the web server
8480
@docker run --rm -p 127.0.0.1:10080:80 \
@@ -97,10 +93,6 @@ db:
9793
@# Setup virtual network if it doesn't exist
9894
@docker network ls | grep delphi-net || docker network create --driver bridge delphi-net
9995

100-
@# Only build prereqs if we need them
101-
@docker images delphi_database | grep delphi || \
102-
docker build -t delphi_database -f repos/delphi/operations/dev/docker/database/Dockerfile .
103-
10496
@# Build the database_epidata image
10597
@docker build -t delphi_database_epidata \
10698
-f repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .
@@ -120,10 +112,6 @@ db:
120112

121113
.PHONY=py
122114
py:
123-
@# Build the python image
124-
@docker build -t delphi_python \
125-
-f repos/delphi/operations/dev/docker/python/Dockerfile .
126-
127115
@docker build -t delphi_web_python \
128116
-f repos/delphi/delphi-epidata/dev/docker/python/Dockerfile .
129117

dev/local/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Delphi Development
3-
version = 0.4.0
3+
version = 0.4.4
44

55
[options]
66
packages =

devops/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ RUN npm ci && npm run build
55

66
FROM tiangolo/meinheld-gunicorn:python3.8
77
LABEL org.opencontainers.image.source=https://github.com/cmu-delphi/delphi-epidata
8-
# use delphi's timezome
9-
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime
108

11-
COPY requirements.txt /app/requirements_also.txt
12-
RUN pip install --no-cache-dir -r /tmp/requirements.txt -r requirements_also.txt
9+
COPY ./devops/gunicorn_conf.py /app
10+
COPY ./devops/start_wrapper.sh /
11+
COPY ./src/server/ /app/app/
12+
COPY --from=builder ./src/build/lib/ /app/app/lib/
13+
14+
COPY requirements.api.txt /app/requirements_also.txt
15+
16+
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime \
17+
&& rm -rf /app/app/__pycache__ /app/app/*.php \
18+
&& chmod -R o+r /app/app \
19+
&& chmod 755 /start_wrapper.sh \
20+
&& pip install --no-cache-dir -r /tmp/requirements.txt -r requirements_also.txt
1321
# the file /tmp/requirements.txt is created in the parent docker definition. (see:
1422
# https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/python3.8.dockerfile#L5 )
1523
# this combined requirements installation ensures all version constrants are accounted for.
1624

1725
# disable python stdout buffering
1826
ENV PYTHONUNBUFFERED 1
1927

20-
COPY ./devops/gunicorn_conf.py /app
21-
COPY ./devops/start_wrapper.sh /
22-
COPY ./src/server/ /app/app/
23-
COPY --from=builder ./src/build/lib/ /app/app/lib/
24-
RUN rm -rf /app/app/__pycache__ /app/app/*.php \
25-
&& chmod -R o+r /app/app \
26-
&& chmod 755 /start_wrapper.sh
27-
2828
ENTRYPOINT [ "/entrypoint.sh" ]
2929
CMD [ "/start_wrapper.sh" ]

docs/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ GEM
211211
jekyll-seo-tag (~> 2.1)
212212
minitest (5.14.4)
213213
multipart-post (2.1.1)
214-
nokogiri (1.13.9)
214+
nokogiri (1.13.10)
215215
mini_portile2 (~> 2.8.0)
216216
racc (~> 1.4)
217217
octokit (4.20.0)
@@ -220,7 +220,7 @@ GEM
220220
pathutil (0.16.2)
221221
forwardable-extended (~> 2.6)
222222
public_suffix (4.0.6)
223-
racc (1.6.0)
223+
racc (1.6.1)
224224
rb-fsevent (0.10.4)
225225
rb-inotify (0.10.1)
226226
ffi (~> 1.0)

0 commit comments

Comments
 (0)