Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Commit 82ebe03

Browse files
VianpyroVianpyro
andauthored
Add products endpoint (#11)
* Remove email and order management endpoints, schemas, and related utilities - Deleted email confirmation endpoint and its associated request schema. - Removed order management endpoint and its related data. - Eliminated email-related schemas and utilities, including email sending functions and configuration. - Cleaned up user-related schemas for login and registration. - Removed email confirmation HTML template. - Deleted utility functions for security, string manipulation, and hashing. - Cleared out related test cases for authentication, email, and utility functions. * Refactor API structure and remove deprecated routes - I have no idea if anything works - Deleted unused model and route files from app/models and app/routes. - Removed home route and associated test cases. - Cleaned up version 1 and version 2 API routes, including endpoints for products and categories. - Introduced new service layer for product operations with pagination support. - Updated database utility functions for asynchronous SQLAlchemy sessions. - Enhanced configuration management with Pydantic settings. - Added new schemas for product listing and pagination. - Implemented error handling in product retrieval endpoints. * Refactor product endpoint imports for clarity * Refactor product endpoint for improved debugging and error handling; add launch configuration for FastAPI * Bump Python version to 3.12.11 in workflows and pyproject.toml * Fix regex parameter in language dependency for i18n * Update workflow to ensure fail-fast strategy is disabled for unit tests * Refactor unit test workflow to disable fail-fast strategy; update config for DEBUG environment variable handling * Update unit test workflow to ensure fail-fast strategy is disabled * Refactor get_products endpoint to remove debug print statements and improve error handling * Implement create_product endpoint with validation and error handling --------- Co-authored-by: Vianpyro <[email protected]>
1 parent 254cf9c commit 82ebe03

Some content is hidden

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

95 files changed

+906
-252
lines changed

.github/workflows/package-python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Python
5757
uses: actions/setup-python@v5
5858
with:
59-
python-version: '3.12.10'
59+
python-version: '3.12.11'
6060

6161
- name: Install build dependencies
6262
run: pip install --user build

.github/workflows/run-unit-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020

2121
strategy:
22+
fail-fast: false
2223
matrix:
2324
os: [ubuntu-latest, macos-latest, windows-latest]
24-
python-version: ['3.12.10', '3.x']
25+
python-version: ['3.12.11', '3.x']
2526

2627
steps:
2728
- name: Checkout code

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: FastAPI",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"module": "uvicorn",
12+
"args": [
13+
"app.main:app",
14+
"--reload"
15+
],
16+
"jinja": true
17+
}
18+
]
19+
}

.vscode/settings.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,27 @@
1111
"**/*.egg-info": true
1212
},
1313
"[python]": {
14-
"editor.rulers": [80],
14+
"editor.rulers": [
15+
80
16+
],
1517
"editor.defaultFormatter": "ms-python.black-formatter",
1618
"editor.codeActionsOnSave": {
17-
"source.organizeImports": "always"
19+
"source.organizeImports": "always",
20+
"source.unusedImports": "always"
1821
}
1922
},
20-
"isort.args": ["--profile", "black"],
23+
"isort.args": [
24+
"--profile",
25+
"black"
26+
],
2127
"triggerTaskOnSave.tasks": {
22-
"Run file tests": ["tests/**/test_*.py"],
23-
"Run all tests": ["app/**/*.py", "!tests/**"]
28+
// "Run file tests": [
29+
// "tests/**/test_*.py"
30+
// ],
31+
// "Run all tests": [
32+
// "app/**/*.py",
33+
// "!tests/**"
34+
// ]
2435
},
2536
"python.testing.unittestEnabled": false,
2637
"python.testing.pytestEnabled": true

app/api/models/category.py

Whitespace-only changes.

app/api/models/contact.py

Whitespace-only changes.

0 commit comments

Comments
 (0)