Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into only_schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
orionarcher committed Apr 10, 2024
2 parents 891b067 + 463c1a2 commit 9c9dee9
Show file tree
Hide file tree
Showing 29 changed files with 1,205 additions and 840 deletions.
161 changes: 89 additions & 72 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions emmet-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM materialsproject/devops:python-3.1010.24 as base
FROM materialsproject/devops:python-3.1013.7 as base
RUN apt-get update && apt-get install -y --no-install-recommends libopenblas-dev libjpeg62 && apt-get clean

FROM base as builder
Expand All @@ -8,14 +8,14 @@ WORKDIR /emmet-api
ENV PIP_FLAGS "--user --no-cache-dir --compile"
COPY requirements/deployment.txt ./requirements.txt
RUN pip install $PIP_FLAGS --upgrade pip pip-tools setuptools-scm && \
pip-sync requirements.txt --pip-args "$PIP_FLAGS"
pip-sync requirements.txt --pip-args "$PIP_FLAGS"

COPY emmet emmet
COPY setup.py .
ARG API_VERSION
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${API_VERSION} pip install $PIP_FLAGS --no-deps .
RUN wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && \
chmod +x wait-for-it.sh && mv wait-for-it.sh /root/.local/bin/
chmod +x wait-for-it.sh && mv wait-for-it.sh /root/.local/bin/

FROM base
COPY --from=builder /root/.local/lib/python3.10/site-packages /root/.local/lib/python3.10/site-packages
Expand All @@ -25,18 +25,18 @@ COPY --from=builder /emmet-api /emmet-api
WORKDIR /emmet-api
ARG VERSION
ENV PATH=/root/.local/bin:$PATH \
PYTHONUNBUFFERED=1 \
FLASK_APP=emmet-api \
FLASK_ENV=production \
PORT=10001 \
NUM_WORKERS=4 \
RELOAD="" \
MAX_REQUESTS=0 \
MAX_REQUESTS_JITTER=0 \
DD_TRACE_HOST=localhost:8126 \
DD_SERVICE=next-gen-api \
DD_ENV=prod \
DD_VERSION=$VERSION
PYTHONUNBUFFERED=1 \
FLASK_APP=emmet-api \
FLASK_ENV=production \
PORT=10001 \
NUM_WORKERS=4 \
RELOAD="" \
MAX_REQUESTS=0 \
MAX_REQUESTS_JITTER=0 \
DD_TRACE_HOST=localhost:8126 \
DD_SERVICE=next-gen-api \
DD_ENV=prod \
DD_VERSION=$VERSION

COPY app.py .
COPY material_resources.py .
Expand All @@ -47,4 +47,4 @@ RUN chmod +x start.sh
LABEL com.datadoghq.ad.logs='[{"source": "gunicorn", "service": "next-gen-api"}]'

EXPOSE 10001 20001
CMD wait-for-it.sh $DD_TRACE_HOST -q -s -t 60 -- ./start.sh
CMD ./start.sh
54 changes: 26 additions & 28 deletions emmet-api/requirements/deployment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ bcrypt==4.1.2
# via paramiko
blinker==1.7.0
# via flask
boto3==1.34.69
boto3==1.34.81
# via
# emmet-api (emmet/emmet-api/setup.py)
# maggma
botocore==1.34.69
botocore==1.34.81
# via
# boto3
# s3transfer
Expand All @@ -49,37 +49,37 @@ click==8.1.7
# flask
# mongogrant
# uvicorn
contourpy==1.2.0
contourpy==1.2.1
# via matplotlib
cryptography==42.0.5
# via paramiko
cycler==0.12.1
# via matplotlib
ddsketch==2.0.4
ddsketch==3.0.1
# via ddtrace
ddtrace==2.7.4
ddtrace==2.8.0
# via emmet-api (emmet/emmet-api/setup.py)
deprecated==1.2.14
# via opentelemetry-api
dnspython==2.6.1
# via
# maggma
# pymongo
emmet-core==0.80.0
emmet-core==0.82.1
# via emmet-api (emmet/emmet-api/setup.py)
envier==0.5.1
# via ddtrace
exceptiongroup==1.2.0
# via
# anyio
# cattrs
fastapi==0.110.0
fastapi==0.110.1
# via
# emmet-api (emmet/emmet-api/setup.py)
# maggma
flask==3.0.2
flask==3.0.3
# via mongogrant
fonttools==4.50.0
fonttools==4.51.0
# via matplotlib
future==1.0.0
# via uncertainties
Expand All @@ -91,7 +91,7 @@ idna==3.6
# via
# anyio
# requests
importlib-metadata==6.11.0
importlib-metadata==7.0.0
# via opentelemetry-api
itsdangerous==2.1.2
# via flask
Expand All @@ -101,7 +101,7 @@ jmespath==1.0.1
# via
# boto3
# botocore
joblib==1.3.2
joblib==1.4.0
# via pymatgen
jsonschema==4.21.1
# via maggma
Expand All @@ -117,15 +117,15 @@ markupsafe==2.1.5
# via
# jinja2
# werkzeug
matplotlib==3.8.3
matplotlib==3.8.4
# via
# -r python/requirements.txt
# pymatgen
mongogrant==0.3.3
# via maggma
mongomock==4.1.2
# via maggma
monty==2024.2.26
monty==2024.3.31
# via
# emmet-core
# maggma
Expand All @@ -134,7 +134,7 @@ mpmath==1.3.0
# via sympy
msgpack==1.0.8
# via maggma
networkx==3.2.1
networkx==3.3
# via pymatgen
numpy==1.26.4
# via
Expand All @@ -147,9 +147,9 @@ numpy==1.26.4
# scipy
# shapely
# spglib
opentelemetry-api==1.23.0
opentelemetry-api==1.24.0
# via ddtrace
orjson==3.9.15
orjson==3.10.0
# via maggma
packaging==24.0
# via
Expand All @@ -165,19 +165,17 @@ pandas==2.2.1
# pymatgen
paramiko==3.4.0
# via sshtunnel
pillow==10.2.0
pillow==10.3.0
# via matplotlib
plotly==5.20.0
# via pymatgen
protobuf==5.26.0
# via
# ddsketch
# ddtrace
protobuf==5.26.1
# via ddtrace
pybtex==0.24.0
# via
# emmet-core
# pymatgen
pycparser==2.21
pycparser==2.22
# via cffi
pydantic==2.6.4
# via
Expand All @@ -191,15 +189,15 @@ pydantic-settings==2.2.1
# via
# emmet-core
# maggma
pydash==7.0.7
pydash==8.0.0
# via maggma
pymatgen==2024.3.1
# via
# emmet-core
# pymatgen-analysis-alloys
pymatgen-analysis-alloys==0.0.6
# via emmet-api (emmet/emmet-api/setup.py)
pymongo==4.6.2
pymongo==4.6.3
# via
# maggma
# mongogrant
Expand Down Expand Up @@ -241,7 +239,7 @@ ruamel-yaml-clib==0.2.8
# via ruamel-yaml
s3transfer==0.10.1
# via boto3
scipy==1.12.0
scipy==1.13.0
# via
# -r python/requirements.txt
# pymatgen
Expand All @@ -267,7 +265,7 @@ sqlparse==0.4.4
# via ddtrace
sshtunnel==0.4.0
# via maggma
starlette==0.36.3
starlette==0.37.2
# via fastapi
sympy==1.12
# via pymatgen
Expand All @@ -279,7 +277,7 @@ tqdm==4.66.2
# via
# maggma
# pymatgen
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# anyio
# asgiref
Expand All @@ -301,7 +299,7 @@ urllib3==2.2.1
# requests
uvicorn==0.29.0
# via maggma
werkzeug==3.0.1
werkzeug==3.0.2
# via flask
wrapt==1.16.0
# via deprecated
Expand Down

0 comments on commit 9c9dee9

Please sign in to comment.