You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
# Contributing to Tech4Dev AI Platform
1
+
# Contributing to Kaapi
2
2
3
-
Thank you for considering contributing to **Tech4Dev AI Platform**! We welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions.
3
+
Thank you for considering contributing to **Kaapi**! We welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions.
4
4
5
5
---
6
6
7
7
## 📌 Getting Started
8
8
To contribute successfully, you must first set up the project on your local machine. Please follow the instructions outlined in the project's README to configure the repository and begin your contributions.
9
9
10
-
Before you proceed, **make sure to check the repository's [README](https://github.com/ProjectTech4DevAI/ai-platform/blob/main/backend/README.md) for a comprehensive overview of the project's backend and detailed setup guidelines.**
10
+
Before you proceed, **make sure to check the repository's [README](https://github.com/ProjectTech4DevAI/kaapi-backend/blob/main/backend/README.md) for a comprehensive overview of the project's backend and detailed setup guidelines.**
11
11
12
12
---
13
13
@@ -17,10 +17,18 @@ Before you proceed, **make sure to check the repository's [README](https://githu
17
17
1. Click the **Fork** button on the top right of this repository.
1.**Check if an issue exists** for the bug or feature you want to work on in the [Issues](https://github.com/ProjectTech4DevAI/kaapi-backend/issues) section.
27
+
2.**If no issue exists**, create one first using the templates present:
28
+
- For bugs: Use the bug report template
29
+
- For enhancements: Use the enhancement request template
30
+
- For features: Create a feature request issue
31
+
24
32
### Create a Branch
25
33
• Always work in a new branch based on main.
26
34
• For branch name, follow this convention: ``type/one-line-description``
@@ -30,12 +38,9 @@ cd ai-platform
30
38
- enhancement
31
39
- bugfix
32
40
- feature
33
-
34
-
35
41
```
36
42
git checkout -b type/one-line-description
37
43
```
38
-
39
44
### Make and Test Changes
40
45
1. Adhere to the project's established coding style for consistency.
41
46
2. Make sure the code adheres to best practices.
@@ -60,7 +65,7 @@ git commit -m "one liner for the commit"
60
65
• For PR name, follow this convention:
61
66
``Module Name: One liner of changes``
62
67
63
-
• Don't forget to link the PR to the issue if you are solving one.
Copy file name to clipboardExpand all lines: backend/README.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# FastAPI Project - Backend
1
+
# Kaapi - Backend
2
2
3
3
## Requirements
4
4
@@ -27,13 +27,15 @@ $ source .venv/bin/activate
27
27
28
28
Make sure your editor is using the correct Python virtual environment, with the interpreter at `backend/.venv/bin/python`.
29
29
30
-
Modify or add SQLModel models for data and SQL tables in `./backend/app/models.py`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud.py`.
30
+
Modify or add SQLModel models for data and SQL tables in `./backend/app/models/`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud/`.
31
31
32
-
## VS Code
32
+
## Seed Database (Optional)
33
33
34
-
There are already configurations in place to run the backend through the VS Code debugger, so that you can use breakpoints, pause and explore variables, etc.
34
+
For local development, seed the database with baseline data:
35
35
36
-
The setup is also already configured so you can run the tests through the VS Code Python tests tab.
36
+
```console
37
+
$ uv run python -m app.seed_data.seed_data
38
+
```
37
39
38
40
## Docker Compose Override
39
41
@@ -91,6 +93,22 @@ Nevertheless, if it doesn't detect a change but a syntax error, it will just sto
91
93
92
94
## Backend tests
93
95
96
+
### Setup Test Environment
97
+
98
+
Before running tests, create a test environment configuration:
99
+
100
+
1. Copy the test environment template:
101
+
```console
102
+
$ cp .env.test.example .env.test
103
+
```
104
+
105
+
2. Update `.env.test` with test-specific settings:
106
+
- Set `ENVIRONMENT=testing`
107
+
- Configure a separate test database (recommended). Using a separate
108
+
database prevents tests from affecting your development data.
109
+
110
+
### Run Tests
111
+
94
112
To test the backend run:
95
113
96
114
```console
@@ -133,7 +151,7 @@ Make sure you create a "revision" of your models and that you "upgrade" your dat
133
151
$ docker compose exec backend bash
134
152
```
135
153
136
-
* Alembic is already configured to import your SQLModel models from `./backend/app/models.py`.
154
+
* Alembic is already configured to import your SQLModel models from `./backend/app/models/`.
137
155
138
156
* After changing a model (for example, adding a column), inside the container, create a revision, e.g.:
0 commit comments