Files
daily_stock_analysis/docs/CONTRIBUTING_EN.md
mumu f99f07d716 docs: add EN doc index, contributing guide, bot guide; bilingual issue/PR templates (#713)
* docs: add EN doc index, contributing guide, bot guide; bilingual issue/PR templates

- Add docs/INDEX_EN.md: full English docs index with China-market glossary
- Add docs/CONTRIBUTING_EN.md: English contributing guide (setup, CI, commit conventions)
- Add docs/bot-command_EN.md: English bot integration guide (commands, webhooks, config)
- Bilingualize .github/ISSUE_TEMPLATE/bug_report.md and feature_request.md
- Update .github/ISSUE_TEMPLATE/config.yml with English Docs Index link
- Bilingualize .github/PULL_REQUEST_TEMPLATE.md checklist and field labels
- Add CONTRIBUTING_EN and INDEX_EN links to docs/README_EN.md nav bar

Refs #711

* docs: fix review feedback on bot-command_EN and CONTRIBUTING_EN

- Correct bot/platforms/ directory tree to match actual files
  (feishu_stream.py+discord.py present; feishu.py/wecom.py/telegram.py absent)
- Add missing commands: /ask, /chat, /batch to commands table
- Fix BotCommand.execute() signature: sync def, not async
- Clarify webhook routes as planned/not-yet-registered in FastAPI;
  point to bot/handler.py as the actual implementation location
- Fix backend-gate description in CI table to include ./test.sh code
  and ./test.sh yfinance steps from ci_gate.sh

* docs: fix format_response signature and webhook route status in bot-command_EN

- format_response: correct signature to (response, message) -> WebhookResponse
  to match bot/platforms/base.py abstract method
- Webhook route table: clarify that only dingtalk is in ALL_PLATFORMS (webhook
  mode ready); feishu is stream-only; wecom/telegram not yet implemented
- Add concrete example for mounting dingtalk webhook in FastAPI

* docs: fix remaining review feedback in EN docs

- bot-command_EN: stop claiming bot env keys are in .env.example
- bot-command_EN: mount webhook routes in api/app.py instead of api/v1/router.py
- CONTRIBUTING_EN: keep PR CI table limited to actual pull-request checks
- CONTRIBUTING_EN: clarify network-smoke is schedule/workflow_dispatch only

* docs: clarify EN issue links and bot env guidance
2026-03-16 23:51:10 +08:00

3.6 KiB

Contributing Guide

Thank you for your interest in contributing! All kinds of contributions are welcome.

🐛 Reporting Bugs

  1. Search Issues first to check if it has already been reported.
  2. Create a new Issue using the Bug Report template.
  3. Provide detailed reproduction steps and environment information.

💡 Suggesting Features

  1. Search Issues to make sure the suggestion hasn't already been raised.
  2. Create a new Issue using the Feature Request template.
  3. Describe your use case and expected behavior in detail.

🔧 Submitting Code

Setting Up the Development Environment

# 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

Contribution Workflow

  1. Fork this repository.
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m 'feat: add some feature'
  4. Push the branch: git push origin feature/your-feature
  5. Open a Pull Request against main.

Commit Message Convention

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

Code Style

  • Python code follows PEP 8 (line length: 120).
  • Add docstrings to functions and classes.
  • Add comments for non-obvious logic.
  • Update relevant documentation when adding new features.

CI Checks

After opening a PR, CI will automatically run the following PR checks:

Check Description Required
backend-gate scripts/ci_gate.sh — py_compile + flake8 critical errors + ./test.sh code + ./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)

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

Documentation Sync Rule

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.

📋 Priority Areas for Contribution

  • 🔔 New notification channels (e.g., Slack, Matrix)
  • 🤖 New AI model integrations
  • 📊 New data source adapters
  • 🐛 Bug fixes and performance improvements
  • 📖 Documentation improvements and translations

Questions

Feel free to:

  • Open an Issue for discussion.
  • Browse existing Issues and Discussions.

Thank you for contributing! 🎉