Skip to content

Commit d6d7321

Browse files
authored
Upgrade dependencies and ci (#10)
* Upgrade dependencies and ci * update lock * add docs * fix pre-commit * fix dependencies * update ci
1 parent b8b6e91 commit d6d7321

20 files changed

+336
-396
lines changed

.github/workflows/changelog.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release changelog
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
changelog:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
ref: master
16+
17+
- uses: rhysd/changelog-from-release/action@v3
18+
with:
19+
file: docs/changelog.md
20+
pull_request: true
21+
github_token: ${{ secrets.GH_TOKEN }}

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
tags:
8-
- '**'
97
pull_request:
108

119
jobs:
@@ -17,10 +15,10 @@ jobs:
1715
python-version: [ '3.10', '3.11', '3.12' ]
1816
fail-fast: false
1917
steps:
20-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2119

2220
- name: Setup PDM
23-
uses: pdm-project/setup-pdm@v3
21+
uses: pdm-project/setup-pdm@v4
2422
with:
2523
python-version: ${{ matrix.python-version }}
2624

.github/workflows/docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
if: github.event.repository.fork == false
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Configure Git Credentials
16+
run: |
17+
git config user.name github-actions[bot]
18+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.x
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
23+
- uses: actions/cache@v4
24+
with:
25+
key: mkdocs-material-${{ env.cache_id }}
26+
path: .cache
27+
restore-keys: |
28+
mkdocs-material-
29+
- run: sudo apt-get install pngquant
30+
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material.git
31+
- run: mkdocs gh-deploy --force
32+
env:
33+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: end-of-file-fixer
6-
- id: check-yaml
76
- id: check-toml
87

98
- repo: https://github.com/charliermarsh/ruff-pre-commit
10-
rev: v0.5.0
9+
rev: v0.9.9
1110
hooks:
1211
- id: ruff
1312
args:
1413
- '--fix'
14+
- '--unsafe-fixes'
1515
- id: ruff-format
1616

1717
- repo: https://github.com/pdm-project/pdm
18-
rev: 2.16.1
18+
rev: 2.22.3
1919
hooks:
2020
- id: pdm-lock-check

README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
# fastapi_oauth20
1+
# FastAPI OAuth 2.0
22

33
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/fastapi-practices/fastapi_oauth20/ci.yml?logo=github)
44
[![GitHub](https://img.shields.io/github/license/wu-clan/httpfpt)](https://github.com/wu-clan/httpfpt/blob/master/LICENSE)
5-
![Static Badge](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)
5+
![Static Badge](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)
66
![GitHub release (with filter)](https://img.shields.io/github/v/release/fastapi-practices/fastapi_oauth20)
77
[![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)
88

9-
在 FastAPI 中异步授权 OAuth2 客户端
9+
在 FastAPI 中异步授权 OAuth 2.0 客户端
1010

1111
我们的目标是集成多个 CN 第三方客户端,敬请期待(🐦)...
12-
13-
#### TODO:
14-
15-
如果我们能够很容易获取测试客户端,或许这会很快
16-
17-
- [ ] tests
18-
- [x] [Google](https://developers.google.cn/identity/protocols/oauth2/javascript-implicit-flow?hl=en)
19-
- [ ] 微信
20-
- [ ] QQ
21-
- [ ] 抖音
22-
- [x] [飞书](https://open.feishu.cn/document/common-capabilities/sso/web-application-sso/web-app-overview)
23-
- [ ] 钉钉
24-
- [ ] 微博
25-
- [ ] 百度
26-
- [x] [Gitee](https://gitee.com/api/v5/oauth_doc#/)
27-
- [x] [Github](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
28-
- [X] [开源中国](https://www.oschina.net/openapi)
29-
- [ ] 阿里云
30-
- [ ] [Linux Do](https://connect.linux.do/)

docs/advanced.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO...

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO...

docs/explanation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO...

docs/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div align="center">
2+
<h1>🔐</h1>
3+
</div>
4+
5+
---
6+
7+
**Documentation
8+
**: <a href="https://fastapi-practices.github.io/fastapi-oauth20" target="_blank">https://fastapi-practices.github.io/fastapi-oauth20</a>
9+
10+
**Source Code
11+
**: <a href="https://github.com/fastapi-practices/fastapi-oauth20" target="_blank">https://github.com/fastapi-practices/fastapi-oauth20</a>
12+
13+
---
14+
15+
在 FastAPI 中异步授权 OAuth 2.0 客户端
16+
17+
我们的目标是集成多个 CN 第三方客户端,敬请期待(🐦)...
18+
19+
你可以在 [集成状态](integration.md) 获取当前集成情况
20+
21+
## 互动
22+
23+
[TG / Discord](https://wu-clan.github.io/homepage/)
24+
25+
## 赞助
26+
27+
如果此项目能够帮助到你,你可以赞助作者一些咖啡豆表示鼓励:[Sponsor](https://wu-clan.github.io/sponsor/)

docs/install.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## 依赖
2+
3+
在安装 fastapi-oauth20 之前,请确保您满足以下先决条件:
4+
5+
- **Python** 版本 >= 3.10
6+
- **FastAPI** 版本 >= 0.100.0
7+
8+
## 安装
9+
10+
=== ":simple-piped: pip"
11+
12+
```sh
13+
pip install fastapi-oauth20
14+
```
15+
16+
=== ":simple-pdm: pdm"
17+
18+
```sh
19+
pdm add fastapi-oauth20
20+
```
21+
22+
=== ":simple-uv: uv"
23+
24+
```sh
25+
uv add fastapi-oauth20
26+
```

0 commit comments

Comments
 (0)