diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e6b88822 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + name: lint ${{ matrix.python-version }} + strategy: + matrix: + python-version: [ '3.10', '3.11', '3.12' ] + fail-fast: false + steps: + - uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: pre-commit + uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files --verbose diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bcfce2a..1ae579bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: check-yaml - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.8 + rev: v0.1.15 hooks: - id: ruff args: diff --git a/README.md b/README.md index 4272c4a5..6c03e2fb 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![GitHub](https://img.shields.io/github/license/fastapi-practices/fastapi_best_architecture)](https://github.com/fastapi-practices/fastapi_best_architecture/blob/master/LICENSE) [![Static Badge](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) > [!CAUTION] > **For 2023-12-21 (announcement)** @@ -25,11 +26,14 @@ library open to any person or enterprise can be used for free! ## Pseudo three-tier architecture -The mvc architecture is a common design pattern in python web, but the three-tier architecture is even more fascinating. +The mvc architecture is a common design pattern in python web, but the three-tier architecture is even more fascinating In python web development, there is no common standard for the concept of three-tier architecture, so we'll call it a pseudo three-tier architecture here +But please note that we don't have a traditional multi-app structure (django, springBoot...) If you don't like this +pattern, use templates to transform it to your heart's content! + | workflow | java | fastapi_best_architecture | |----------------|----------------|---------------------------| | view | controller | api | @@ -221,11 +225,8 @@ Execute unittests via pytest ## Interactivity -We only have one current channel. - -| [Jump](https://t.me/+ZlPhIFkPp7E4NGI1) | -|----------------------------------------| -| Telegram | +- [Telegram](https://t.me/+ZlPhIFkPp7E4NGI1) +- [QQ](https://pd.qq.com/s/8rwhzt4ox) ## Sponsor us diff --git a/README.zh-CN.md b/README.zh-CN.md index 516abbc5..b87a3e08 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -2,6 +2,7 @@ [![GitHub](https://img.shields.io/github/license/fastapi-practices/fastapi_best_architecture)](https://github.com/fastapi-practices/fastapi_best_architecture/blob/master/LICENSE) [![Static Badge](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) > [!CAUTION] > **2023-12-21 (公告)** @@ -25,6 +26,8 @@ mvc 架构作为常规设计模式,在 python web 中也很常见,但是三 在 python web 开发中,三层架构的概念并没有通用标准,所以这里我们称之为伪三层架构 +但请注意,我们并没有传统的多应用程序结构(django、springBoot...),如果您不喜欢这种模式,可以使用模板对其进行随意改造! + | 工作流程 | java | fastapi_best_architecture | |------|----------------|---------------------------| | 视图 | controller | api | @@ -215,11 +218,8 @@ mvc 架构作为常规设计模式,在 python web 中也很常见,但是三 ## 互动 -有且仅有当前一个频道,请注意辨别真伪 - -| [直链跳转](https://t.me/+ZlPhIFkPp7E4NGI1) | -|----------------------------------------| -| Telegram(科学上网) | +- [Telegram](https://t.me/+ZlPhIFkPp7E4NGI1) +- [QQ](https://pd.qq.com/s/8rwhzt4ox) ## 赞助我们