From b9dc46f83689ddf88ae86e0c976fe63fe3d7c84c Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:15:52 +0800 Subject: [PATCH] Polish open source project hygiene --- .github/workflows/validate.yml | 11 +++++++++++ .gitignore | 4 ++++ README.md | 4 ++-- README.zh-CN.md | 4 ++-- pyproject.toml | 1 - 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a67e08b..6f0f91a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -9,12 +9,23 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 - uses: actions/setup-python@v6 with: python-version: "3.12" - uses: actions/setup-node@v6 with: node-version: "22" + - name: Check whitespace + run: | + set -euo pipefail + if [ "${{ github.event_name }}" = "pull_request" ]; then + git fetch --no-tags --depth=1 origin "${{ github.base_ref }}" + git diff --check "origin/${{ github.base_ref }}...HEAD" + else + git diff-tree --check --no-commit-id --root -r HEAD + fi - name: Validate runtime targets run: python3 scripts/runtime_settings.py validate - name: Run unit tests diff --git a/.gitignore b/.gitignore index d61d069..d84868a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ __pycache__/ .venv/ .wrangler/ local/ +.env +.env.* +!*.env.example +web/strategy-switch-console/wrangler.toml diff --git a/README.md b/README.md index b917a19..b528b71 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ It supports the system but does not decide which strategy should be live. Strate ## Quick start ```bash -python -m pip install -e . -python -m pytest -q +python3 scripts/runtime_settings.py validate +python3 -m unittest discover -s tests -v ``` ## Manual Strategy Switch diff --git a/README.zh-CN.md b/README.zh-CN.md index 3226b98..f87c7c8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -26,8 +26,8 @@ QuantRuntimeSettings 是 QuantStrategyLab 的运行配置包。为 QuantStrategy ## 快速开始 ```bash -python -m pip install -e . -python -m pytest -q +python3 scripts/runtime_settings.py validate +python3 -m unittest discover -s tests -v ``` ## 一键切换策略 diff --git a/pyproject.toml b/pyproject.toml index 7e0ccb1..f1b20b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,4 +7,3 @@ requires-python = ">=3.11" [tool.ruff] line-length = 120 target-version = "py311" -