docs/CONTRIBUTING_EN.md
Thank you for your interest in contributing! All kinds of contributions are welcome.
# Clone the repository
git clone https://github.com/ZhuLinsen/daily_stock_analysis.git
cd daily_stock_analysis
# Create a virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env and fill in the required API keys
git checkout -b feature/your-featuregit commit -m 'feat: add some feature'git push origin feature/your-featuremain.This project follows Conventional Commits:
feat: New feature
fix: Bug fix
docs: Documentation update
style: Code formatting (no logic change)
refactor: Code refactoring
perf: Performance improvement
test: Test-related changes
chore: Build / tooling changes
Examples:
feat: add DingTalk bot support
fix: handle 429 rate-limit with retry backoff
docs: update README deployment section
After opening a PR, CI will automatically run the following PR checks:
PRs that only change ordinary docs/**, non-governance Markdown, or LICENSE keep lightweight change detection, governance validation, and gate summarization, while skipping the three backend test shards, Docker, Web, and desktop packaging. Contract documentation, static API specifications, and Markdown fixtures read directly by offline tests still trigger backend tests. Governance assets such as AGENTS.md, .github/instructions/**, and .claude/skills/** are still validated by ai-governance; runtime-affecting text files such as configuration, dependency, and workflow files still run their corresponding full checks.
| Check | Description | Required |
|---|---|---|
backend-gate | scripts/ci_gate.sh — py_compile + flake8 critical errors + ./scripts/test.sh code + ./scripts/test.sh yfinance + offline pytest | ✅ |
docker-build | Docker image build and key module import smoke test | ✅ |
web-gate | npm run lint + npm run build (triggered when apps/dsa-web/ changes) | ✅ (when triggered) |
pr-review | Automatic PR triggering is temporarily paused. Maintainers can still run it by PR number through workflow_dispatch; it reads PR metadata and diff through the GitHub API and never checks out or executes fork PR code. | ❌ (advisory) |
Separately, the repository also has a non-blocking network-smoke workflow in .github/workflows/network-smoke.yml, but it is only triggered by schedule and workflow_dispatch, not by pull requests.
Running checks locally:
# Backend gate (recommended)
pip install -r requirements.txt
pip install flake8 pytest
./scripts/ci_gate.sh
# Frontend gate (only if you changed apps/dsa-web/)
cd apps/dsa-web
npm ci
npm run lint
npm run build
When modifying a Chinese-language core document (e.g., docs/full-guide.md), your PR description must state whether the corresponding English document has been updated. If not updated, explain why.
Feel free to:
Thank you for contributing! 🎉