Skip to content

Conversation

@bnbong
Copy link
Owner

@bnbong bnbong commented Jul 8, 2025

Requesting Merging

Description

  • Refactored major codes (especially /backend sources)
  • Add template inspection schedule workflow
  • Add contribution guides content via adding template inspection script

Type of Change

  • BUG FIX
  • ADDING NEW FEATURES
  • FEATURE UPDATE
  • HOTFIX
  • DELETING UNNECESSARY FEATURES
  • DOCUMENTATION & DEVOPS
  • Etc..

Test Environment

local (MacOS), coverage

coverage report
================================ tests coverage ================================
_______________ coverage: platform darwin, python 3.12.4-final-0 _______________

Name                                        Stmts   Miss   Cover   Missing
--------------------------------------------------------------------------
src/fastapi_fastkit/__init__.py                 6      0 100.00%
src/fastapi_fastkit/backend/__init__.py         0      0 100.00%
src/fastapi_fastkit/backend/inspector.py      138     24  82.61%   170-174, 181-182, 191, 204-205, 210-218, 248-250, 253-254
src/fastapi_fastkit/backend/main.py           290     98  66.21%   87-91, 100-103, 133-143, 174-177, 193, 216-218, 229, 244-246, 275-278, 291-297, 301-303, 307, 332-341, 358, 371-377, 409-410, 413, 431-433, 456, 467, 470, 490, 497-498, 535-536, 551-589, 624-634
src/fastapi_fastkit/backend/transducer.py      78      4  94.87%   131, 140-144
src/fastapi_fastkit/cli.py                    280     84  70.00%   78-82, 129-130, 140-141, 246-247, 269-273, 356-357, 365-366, 402-408, 430-431, 435-436, 440-441, 447-450, 480-483, 506-507, 514-515, 521-524, 584-668
src/fastapi_fastkit/core/__init__.py            0      0 100.00%
src/fastapi_fastkit/core/exceptions.py          6      0 100.00%
src/fastapi_fastkit/core/settings.py           57     11  80.70%   88, 90-92, 109-116, 141, 146, 152
src/fastapi_fastkit/utils/__init__.py           0      0 100.00%
src/fastapi_fastkit/utils/logging.py           84     13  84.52%   36-40, 68, 77-79, 85-86, 93-94, 181-183
src/fastapi_fastkit/utils/main.py              70     10  85.71%   51-52, 155, 157-160, 173, 179-180
--------------------------------------------------------------------------
TOTAL                                        1009    244  75.82%
Required test coverage of 70% reached. Total coverage: 75.82%
======================== 109 passed in 96.42s (0:01:36) ========================

Major Changes

Same as mentioned at Description

Screenshots (optional)

Etc

@bnbong bnbong self-assigned this Jul 8, 2025
@bnbong bnbong added documentation Improvements or additions to documentation enhancement New feature or request chore Improvements or additions to non-code features labels Jul 8, 2025
@github-actions github-actions bot added the template Add or editing a FastAPI template label Jul 8, 2025
@bnbong bnbong removed the template Add or editing a FastAPI template label Jul 8, 2025
@bnbong bnbong requested a review from Copilot July 8, 2025 07:43
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors internal logging and template processing code, adds a weekly template inspection workflow (with local script, Makefile targets, and GitHub Actions), and expands documentation and contributing guides.

  • Core code refactoring: replaced direct logger calls with a centralized debug_log, introduced helper functions in transducer and inspector.
  • Template inspection automation: added scripts/inspect-templates.py, new Makefile targets, and a GitHub Actions workflow for weekly inspections.
  • Tests and documentation: standardized test fixtures and typings, updated docs (mkdocs, template-quality-assurance guide, README/index), and added contributing content.

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_utils.py Updated module header comment
tests/test_templates/test_fastapi-dockerized.py Added typing annotations and fixture return types
tests/test_templates/test_fastapi-default.py Added typing annotations and fixture return types
tests/test_templates/test_fastapi-customized-response.py Added typing annotations and fixture return types
tests/test_templates/test_fastapi-async-crud.py Added typing annotations and fixture return types
tests/test_core.py Updated module header comment
tests/test_cli_operations/test_cli_extended.py Enhanced filesystem isolation in loop; renamed inspect function
tests/test_backends/test_transducer.py Extended tests for new helper functions in transducer
tests/test_backends/test_main.py Updated module header comment
tests/test_backends/test_inspector.py Renamed inspection entrypoint; adjusted report keys; added tests
src/fastapi_fastkit/utils/main.py Switched to debug_log for error/exception logging
src/fastapi_fastkit/utils/logging.py Added logger caching, debug_log, and cache management
src/fastapi_fastkit/cli.py Removed stray blank import
src/fastapi_fastkit/backend/transducer.py Broke out helper functions; unified logging with debug_log
src/fastapi_fastkit/backend/main.py Refactored metadata injection, venv/dependency management, router
src/fastapi_fastkit/backend/inspector.py Converted to context manager; centralized logging with debug_log
scripts/inspect-templates.py New local template inspection script
mkdocs.yml Added Template Quality Assurance section to navigation
docs/reference/template-quality-assurance.md New documentation for template QA workflow
docs/index.md Updated features list, docs/contributing links
README.md Updated features list, docs/contributing links
Makefile Added inspect-templates* and inspect-template targets
.github/workflows/template-inspection.yml New weekly GitHub Actions workflow for template inspection
Comments suppressed due to low confidence (1)

tests/test_cli_operations/test_cli_extended.py:163

  • The test uses self.runner without importing or defining CliRunner. Add from click.testing import CliRunner at the top and define a runner: CliRunner = CliRunner() attribute in the test class.
        for template in templates_to_test:

@bnbong bnbong merged commit 4456977 into main Jul 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements or additions to non-code features documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants