Python version: 3.12.1
cd backend python -m venv .venv
windows: .venv\Scripts\activate linux: source .venv/bin/activate
cd backend conda create -n ttds-proj python=3.12.1
conda activate ttds-proj
Visual Studio 2022 Community ed. (install) and installing "Desktop development with C++" having checked the optional features of MSVC and Windows 11 SDK.
sudo apt update
and sudo apt install build-essential
.
pip install -r requirements.txt
docker build -t fastapi:latest .
docker run -d -p 8080:8080 fastapi
create commit to branch "deploy"
.github/workflows
- build.yml (CI/CD)
- backend
-
data (put your data here if you want to build index from csv in local, ignored in git)
- bbc
- bbc_data_{date}_{index}.csv
- gbn
- gbn_data_{date}_{index}.csv
- ind
- ind_data_{date}_{index}.csv
- tele
- tele_data_{date}_{index}.csv
- bbc
-
routers
- __init__.py
- api.py
- {api_name}.py
-
utils
- __init__.py
- basetype.py (data structure)
- build_index.py (build index from csv)
- common.py (common functions)
- constant.py (constant values(path, enums, etc))
- pull_index.py (playground for pulling)
- push_index.py (utils for pushing inverted index to db)
- query_engine.py (query engine(boolean, tf-idf, etc))
- query_suggestion.py (query suggestion when typing)
- redis_utils.py (redis utils)
- sentiment_analyzer.py (sentiment analysis class and utils)
- spell_checker.py (spell checker class and utils)
- summarizer.py (utils for getting summaries for documents)
- ttds_2023_english_stop_words.txt (stop words)
-
__init__.py
-
.dockerignore
-
.gitignore
-
.env
-
deploy.py
-
main.py
-
requirements.txt
-
- frontend (react-app content)
- public
- src (js components)
- .env.development (env for dev)
- .env.production (env for prod)
- .gitignore
- package-lock.json (npm package lock)
- package.json (npm package)
- README.md
- temp (any temporary files that are not merged to backend/frontend) current_doc_id.txt (Just for crash recovery for local batch processing, not used in production) dockerfile (build docker image)