Skip to content

Conversation

@bnbong
Copy link
Owner

@bnbong bnbong commented Sep 5, 2025

Requesting Merging

Description

  • add a feature of fastkit init, fastkit startdemo command to define to make a new project folder at current working directory
  • add setuptools package at fastapi-empty template's dependency list.
  • add a feature of fastkit addroutecommand to recognize current working project (with cmd option .).
  • add logic diagram of fastkit, apply it at CONTRIBUTING.md

Type of Change

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

Test Environment

local, MacOS Apple Silicon

Major Changes

Same as above.

Screenshots (optional)

Etc

close #13

@bnbong bnbong requested a review from Copilot September 5, 2025 07:01
@bnbong bnbong self-assigned this Sep 5, 2025
@bnbong bnbong added documentation Improvements or additions to documentation enhancement New feature or request fix Fix or improve source codes dependencies Pull requests that update a dependency file python Pull requests that update python code labels Sep 5, 2025
@github-actions github-actions bot added the template Add or editing a FastAPI template label Sep 5, 2025
@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fastapi_fastkit/cli.py 87.50% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

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 release version 1.1.2 adds enhanced project creation flexibility by allowing users to choose between creating new project folders or deploying directly to the current directory, improves command-line interface for route management, and includes several bug fixes and dependency updates.

  • Enhanced fastkit init and fastkit startdemo commands with optional project folder creation
  • Updated fastkit addroute command to support current directory operations and improved parameter ordering
  • Added setuptools dependency to fastapi-empty template and updated test coverage

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/fastapi_fastkit/init.py Version bump to 1.1.2
src/fastapi_fastkit/cli.py Enhanced CLI commands with folder creation options and improved addroute functionality
src/fastapi_fastkit/backend/main.py Added new functions for project folder creation and template deployment
src/fastapi_fastkit/fastapi_project_template/fastapi-empty/requirements.txt-tpl Added setuptools dependency
tests/ Updated test cases to handle new confirmation prompts and command parameter changes
CHANGELOG.md Added release notes for version 1.1.2
CONTRIBUTING.md Added architecture diagram reference
.pre-commit-config.yaml Removed check-added-large-files hook

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 472 to +473
@click.argument("route_name")
@click.argument("project_dir", default=".")
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The project_dir argument should use click.argument with required=False instead of default='.'. Using default with click.argument is not the standard pattern; consider using @click.option instead or handle the default value logic in the function body.

Copilot uses AI. Check for mistakes.
# when
result = self.runner.invoke(
fastkit_cli, ["addroute", project_name, route_name], input="Y"
fastkit_cli, ["addroute", route_name, project_name], input="Y"
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The test is still using the old parameter order (route_name, project_name) but the CLI function now expects (route_name, project_dir). This will cause the test to fail because it's passing arguments in the wrong order according to the updated CLI signature.

Copilot uses AI. Check for mistakes.
# when
result = self.runner.invoke(
fastkit_cli, ["addroute", project_name, route_name], input="N"
fastkit_cli, ["addroute", route_name, project_name], input="N"
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Same parameter order issue as the previous test - should be (route_name, project_dir) to match the updated CLI signature.

Suggested change
fastkit_cli, ["addroute", route_name, project_name], input="N"
fastkit_cli, ["addroute", route_name, str(project_path)], input="N"

Copilot uses AI. Check for mistakes.
# addroute command requires route_name and project_dir as arguments
result = self.runner.invoke(
fastkit_cli, ["addroute", project_name, "test_route"], input="Y"
fastkit_cli, ["addroute", "test_route", project_name], input="Y"
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

These test calls are using project_name as the second argument, but according to the updated CLI signature, the second argument should be project_dir. The tests should be consistent with the new parameter order (route_name, project_dir).

Copilot uses AI. Check for mistakes.
# when
result = self.runner.invoke(
fastkit_cli, ["addroute", project_name, "test_route"], input="Y"
fastkit_cli, ["addroute", "test_route", project_name], input="Y"
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

These test calls are using project_name as the second argument, but according to the updated CLI signature, the second argument should be project_dir. The tests should be consistent with the new parameter order (route_name, project_dir).

Copilot uses AI. Check for mistakes.
# addroute command requires route_name and project_dir as arguments
result = self.runner.invoke(
fastkit_cli, ["addroute", project_name, "test_route"], input="N"
fastkit_cli, ["addroute", "test_route", project_name], input="N"
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

These test calls are using project_name as the second argument, but according to the updated CLI signature, the second argument should be project_dir. The tests should be consistent with the new parameter order (route_name, project_dir).

Suggested change
fastkit_cli, ["addroute", "test_route", project_name], input="N"
fastkit_cli, ["addroute", "test_route", str(project_path)], input="N"

Copilot uses AI. Check for mistakes.
@bnbong bnbong merged commit f3d4e9f into main Sep 5, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request fix Fix or improve source codes python Pull requests that update python code template Add or editing a FastAPI template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust fastkit addroute command

2 participants