Skip to content

Commit badf0a7

Browse files
clean up repository and improve gitignore
1 parent 4a47dae commit badf0a7

8 files changed

Lines changed: 68 additions & 39 deletions

File tree

.gitignore

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ ENV/
88
# Ignore Python cache files
99
__pycache__/
1010
*.py[cod]
11+
*.pyo
12+
*.pyd
13+
.Python
14+
15+
# Ignore test cache
16+
.pytest_cache/
17+
.coverage
18+
htmlcov/
1119

1220
# Ignore Jupyter Notebook checkpoints
1321
.ipynb_checkpoints/
@@ -18,7 +26,6 @@ Thumbs.db
1826

1927
# Ignore log files
2028
*.log
21-
.gitignore
2229

2330
# Ignore compiled files
2431
*.o
@@ -32,8 +39,21 @@ Thumbs.db
3239
*.sublime-project
3340
*.sublime-workspace
3441

35-
# Ignore everything in data/dataset folders
36-
data/
42+
# Ignore data and model directories
3743
data/pcb_dataset/
3844
yolov5/
39-
kagglehub/
45+
kagglehub/
46+
logs/
47+
*.mar
48+
*.pt
49+
*.pth
50+
*.onnx
51+
*.tflite
52+
53+
# Ignore notebooks
54+
notebooks/
55+
56+
# Keep structure files
57+
!data/.gitkeep
58+
!models/.gitkeep
59+
!yolov5/.gitkeep

=0.1.9

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DefectNet
2-
An AI automated system for detecting defects in Printed Circuit Boards (PCBs) using YOLOv5 deep learning models, built with FastAPI.
2+
A RestFul API for automated detecting of defects in Printed Circuit Boards (PCBs) using YOLOv5 deep learning models, built with FastAPI.
33

44
## Challenge
55

data/test_coverage.png

152 KB
Loading

data/test_coverage.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
================================================= test session starts =================================================
2+
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0
3+
cachedir: .pytest_cache
4+
rootdir: /home/frost/Documents/Projects/DefectNet
5+
configfile: pytest.ini
6+
plugins: mock-3.15.1, anyio-4.11.0
7+
collected 32 items
8+
9+
tests/test_api.py::TestAPI::test_root_endpoint PASSED [ 3%]
10+
tests/test_api.py::TestAPI::test_health_endpoint PASSED [ 6%]
11+
tests/test_api.py::TestAPI::test_predict_endpoint_success PASSED [ 9%]
12+
tests/test_api.py::TestAPI::test_predict_endpoint_invalid_file PASSED [ 12%]
13+
tests/test_api.py::TestAPI::test_predict_endpoint_no_file PASSED [ 15%]
14+
tests/test_api.py::TestAPI::test_predict_batch_endpoint PASSED [ 18%]
15+
tests/test_api.py::TestAPI::test_predict_batch_too_many_files PASSED [ 21%]
16+
tests/test_api.py::TestAPI::test_info_endpoint PASSED [ 25%]
17+
tests/test_api.py::TestAPI::test_global_exception_handler PASSED [ 28%]
18+
tests/test_config.py::TestConfig::test_model_config PASSED [ 31%]
19+
tests/test_config.py::TestConfig::test_api_config PASSED [ 34%]
20+
tests/test_config.py::TestConfig::test_environment_variables PASSED [ 37%]
21+
tests/test_image_processor.py::TestImageProcessor::test_validate_image_valid PASSED [ 40%]
22+
tests/test_image_processor.py::TestImageProcessor::test_validate_image_too_large PASSED [ 43%]
23+
tests/test_image_processor.py::TestImageProcessor::test_validate_image_empty PASSED [ 46%]
24+
tests/test_image_processor.py::TestImageProcessor::test_validate_image_invalid_format PASSED [ 50%]
25+
tests/test_image_processor.py::TestImageProcessor::test_preprocess_image_rgb PASSED [ 53%]
26+
tests/test_image_processor.py::TestImageProcessor::test_preprocess_image_grayscale PASSED [ 56%]
27+
tests/test_image_processor.py::TestImageProcessor::test_get_image_info PASSED [ 59%]
28+
tests/test_image_processor.py::TestImageProcessor::test_resize_image PASSED [ 62%]
29+
tests/test_image_processor.py::TestImageProcessor::test_normalize_image PASSED [ 65%]
30+
tests/test_integration.py::TestIntegration::test_yolo_model_integration PASSED [ 68%]
31+
tests/test_integration.py::TestIntegration::test_image_processor_integration PASSED [ 71%]
32+
tests/test_integration.py::TestIntegration::test_response_formatter_integration PASSED [ 75%]
33+
tests/test_integration.py::TestIntegration::test_service_integration PASSED [ 78%]
34+
tests/test_integration.py::TestIntegration::test_error_handling_integration PASSED [ 81%]
35+
tests/test_integration.py::TestIntegration::test_configuration_integration PASSED [ 84%]
36+
tests/test_response_formatter.py::TestResponseFormatter::test_format_single_prediction_success PASSED [ 87%]
37+
tests/test_response_formatter.py::TestResponseFormatter::test_format_single_prediction_no_defects PASSED [ 90%]
38+
tests/test_response_formatter.py::TestResponseFormatter::test_format_batch_prediction PASSED [ 93%]
39+
tests/test_response_formatter.py::TestResponseFormatter::test_format_error_response PASSED [ 96%]
40+
tests/test_response_formatter.py::TestResponseFormatter::test_extract_predictions_invalid_results PASSED [100%]
41+
42+
=========================================== 32 passed, 2 warnings in 4.18s ============================================
43+

logs/config/20250209160020835-startup.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

logs/config/20250209163027656-shutdown.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

model_store/yolo_pcb.mar

-12.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)