From cf4b14889ca420365408c4fc81e567130d38e4c7 Mon Sep 17 00:00:00 2001 From: Zatonix Date: Mon, 5 Feb 2024 00:38:10 +0100 Subject: [PATCH] :lipstick: Rename api directory (#6) --- .github/workflows/ci_api.yaml | 4 ++-- README.md | 6 +++--- app/src/app/layout.tsx | 4 ++-- app/src/app/page.tsx | 1 + {api => chess-analysis-api}/.pylintrc | 0 {api => chess-analysis-api}/Dockerfile | 0 {api => chess-analysis-api}/Makefile | 0 {api => chess-analysis-api}/api_client_initializer.py | 0 {api => chess-analysis-api}/docker-compose.CI.yaml | 0 {api => chess-analysis-api}/docker-compose.local.yaml | 0 {api => chess-analysis-api}/logging.yaml | 0 {api => chess-analysis-api}/main.py | 0 {api => chess-analysis-api}/requirements-dev.txt | 0 {api => chess-analysis-api}/requirements.txt | 0 .../services/chess_analysis/__init__.py | 0 .../services/chess_analysis/types.py | 0 {api => chess-analysis-api}/services/lichess/__init__.py | 0 {api => chess-analysis-api}/services/lichess/client.py | 0 .../services/lichess/endpoints/games.py | 0 {api => chess-analysis-api}/tests/__init__.py | 0 {api => chess-analysis-api}/tests/const.py | 0 {api => chess-analysis-api}/tests/test_chess_analysis.py | 0 22 files changed, 8 insertions(+), 7 deletions(-) rename {api => chess-analysis-api}/.pylintrc (100%) rename {api => chess-analysis-api}/Dockerfile (100%) rename {api => chess-analysis-api}/Makefile (100%) rename {api => chess-analysis-api}/api_client_initializer.py (100%) rename {api => chess-analysis-api}/docker-compose.CI.yaml (100%) rename {api => chess-analysis-api}/docker-compose.local.yaml (100%) rename {api => chess-analysis-api}/logging.yaml (100%) rename {api => chess-analysis-api}/main.py (100%) rename {api => chess-analysis-api}/requirements-dev.txt (100%) rename {api => chess-analysis-api}/requirements.txt (100%) rename {api => chess-analysis-api}/services/chess_analysis/__init__.py (100%) rename {api => chess-analysis-api}/services/chess_analysis/types.py (100%) rename {api => chess-analysis-api}/services/lichess/__init__.py (100%) rename {api => chess-analysis-api}/services/lichess/client.py (100%) rename {api => chess-analysis-api}/services/lichess/endpoints/games.py (100%) rename {api => chess-analysis-api}/tests/__init__.py (100%) rename {api => chess-analysis-api}/tests/const.py (100%) rename {api => chess-analysis-api}/tests/test_chess_analysis.py (100%) diff --git a/.github/workflows/ci_api.yaml b/.github/workflows/ci_api.yaml index 54cdf59..b626539 100644 --- a/.github/workflows/ci_api.yaml +++ b/.github/workflows/ci_api.yaml @@ -3,7 +3,7 @@ name: Launch tests application on: pull_request: paths: - - 'api/**' + - 'chess-analysis-api/**' jobs: tests: @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./api + working-directory: ./chess-analysis-api strategy: matrix: diff --git a/README.md b/README.md index bb82da2..e1ebca5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This is a chess tactics trainer. It is a software for lichess game analysis and tactics training. - + ## Getting Started @@ -30,7 +30,7 @@ This is a chess tactics trainer. It is a software for lichess game analysis and ### Installing ```bash -cd api/ +cd chess-analysis-api/ make init # to build api docker image cd ../app @@ -40,7 +40,7 @@ npm install # to install app dependencies ### How to Backend ```bash -cd api/ +cd chess-analysis-api/ make run # to launch api make test # to launch tests make lint # to check linter diff --git a/app/src/app/layout.tsx b/app/src/app/layout.tsx index 3314e47..3757490 100644 --- a/app/src/app/layout.tsx +++ b/app/src/app/layout.tsx @@ -5,8 +5,8 @@ import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Chess Tactics Trainer", + description: "An app to train your chess tactics", }; export default function RootLayout({ diff --git a/app/src/app/page.tsx b/app/src/app/page.tsx index fdcd535..0110dd2 100644 --- a/app/src/app/page.tsx +++ b/app/src/app/page.tsx @@ -40,6 +40,7 @@ export default function Home() { setMissedTactics([]) const response = await fetch(`http://localhost:5555/missed_tactics/${name}`) const data = await response.json() as MissedTactic[] + console.log(data) setMissedTactics(data) setIsLoading(false) } diff --git a/api/.pylintrc b/chess-analysis-api/.pylintrc similarity index 100% rename from api/.pylintrc rename to chess-analysis-api/.pylintrc diff --git a/api/Dockerfile b/chess-analysis-api/Dockerfile similarity index 100% rename from api/Dockerfile rename to chess-analysis-api/Dockerfile diff --git a/api/Makefile b/chess-analysis-api/Makefile similarity index 100% rename from api/Makefile rename to chess-analysis-api/Makefile diff --git a/api/api_client_initializer.py b/chess-analysis-api/api_client_initializer.py similarity index 100% rename from api/api_client_initializer.py rename to chess-analysis-api/api_client_initializer.py diff --git a/api/docker-compose.CI.yaml b/chess-analysis-api/docker-compose.CI.yaml similarity index 100% rename from api/docker-compose.CI.yaml rename to chess-analysis-api/docker-compose.CI.yaml diff --git a/api/docker-compose.local.yaml b/chess-analysis-api/docker-compose.local.yaml similarity index 100% rename from api/docker-compose.local.yaml rename to chess-analysis-api/docker-compose.local.yaml diff --git a/api/logging.yaml b/chess-analysis-api/logging.yaml similarity index 100% rename from api/logging.yaml rename to chess-analysis-api/logging.yaml diff --git a/api/main.py b/chess-analysis-api/main.py similarity index 100% rename from api/main.py rename to chess-analysis-api/main.py diff --git a/api/requirements-dev.txt b/chess-analysis-api/requirements-dev.txt similarity index 100% rename from api/requirements-dev.txt rename to chess-analysis-api/requirements-dev.txt diff --git a/api/requirements.txt b/chess-analysis-api/requirements.txt similarity index 100% rename from api/requirements.txt rename to chess-analysis-api/requirements.txt diff --git a/api/services/chess_analysis/__init__.py b/chess-analysis-api/services/chess_analysis/__init__.py similarity index 100% rename from api/services/chess_analysis/__init__.py rename to chess-analysis-api/services/chess_analysis/__init__.py diff --git a/api/services/chess_analysis/types.py b/chess-analysis-api/services/chess_analysis/types.py similarity index 100% rename from api/services/chess_analysis/types.py rename to chess-analysis-api/services/chess_analysis/types.py diff --git a/api/services/lichess/__init__.py b/chess-analysis-api/services/lichess/__init__.py similarity index 100% rename from api/services/lichess/__init__.py rename to chess-analysis-api/services/lichess/__init__.py diff --git a/api/services/lichess/client.py b/chess-analysis-api/services/lichess/client.py similarity index 100% rename from api/services/lichess/client.py rename to chess-analysis-api/services/lichess/client.py diff --git a/api/services/lichess/endpoints/games.py b/chess-analysis-api/services/lichess/endpoints/games.py similarity index 100% rename from api/services/lichess/endpoints/games.py rename to chess-analysis-api/services/lichess/endpoints/games.py diff --git a/api/tests/__init__.py b/chess-analysis-api/tests/__init__.py similarity index 100% rename from api/tests/__init__.py rename to chess-analysis-api/tests/__init__.py diff --git a/api/tests/const.py b/chess-analysis-api/tests/const.py similarity index 100% rename from api/tests/const.py rename to chess-analysis-api/tests/const.py diff --git a/api/tests/test_chess_analysis.py b/chess-analysis-api/tests/test_chess_analysis.py similarity index 100% rename from api/tests/test_chess_analysis.py rename to chess-analysis-api/tests/test_chess_analysis.py