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 @@ [](https://pypi.org/project/aktools/) [](https://pepy.tech/project/aktools) [](https://aktools.akfamily.xyz/) -[](https://github.com/psf/black) +[](https://github.com/astral-sh/ruff) [](https://github.com/akfamily/aktools) [](https://github.com/akfamily/aktools/actions) [](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