cvpaperchallenge / Crux

Crux is a suite of LLM-empowered summarization and retrieval services for academic activity. Crux is developed by XCCV group of cvpaper.challenge.
MIT License
14 stars 2 forks source link

#15 16/chore/implement dto and dummy endpoint #23

Closed YoshikiKubotani closed 1 year ago

YoshikiKubotani commented 1 year ago

Issue URL

15 #16

Change overview

How to test

Endpoint Unit Test

Run the following command.

# Run the following under Crux/environment/cpu
docker compose exec backend make test

Architecture Check

Check the features separation is reasonable and follows S.O.L.I.D Principles

Type Check

Run the following command.

# Run the following under Crux/environment/cpu
docker compose exec backend make mypy

Note for reviewers

Questions

  1. To solve the mypy error, I used pydantic models in parts other than routers.py, but is that correct?
  2. The test is only passed when a fixed string (e.g., "This is a normal summary.") is returned from controller.py. When the logic is static, like Owan, the test can be configured to pass even after the logic is implemented. However, how should we configure the test for our case, where the solution changes dynamically (as the summary has a large variance)?
  3. HTTP is supposed to be a stateless protocol, unlike FTP, etc. Cannot we send multipart/form-data and application/json consecutively as separate POST processes instead of simultaneously?
gatheluck commented 1 year ago

@YoshikiKubotani It looks like CI still raise error due to code format? Can you fix this?

YoshikiKubotani commented 1 year ago

@gatheluck That's because I added the basic template of the main logic under backend/src/core_logic.py, while it's not called. and flake8 raises errors when functions and variables are defined but not used.

I think it's okay to ignore that since it would help us when we try to fully implement the logic in the future.

I've checked the type check and code format test were successfully passed.