Skip to content

Commit 5c3cc35

Browse files
authored
Merge pull request #75 from ArielMAJ/feat/#49/#66/#73/#74/refactor/tests
Feat/#49/#66/#73/#74/refactor/tests
2 parents e88106e + a9b60fb commit 5c3cc35

100 files changed

Lines changed: 607 additions & 120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches: ["main"]
55
paths:
6-
- "vue-front/**"
6+
- "frontend/**"
77
- ".github/workflows/auto_deploy.yml"
88
env:
99
VITE_APP_BACKEND_ROOT_ENDPOINT: ${{ vars.VITE_APP_BACKEND_ROOT_ENDPOINT }}
@@ -27,7 +27,7 @@ jobs:
2727
user_email: "ariel.maj@hotmail.comm"
2828
- name: deploy to gh-pages
2929
run: |
30-
cd vue-front
30+
cd frontend
3131
bun install
3232
mkdir tmp
3333
cd tmp

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ifneq ("$(wildcard .env)","")
33
export
44
endif
55

6-
API_DIR = api
7-
VUE_FRONT_DIR = vue-front
6+
API_DIR = backend
7+
VUE_FRONT_DIR = frontend
88

99
MAKE_API = $(MAKE) -C $(API_DIR)
1010
MAKE_VUE_FRONT = $(MAKE) -C $(VUE_FRONT_DIR)
@@ -31,5 +31,5 @@ minor: pre-commit
3131
$(MAKE_VUE_FRONT) minor
3232

3333
default-dot-envs:
34-
cp ./vue-front/.env.example ./vue-front/.env
35-
cp ./api/.env.example ./api/.env
34+
cp ./$(VUE_FRONT_DIR)/.env.example ./$(VUE_FRONT_DIR)/.env.local
35+
cp ./$(API_DIR)/.env.example ./$(API_DIR)/.env

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ Everytime you push to the `main` branch, the action will run and deploy the fron
8484

8585
### Backend
8686

87-
I personally recommend Vercel for the backend, as it is the easiest to set up and use and it's free for personal projects. The [vercel.json](./vercel.json) file is already set up for this, but you're gonna need to change the root directory to your api directory in Vercel:
87+
I personally recommend Vercel for the backend, as it is the easiest to set up and use and it's free for personal projects. The [vercel.json](./vercel.json) file is already set up for this, but you're gonna need to change the root directory to your backend directory in Vercel:
8888
![API root folder image](./docs/images/api-root-folder.png)
8989

9090
Make sure to add any environment variables you create for your API in the Environment Variables section of the Vercel Project Settings.
9191

92-
Obs.: The backend packages are locally managed with `poetry`, but, for simplicity in Vercel deployment, the `requirements.txt` file is present in the folder as well. You can generate the `requirements.txt` file with the command `poetry export -f requirements.txt --output requirements.txt --without-hashes` in the `api` directory. If you use the pre-commit hook, it will automatically generate the `requirements.txt` file for you when you commit.
92+
Obs.: The backend packages are locally managed with `poetry`, but, for simplicity in Vercel deployment, the `requirements.txt` file is present in the folder as well. You can generate the `requirements.txt` file with the command `poetry export -f requirements.txt --output requirements.txt --without-hashes` in the `backend` directory. If you use the pre-commit hook, it will automatically generate the `requirements.txt` file for you when you commit.
9393

9494
## Compatibility
9595

api/.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

api/src/main.py

Lines changed: 0 additions & 37 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,11 @@ repos:
33
rev: "1.7.0"
44
hooks:
55
- id: poetry-check
6-
args: [--directory=api]
6+
args: [--directory=backend]
77
- id: poetry-lock
8-
args: [--directory=api]
8+
args: [--directory=backend]
99
- id: poetry-install
10-
args: [--directory=api]
11-
- id: poetry-export
12-
args:
13-
[
14-
--directory=api,
15-
--without-hashes,
16-
-o,
17-
api/requirements.txt,
18-
-f,
19-
requirements.txt,
20-
]
10+
args: [--directory=backend]
2111
- repo: https://github.com/pre-commit/pre-commit-hooks
2212
rev: v4.5.0
2313
hooks:
@@ -110,5 +100,5 @@ repos:
110100
name: Export requeriments.txt
111101
language: system
112102
pass_filenames: false
113-
entry: poetry export --without-hashes -o requirements.txt
103+
entry: poetry export --without-hashes -o requirements.txt -f requirements.txt
114104
files: ^(pyproject\.toml|poetry\.lock)$

backend/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9.18

0 commit comments

Comments
 (0)