Repository: tyvekzhang/fastapi-sqlmodel-starter (language: python)

Issue:
添加pyproject.tom和pre-commit文件
### What would you like to be added(你想添加什么功能)?

添加pyproject.tom和pre-commit文件

### Requirement reference(功能、界面参考的文档或链接)?

1. https://github.com/tox-dev/tox/tree/main
2. https://github.com/psf/requests/tree/main
3. https://github.com/pytest-dev/pytest

### Acceptance Criteria(验收标准)

1. 能够安装fastapi依赖
2. 能够执行pre-commit
3. py-test测试通过
doc: Optimize template files
<!--
Thanks for sending a pull request!
If this is your first time, please read our contributor guidelines: https://github.com/tyvekzhang/fastapi-sqlmodel-starter/blob/main/.github/CONTRIBUTING.md
Before submitting your pull request, please make sure the checklist below is confirmed.
Your pull requests will be merged after one of the collaborators approve.
-->

### 🤔What type of PR is this?
doc

### 🔗 Related issue link
Fixes #

### 💡 Background and solution
```release-note

```

### 📝 Changelog

<!--
Describe changes from the user side, and list all potential break changes or other risks.
--->

| Language   | Changelog |
| ---------- | --------- |
| 🇺🇸 English |           |
| 🇨🇳 Chinese |           |


Discussion / hints:

Fix patch:
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1875e9c..2cd7047 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -46,4 +46,4 @@ When you've found an issue to work on, you can assign it to yourself.
 - Submit PR: Click "Create pull request" to finalize.
 
 ## Meetups
-Please inquire the author for more details about the meetups.
\ No newline at end of file
+Please inquire the author for more details about the meetups.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 494198d..69a534c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -41,4 +41,3 @@ Enter your extended release note in the block below. If the PR requires addition
 ```release-note
 
 ```
-
diff --git a/.github/SECURITY.md b/.github/SECURITY.md
index 5450cee..17592e2 100644
--- a/.github/SECURITY.md
+++ b/.github/SECURITY.md
@@ -37,5 +37,5 @@ We prefer to fully disclose the bug as soon as possible once a user mitigation i
 to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested,
 or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known)
 to a few weeks. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date
-to be on the order of 7 days. The Fastapi sqlmodel starter Security Response Committee holds the final say when 
+to be on the order of 7 days. The Fastapi sqlmodel starter Security Response Committee holds the final say when
 setting a disclosure date.
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index e5ffd07..edbfef3 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -54,4 +54,3 @@ jobs:
       - name: Test with pytest
         run: |
           echo "This is part one of ci.yml, will update soon!"
-
diff --git a/.gitignore b/.gitignore
index b933f61..dd9c90f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 .idea/
 *.lock
 .tox/
+/fss/common/version.py
+/.ruff_cache/
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e69de29..391a76c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,42 @@
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.5.0
+    hooks:
+      - id: end-of-file-fixer
+      - id: trailing-whitespace
+  - repo: https://github.com/python-jsonschema/check-jsonschema
+    rev: 0.28.0
+    hooks:
+      - id: check-github-workflows
+        args: [ "--verbose" ]
+  - repo: https://github.com/codespell-project/codespell
+    rev: v2.2.6
+    hooks:
+      - id: codespell
+        additional_dependencies: ["tomli>=2.0.1"]
+  - repo: https://github.com/astral-sh/ruff-pre-commit
+    rev: "v0.3.4"
+    hooks:
+      - id: ruff-format
+      - id: ruff
+        args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
+  - repo: https://github.com/asottile/blacken-docs
+    rev: 1.16.0
+    hooks:
+      - id: blacken-docs
+        additional_dependencies: [black==23.12.1]
+  - repo: meta
+    hooks:
+      - id: check-hooks-apply
+      - id: check-useless-excludes
+  - repo: https://github.com/tox-dev/pyproject-fmt
+    rev: "1.7.0"
+    hooks:
+      - id: pyproject-fmt
+        additional_dependencies: ["tox>=4.12.1"]
+  - repo: https://github.com/python-poetry/poetry
+    rev: "1.8.2"
+    hooks:
+    -   id: poetry-export
+        args: ["-f", "requirements.txt"]
+        verbose: true
diff --git a/README.md b/README.md
index de2e7be..24d9e26 100644
--- a/README.md
+++ b/README.md
@@ -35,4 +35,4 @@ FastapiSqlmodelStarter 采用 [MIT 许可证](https://opensource.org/licenses/MI
 - 邮件列表：[tyvekzhang@gmail.com](mailto:tyvekzhang@gmail.com)
 
 
-希望 FastapiSqlmodelStarter 能为你的 Python Web 开发之旅提供便利和愉悦的体验！
\ No newline at end of file
+希望 FastapiSqlmodelStarter 能为你的 Python Web 开发之旅提供便利和愉悦的体验！
diff --git a/docs/POPULARIZE.md b/docs/POPULARIZE.md
index 8bf9fb0..a7505cd 100644
--- a/docs/POPULARIZE.md
+++ b/docs/POPULARIZE.md
@@ -5,4 +5,4 @@
 | 3-勇敢的冒险家 | 你已经积累了一些经验,保持热情!         | 6 - 100    |  |
 | 4-代码魔法师 | 你已经掌握了不少技巧,向更高的境界进发!     | 101 - 500  |  |
 | 5-技术大师 | 你已经成为了一名资深的技术大师,继续精进自己吧! | 501 - 1000 |  |
-| 6-传奇 | 你已经步入了冒险的顶峰,成为了无与伦比的传奇!  | 1000+      |  |
\ No newline at end of file
+| 6-传奇 | 你已经步入了冒险的顶峰,成为了无与伦比的传奇!  | 1000+      |  |
diff --git a/docs/POPULARIZE_en.md b/docs/POPULARIZE_en.md
index 32cd38a..43f8a0d 100644
--- a/docs/POPULARIZE_en.md
+++ b/docs/POPULARIZE_en.md
@@ -5,4 +5,4 @@
 | 3-Brave Adventurer | You've gained some experience, keep the passion! | 6 - 100 |  |
 | 4-Code Magician | You've mastered some techniques, move towards higher realms! | 101 - 500 |  |
 | 5-Tech Master | You've become a seasoned tech master, continue to improve yourself! | 501 - 1000 |  |
-| 6-Legend | You've reached the peak of the adventure, become an unparalleled legend! | 1000+ |  |
\ No newline at end of file
+| 6-Legend | You've reached the peak of the adventure, become an unparalleled legend! | 1000+ |  |
diff --git a/docs/README_en.md b/docs/README_en.md
index 74df99e..062a1c5 100644
--- a/docs/README_en.md
+++ b/docs/README_en.md
@@ -34,4 +34,4 @@ FastapiSqlmodelStarter is open-sourced under the [MIT License](https://opensourc
 - GitHub repository: [https://github.com/tyvekzhang/fastapi-sqlmodel-starter](https://github.com/tyvekzhang/fastapi-sqlmodel-starter)
 - Mailing list: [tyvekzhang@gmail.com](mailto:tyvekzhang@gmail.com)
 
-We hope that FastapiSqlmodelStarter will provide convenience and a delightful experience on your journey of Python Web development!
\ No newline at end of file
+We hope that FastapiSqlmodelStarter will provide convenience and a delightful experience on your journey of Python Web development!
diff --git a/app/__init__.py b/fss/__init__.py
similarity index 100%
rename from app/__init__.py
rename to fss/__init__.py
diff --git a/app/common/__init__.py b/fss/common/__init__.py
similarity index 100%
rename from app/common/__init__.py
rename to fss/common/__init__.py
diff --git a/app/middleware/__init__.py b/fss/middleware/__init__.py
similarity index 100%
rename from app/middleware/__init__.py
rename to fss/middleware/__init__.py
diff --git a/app/starter/__init__.py b/fss/starter/__init__.py
similarity index 100%
rename from app/starter/__init__.py
rename to fss/starter/__init__.py
diff --git a/app/starter/fsserver.py b/fss/starter/fsserver.py
similarity index 100%
rename from app/starter/fsserver.py
rename to fss/starter/fsserver.py
diff --git a/app/starter/modules/__init__.py b/fss/starter/modules/__init__.py
similarity index 100%
rename from app/starter/modules/__init__.py
rename to fss/starter/modules/__init__.py
diff --git a/app/starter/modules/system/__init__.py b/fss/starter/modules/system/__init__.py
similarity index 100%
rename from app/starter/modules/system/__init__.py
rename to fss/starter/modules/system/__init__.py
diff --git a/app/starter/modules/system/api/__init__.py b/fss/starter/modules/system/api/__init__.py
similarity index 100%
rename from app/starter/modules/system/api/__init__.py
rename to fss/starter/modules/system/api/__init__.py
diff --git a/app/starter/modules/system/enum/__init__.py b/fss/starter/modules/system/enum/__init__.py
similarity index 100%
rename from app/starter/modules/system/enum/__init__.py
rename to fss/starter/modules/system/enum/__init__.py
diff --git a/app/starter/modules/system/mapper/__init__.py b/fss/starter/modules/system/mapper/__init__.py
similarity index 100%
rename from app/starter/modules/system/mapper/__init__.py
rename to fss/starter/modules/system/mapper/__init__.py
diff --git a/app/starter/modules/system/model/__init__.py b/fss/starter/modules/system/model/__init__.py
similarity index 100%
rename from app/starter/modules/system/model/__init__.py
rename to fss/starter/modules/system/model/__init__.py
diff --git a/app/starter/modules/system/router/__init__.py b/fss/starter/modules/system/router/__init__.py
similarity index 100%
rename from app/starter/modules/system/router/__init__.py
rename to fss/starter/modules/system/router/__init__.py
diff --git a/app/starter/modules/system/schema/__init__.py b/fss/starter/modules/system/schema/__init__.py
similarity index 100%
rename from app/starter/modules/system/schema/__init__.py
rename to fss/starter/modules/system/schema/__init__.py
diff --git a/app/starter/modules/system/service/__init__.py b/fss/starter/modules/system/service/__init__.py
similarity index 100%
rename from app/starter/modules/system/service/__init__.py
rename to fss/starter/modules/system/service/__init__.py
diff --git a/pyproject.toml b/pyproject.toml
index e69de29..f69d8c8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -0,0 +1,56 @@
+[build-system]
+build-backend = "poetry.core.masonry.api"
+requires = [
+  "poetry-core",
+]
+
+[tool.poetry]
+name = "fastapi-sqlmodel-starter"
+version = "0.1.0"
+description = "FastapiSqlmodelStarter aims to be a compact and beautiful tool for building Python Web applications."
+license = "MIT"
+authors = [
+  "tyvekZhang <tyvekzhang@gmail.com>",
+]
+maintainers = [
+  "tyvekZhang <tyvekzhang@gmail.com>",
+]
+readme = "README.md"
+homepage = "https://github.com/tyvekzhang/fastapi-sqlmodel-starter"
+repository = "https://github.com/tyvekzhang/fastapi-sqlmodel-starter"
+documentation = "https://github.com/tyvekzhang/fastapi-sqlmodel-starter/wiki"
+keywords = ["fastapi", "sqlmodel", "tools", "web"]
+classifiers = [
+  "Development Status :: 4 - Beta",
+  "Programming Language :: Python",
+  "Programming Language :: Python :: 3 :: Only",
+  "Programming Language :: Python :: 3.7",
+  "Programming Language :: Python :: 3.8",
+  "Programming Language :: Python :: 3.9",
+  "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
+  "Programming Language :: Python :: Implementation :: CPython",
+  "Programming Language :: Python :: Implementation :: PyPy",
+  "Topic :: Software Development :: Python Web Tools"
+]
+packages = [
+  { include = "fss"},
+  { include = "tests"},
+  { include = ".env.example"},
+]
+
+[tool.poetry.dependencies]
+python = "^3.7"
+
+[tool.poetry.group.test.dependencies]
+pytest = "*"
+
+[tool.poetry.group.docs.dependencies]
+mkdocs = "*"
+
+[tool.poetry.scripts]
+[[tool.poetry.source]]
+name = "tsinghua"
+url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/"
+priority = "default"


Test patch:
diff --git a/.github/ISSUE_TEMPLATE/failing-test.yaml b/.github/ISSUE_TEMPLATE/failing-test.yaml
index 77ff9d8..08d365c 100644
--- a/.github/ISSUE_TEMPLATE/failing-test.yaml
+++ b/.github/ISSUE_TEMPLATE/failing-test.yaml
@@ -39,4 +39,3 @@ body:
     id: additional
     attributes:
       label: Anything else we need to know?
-
diff --git a/.github/ISSUE_TEMPLATE/flaking-test.yaml b/.github/ISSUE_TEMPLATE/flaking-test.yaml
index 7f0b615..270310d 100644
--- a/.github/ISSUE_TEMPLATE/flaking-test.yaml
+++ b/.github/ISSUE_TEMPLATE/flaking-test.yaml
@@ -39,4 +39,3 @@ body:
     id: additional
     attributes:
       label: Anything else we need to know?
-