Skip to content

Commit

Permalink
Fixed build to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy-1000 committed Mar 13, 2024
1 parent f243ffb commit fb04bc1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 5 additions & 3 deletions ingest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim-bookworm
FROM python:3.10-slim-bookworm

SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"]

Expand All @@ -15,12 +15,14 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

COPY "./protobuf/datastore.proto" "/protobuf/datastore.proto"
COPY "./api" "${DOCKER_PATH}/"
COPY "./api" "${DOCKER_PATH}/api/"
COPY "requirements.txt" "${DOCKER_PATH}/"
COPY "./src/" "/ingest/src"
COPY "./pyproject.toml" "/ingest/pyproject.toml"
COPY "./setup.py" "/ingest/"

RUN pip install --no-cache-dir --upgrade -r "${DOCKER_PATH}/requirements.txt"
RUN pip install --no-cache-dir --upgrade pybind11

# hadolint ignore=DL3013
WORKDIR /ingest/src/ingest/bufr/
Expand All @@ -39,4 +41,4 @@ RUN python -m grpc_tools.protoc \


WORKDIR "${DOCKER_PATH}"
CMD ["gunicorn", "main:app", "--workers=4", "--worker-class=uvicorn.workers.UvicornWorker", "--bind=0.0.0.0:8000"]
CMD ["gunicorn", "api.main:app", "--workers=4", "--worker-class=uvicorn.workers.UvicornWorker", "--bind=0.0.0.0:8001"]
4 changes: 1 addition & 3 deletions ingest/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
xarray == 2023.7.0
netCDF4 ~= 1.6.4
numpy ~= 1.25.2
paho-mqtt ~= 1.6.1
gunicorn~=21.2
jsonschema ~= 4.19.0
pybind11 == 2.11.1
protobuf ~= 4.24.3
grpcio == 1.59.0
fastapi == 0.108.0
grpcio-tools==1.58.0
uvicorn==0.25.0
python-multipart~=0.0.9
4 changes: 2 additions & 2 deletions ingest/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

ext_modules = [
Pybind11Extension(
"esoh.ingest.bufr.bufresohmsg_py",
sorted(glob("src/esoh/ingest/bufr/*.cpp")), # Sort source files for reproducibility
"ingest.bufr.bufresohmsg_py",
sorted(glob("src/ingest/bufr/*.cpp")), # Sort source files for reproducibility
extra_compile_args=["-std=c++17"],
),
]
Expand Down
12 changes: 6 additions & 6 deletions ingest/src/ingest/bufr/create_mqtt_message_from_bufr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import os
import sys

from bufr.bufresohmsg_py import bufresohmsg_py
from bufr.bufresohmsg_py import bufrlog_clear_py
from bufr.bufresohmsg_py import bufrlog_py
from bufr.bufresohmsg_py import init_bufr_schema_py
from bufr.bufresohmsg_py import init_bufrtables_py
from bufr.bufresohmsg_py import init_oscar_py
from ingest.bufr.bufresohmsg_py import bufresohmsg_py
from ingest.bufr.bufresohmsg_py import bufrlog_clear_py
from ingest.bufr.bufresohmsg_py import bufrlog_py
from ingest.bufr.bufresohmsg_py import init_bufr_schema_py
from ingest.bufr.bufresohmsg_py import init_bufrtables_py
from ingest.bufr.bufresohmsg_py import init_oscar_py


def build_all_json_payloads_from_bufr(bufr_file_path: str) -> list[str]:
Expand Down

1 comment on commit fb04bc1

@github-actions
Copy link

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
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%24–69
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
dependencies.py481667%26–27, 34, 41, 62–69, 77–84
grpc_getter.py13838%12–15, 19–22
locustfile.py15150%1–31
main.py22386%27, 37, 47
metadata_endpoints.py19479%17, 34–67, 71
formatters
   \_\_init\_\_.py70100% 
   covjson.py46687%58, 65–69, 73–76
routers
   \_\_init\_\_.py00100% 
   edr.py671184%38–63, 143–144, 188–189, 205
   records.py00100% 
TOTAL33813261% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
16 0 💤 8 ❌ 0 🔥 4.000s ⏱️

Please sign in to comment.