-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from EURODEO/making_ingest_api
Added json endpoint.
- Loading branch information
Showing
72 changed files
with
1,340,515 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/datastore_pb2*.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM python:3.10-slim-bookworm | ||
|
||
SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"] | ||
|
||
ENV DOCKER_PATH="/app" | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get install -y --no-install-recommends git libeccodes-data rapidjson-dev pybind11-dev make g++\ | ||
# Cleanup | ||
&& rm -rf /usr/tmp \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY "./protobuf/datastore.proto" "/protobuf/datastore.proto" | ||
COPY "./api" "${DOCKER_PATH}/api/" | ||
COPY "requirements.txt" "${DOCKER_PATH}/api/" | ||
COPY "./src/" "${DOCKER_PATH}/src/" | ||
COPY "./pyproject.toml" "${DOCKER_PATH}/pyproject.toml" | ||
COPY "./setup.py" "${DOCKER_PATH}/setup.py" | ||
|
||
RUN pip install --no-cache-dir --upgrade -r "${DOCKER_PATH}/api/requirements.txt" \ | ||
&& pip install --no-cache-dir --upgrade pybind11~="2.11.1" | ||
|
||
# hadolint ignore=DL3013 | ||
WORKDIR "${DOCKER_PATH}"/src/ingest/bufr/ | ||
RUN make | ||
WORKDIR / | ||
|
||
# Compiling the protobuf file | ||
RUN python -m grpc_tools.protoc \ | ||
--proto_path="protobuf" "protobuf/datastore.proto" \ | ||
--python_out="${DOCKER_PATH}" \ | ||
--grpc_python_out="${DOCKER_PATH}" | ||
|
||
WORKDIR "${DOCKER_PATH}" | ||
|
||
RUN python "api/generate_standard_name.py" | ||
|
||
# hadolint ignore=DL3013 | ||
RUN pip install --no-cache-dir --upgrade pip \ | ||
&& pip install --no-cache-dir --upgrade "${DOCKER_PATH}/" | ||
CMD ["gunicorn", "api.main:app", "--workers=4", "--worker-class=uvicorn.workers.UvicornWorker", "--bind=0.0.0.0:8001"] |
File renamed without changes.
Oops, something went wrong.
1a3ff81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Unit Test Coverage Report
API Unit Test Coverage Summary