diff --git a/.env b/.env deleted file mode 100644 index b68d0f0..0000000 --- a/.env +++ /dev/null @@ -1,11 +0,0 @@ -# 数据库配置文件 -ENV_NAME=Local # MySQL 数据库名称 -MYSQL_DB=score # MySQL 数据库名称 -MYSQL_USER=root # MySQL 数据库登录帐号 -MYSQL_PASSWD=king # MySQL 数据库登陆密码,由于格式化路径的问题,请勿使用 `@` 符号 -MYSQL_HOST=127.0.0.1 # MySQL 数据库地址,此处需要替换为服务器的地址 -MYSQL_POST=3306 # MySQL 端口 -# openssl rand -hex 32 命令来生产该随机 secret_key -SECRET_KEY=dc393487a84ddf9da61fe0180ef295cf0642ecbc5d678a1589ef2e26b35fce9c -ALGORITHM=HS256 -ACCESS_TOKEN_EXPIRE_MINUTES=30 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eac4707..c3d8159 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: - develop pull_request: branches: - - master + - main - develop jobs: @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.11"] + python-version: ["3.12"] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/release_and_deploy.yml b/.github/workflows/release_and_deploy.yml index 275251d..a404824 100644 --- a/.github/workflows/release_and_deploy.yml +++ b/.github/workflows/release_and_deploy.yml @@ -2,8 +2,8 @@ name: release and deploy on: push: - branchs: - - master + branches: + - main tags: - 'v*.*.*' @@ -12,30 +12,30 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.11"] + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ "3.12" ] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pip install pytest - pytest + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pip install pytest + pytest deploy: needs: build diff --git a/.gitignore b/.gitignore index 0d64f5a..45b76be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,10 @@ *.bak - *.pyc - *.xml - *.tar.gz - *.iml - *.zip - *.icls - /_windows/ /codestyles/ @@ -24,6 +17,7 @@ colors # IDE .idea/ +.env # jupyter .ipynb_checkpoints diff --git a/README.md b/README.md index 3755791..59d9694 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![PyPI](https://img.shields.io/pypi/v/aktools.svg)](https://pypi.org/project/aktools/) [![Downloads](https://pepy.tech/badge/aktools)](https://pepy.tech/project/aktools) [![Documentation Status](https://readthedocs.org/projects/aktools/badge/)](https://aktools.akfamily.xyz/) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![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) [![aktools](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/aktools) [![Actions Status](https://github.com/akfamily/aktools/workflows/build/badge.svg)](https://github.com/akfamily/aktools/actions) [![MIT Licence](https://img.shields.io/badge/license-MIT-blue)](https://github.com/akfamily/aktools/blob/master/LICENSE) diff --git a/alembic/env.py b/alembic/env.py index 6626bfd..b94eac5 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -23,7 +23,7 @@ # other values from the config, defined by the needs of env.py, # can be acquired: # my_important_option = config.get_main_option("my_important_option") -# ... etc. +# ... etc def run_migrations_offline() -> None: diff --git a/docs/index.md b/docs/index.md index faf0196..64c2268 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ AKTools is a package of HTTP API for AKShare! It depends on AKShare, FastAPI and
```console -$ pip install aktools # AKTools's version should great than 0.0.80 +$ pip install aktools # AKTools's version should great than 0.0.86 ---> 100% Successfully installed aktools ``` @@ -25,7 +25,7 @@ Successfully installed aktools
```console -$ pip install aktools --upgrade -i https://pypi.org/simple # AKTools's version should great than 0.0.80 +$ pip install aktools --upgrade -i https://pypi.org/simple # AKTools's version should great than 0.0.86 ---> 100% Successfully upgraded aktools ``` diff --git a/mkdocs.yml b/mkdocs.yml index 2969ef6..03dfd08 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,12 +9,10 @@ theme: features: - content.code.annotate palette: - # Palette toggle for light mode - scheme: default toggle: icon: material/brightness-7 name: Switch to dark mode - # Palette toggle for dark mode - scheme: slate toggle: icon: material/brightness-4 diff --git a/tests/test_cli.py b/tests/test_cli.py index a805b2d..e8fb9c5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,7 +1,7 @@ # -*- coding:utf-8 -*- # !/usr/bin/env python """ -Date: 2022/9/29 15:05 +Date: 2024/3/26 15:05 Desc: CLI 测试文件 运行 `python -m pytest tests/test_cli.py` 进行测试 """