-
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.
- Loading branch information
Showing
105 changed files
with
6,282 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 @@ | ||
{"meta": {"format": 2, "version": "7.5.0", "timestamp": "2024-05-12T15:49:07.235685", "branch_coverage": false, "show_contexts": false}, "files": {"src/recommendation_engine/app/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/entity/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/entity/getir.py": {"executed_lines": [1, 2, 4, 5, 6, 7, 8, 11, 12, 22, 23, 24, 25, 36, 38, 39, 40, 41, 46, 47, 48, 50, 53, 55, 58, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 85, 86, 87, 88, 89, 91, 92, 94], "summary": {"covered_lines": 50, "num_statements": 54, "percent_covered": 92.5925925925926, "percent_covered_display": "93", "missing_lines": 4, "excluded_lines": 0}, "missing_lines": [51, 56, 59, 63], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/entity/yemek_sepeti.py": {"executed_lines": [1, 2, 4, 5, 6, 7, 8, 11, 12, 31, 32, 33, 34, 49, 51, 52, 53, 54, 59, 60, 61, 63, 66, 67, 69, 72, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 96, 99, 100, 101, 102, 104, 105, 107], "summary": {"covered_lines": 49, "num_statements": 54, "percent_covered": 90.74074074074075, "percent_covered_display": "91", "missing_lines": 5, "excluded_lines": 0}, "missing_lines": [64, 70, 73, 76, 77], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/comment.py": {"executed_lines": [1, 2, 5, 6, 7], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/getir/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/getir/comment.py": {"executed_lines": [1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 17, 19, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 37, 39, 40, 42, 43, 45], "summary": {"covered_lines": 30, "num_statements": 36, "percent_covered": 83.33333333333333, "percent_covered_display": "83", "missing_lines": 6, "excluded_lines": 0}, "missing_lines": [16, 21, 26, 31, 36, 41], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/yemeksepeti/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/yemeksepeti/comment.py": {"executed_lines": [1, 2, 3, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 27, 29, 30, 33, 34, 43, 44, 47, 48, 57, 58, 60, 62, 63, 65, 67, 68, 70, 72, 73, 75, 80, 81, 82, 84, 85, 86, 87, 88, 89, 91, 93, 94, 96, 98, 99, 102, 103, 104, 116, 118, 119, 122, 123, 124, 127, 130, 138, 147, 156], "summary": {"covered_lines": 71, "num_statements": 81, "percent_covered": 87.65432098765432, "percent_covered_display": "88", "missing_lines": 10, "excluded_lines": 0}, "missing_lines": [26, 31, 45, 59, 64, 69, 74, 95, 100, 120], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/yemeksepeti/product_variation.py": {"executed_lines": [1, 4, 5, 6, 7, 8, 9, 10], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/yemeksepeti/rating.py": {"executed_lines": [1, 4, 5, 6, 7, 8], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/comments/values/yemeksepeti/replies.py": {"executed_lines": [1, 2, 5, 6, 7, 8, 9, 10], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/entity.py": {"executed_lines": [1, 2, 5, 6, 7, 9, 13], "summary": {"covered_lines": 7, "num_statements": 10, "percent_covered": 70.0, "percent_covered_display": "70", "missing_lines": 3, "excluded_lines": 0}, "missing_lines": [10, 11, 14], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/entity/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/entity/getir.py": {"executed_lines": [1, 3, 4, 5, 6, 7, 10, 11, 25, 26, 27, 28, 36, 38, 39, 42, 43, 44, 46, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 82], "summary": {"covered_lines": 45, "num_statements": 45, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/values/__init__.py": {"executed_lines": [1, 2], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/values/getir/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/values/getir/menu.py": {"executed_lines": [1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 38, 39, 40, 42, 43, 45, 47, 48, 50, 51, 54, 55, 57, 58, 61, 62, 64], "summary": {"covered_lines": 42, "num_statements": 52, "percent_covered": 80.76923076923077, "percent_covered_display": "81", "missing_lines": 10, "excluded_lines": 0}, "missing_lines": [21, 26, 31, 36, 44, 49, 52, 56, 59, 63], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/values/menu.py": {"executed_lines": [1, 3, 6, 7, 8], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/menu/values/price.py": {"executed_lines": [1, 4, 5, 6, 7], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/mixins.py": {"executed_lines": [1, 4, 5, 6, 7, 8, 9], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/processor.py": {"executed_lines": [1, 3, 4, 10, 11, 12, 13, 14, 16, 17, 18, 21, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 41, 44, 45, 46, 47, 53, 58, 59, 60, 67, 68, 71], "summary": {"covered_lines": 38, "num_statements": 43, "percent_covered": 88.37209302325581, "percent_covered_display": "88", "missing_lines": 5, "excluded_lines": 0}, "missing_lines": [42, 48, 49, 72, 73], "excluded_lines": []}, "src/recommendation_engine/app/domain/request.py": {"executed_lines": [1, 2, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 17, 19, 20, 25, 26, 27, 28], "summary": {"covered_lines": 19, "num_statements": 19, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/__init__.py": {"executed_lines": [0], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/entity/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/entity/getir.py": {"executed_lines": [1, 2, 4, 5, 6, 7, 8, 9, 10, 13, 14, 24, 25, 26, 27, 51, 53, 54, 55, 56, 61, 62, 63, 65, 68, 72, 75, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 95, 98, 99, 100, 102, 103, 104, 105, 106, 108, 112, 114], "summary": {"covered_lines": 50, "num_statements": 54, "percent_covered": 92.5925925925926, "percent_covered_display": "93", "missing_lines": 4, "excluded_lines": 0}, "missing_lines": [66, 73, 76, 80], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/__init__.py": {"executed_lines": [1, 2, 3, 4, 5], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/delivery_time.py": {"executed_lines": [1, 4, 5, 6, 7, 8], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/geo.py": {"executed_lines": [1, 4, 5, 6, 7], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/getir/__init__.py": {"executed_lines": [1], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/getir/restaurant.py": {"executed_lines": [1, 2, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 28, 29, 31, 33, 34, 36, 38, 39, 42, 44, 45, 46, 50, 51, 54, 55, 58, 60, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 78, 79, 81, 82, 84, 88, 97, 98, 99, 101, 104, 105], "summary": {"covered_lines": 62, "num_statements": 78, "percent_covered": 79.48717948717949, "percent_covered_display": "79", "missing_lines": 16, "excluded_lines": 0}, "missing_lines": [25, 30, 35, 40, 47, 48, 52, 64, 74, 83, 90, 91, 93, 94, 95, 102], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/price.py": {"executed_lines": [1, 4, 5, 6, 7], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/rating_count.py": {"executed_lines": [1, 4, 5, 6, 7], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/restaurants/values/restaurant.py": {"executed_lines": [1, 3, 6, 7, 8], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "src/recommendation_engine/app/domain/value_stack.py": {"executed_lines": [1, 3, 4, 5, 8, 11, 12, 13, 15, 16, 18, 19, 21, 24, 25], "summary": {"covered_lines": 15, "num_statements": 16, "percent_covered": 93.75, "percent_covered_display": "94", "missing_lines": 1, "excluded_lines": 0}, "missing_lines": [22], "excluded_lines": []}, "tests/app/domain/comments/test_getir_comments.py": {"executed_lines": [1, 6, 7, 8, 9, 10], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "tests/app/domain/comments/test_yemeksepeti_comments.py": {"executed_lines": [1, 6, 7, 8, 9, 10], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "tests/app/domain/menu/test_getir_menu.py": {"executed_lines": [1, 6, 7, 10, 11, 12], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "tests/app/domain/restaurants/getir/test_getir_restaurants.py": {"executed_lines": [1, 4, 9, 10, 11, 12, 13, 14], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}}, "totals": {"covered_lines": 587, "num_statements": 651, "percent_covered": 90.16897081413211, "percent_covered_display": "90", "missing_lines": 64, "excluded_lines": 0}} |
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,59 @@ | ||
import os | ||
import dotenv | ||
import uvicorn | ||
import inspect | ||
from loguru import logger | ||
from fastapi import FastAPI | ||
from sqlalchemy import inspect as sqlalchemy_inspect | ||
|
||
|
||
env = os.getenv("ENVIRONMENT", "local") | ||
( | ||
dotenv.load_dotenv(".env.docker") | ||
if env == "docker" | ||
else dotenv.load_dotenv(".env.local") | ||
) | ||
|
||
|
||
# noinspection PyUnresolvedReferences | ||
from src.recommendation_engine.app.shared_kernel.scheduler.celery_app import ( | ||
celery_application, | ||
) | ||
|
||
# noinspection PyUnresolvedReferences | ||
from src.recommendation_engine.app.tasks import * | ||
|
||
# noinspection PyUnresolvedReferences | ||
from src.recommendation_engine.app.shared_kernel.database.clickhouse import ( | ||
ClickhouseBase, | ||
engine, | ||
) | ||
|
||
# noinspection PyUnresolvedReferences | ||
from src.recommendation_engine.app import * | ||
|
||
|
||
app = FastAPI() | ||
|
||
|
||
def create_tables(): | ||
inspector = sqlalchemy_inspect(engine) | ||
|
||
for name, obj in globals().items(): | ||
if inspect.isclass(obj): | ||
if issubclass(obj, ClickhouseBase) and obj != ClickhouseBase: | ||
if not inspector.has_table(obj.__tablename__): | ||
obj.__table__.create(engine) | ||
logger.info(f"{name} Clickhouse Table Created.") | ||
else: | ||
logger.info(f"{name} Clickhouse Table Already Exists.") | ||
|
||
|
||
@app.get("/") | ||
def hello_world(): | ||
return "hello world" | ||
|
||
|
||
if __name__ == "__main__": | ||
create_tables() | ||
uvicorn.run("main:app", host="0.0.0.0", port=8000) |
Oops, something went wrong.