|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -Thanks for your interest in improving `young-stock-cli`. This is a small, |
4 | | -focused project; contributions of all sizes are welcome. |
| 3 | +Thanks for considering a contribution! This project welcomes pull requests, bug reports, and feature suggestions. |
5 | 4 |
|
6 | | -## Development setup |
| 5 | +## Quick start |
7 | 6 |
|
8 | 7 | ```bash |
9 | 8 | git clone https://github.com/AdvancingTitans/young-stock-cli.git |
10 | 9 | cd young-stock-cli |
11 | | -uv venv --python 3.11 |
12 | | -uv pip install -e ".[dev]" |
13 | | -uv run pytest -q |
| 10 | +pip install -e ".[dev]" |
| 11 | +pytest |
| 12 | +ruff check . |
14 | 13 | ``` |
15 | 14 |
|
16 | | -## How to contribute |
| 15 | +## Pull requests |
17 | 16 |
|
18 | | -- **Bug reports**: open an issue with the exact command you ran, the full |
19 | | - stack trace, and the trading day you queried (Eastmoney's payload format |
20 | | - changes over time — knowing the date matters). |
21 | | -- **New data source / endpoint**: open an issue first to discuss API |
22 | | - stability and rate-limit behaviour before sending a PR. |
23 | | -- **Documentation / translation**: PRs welcome. The README is bilingual |
24 | | - (English on top, Chinese below). |
| 17 | +1. Fork → create a topic branch (`feat/...` or `fix/...`). |
| 18 | +2. Add or update tests for your change. |
| 19 | +3. Run `pytest` and `ruff check .` locally — CI runs both. |
| 20 | +4. Open a PR with a clear description: what + why. |
25 | 21 |
|
26 | | -## Pull request checklist |
| 22 | +## Reporting bugs |
27 | 23 |
|
28 | | -- [ ] `uv run pytest -q` passes locally. |
29 | | -- [ ] `uv run ruff check src tests` is clean. |
30 | | -- [ ] New behaviour has a test (mock the network, do not hit live APIs). |
31 | | -- [ ] `CHANGELOG.md` updated under `## [Unreleased]`. |
| 24 | +Please include: |
32 | 25 |
|
33 | | -## Code style |
| 26 | +- `young --version` |
| 27 | +- Python version (`python --version`) |
| 28 | +- OS |
| 29 | +- The exact command you ran and the full traceback / output. |
34 | 30 |
|
35 | | -- Python 3.8+ syntax (we still support 3.8 because some quant users are |
36 | | - stuck on legacy interpreters). |
37 | | -- 100-column line limit (enforced by ruff). |
38 | | -- Prefer the standard library; runtime dependencies should stay at zero |
39 | | - unless there's a clear reason. |
| 31 | +## Code style |
40 | 32 |
|
41 | | -## Release process |
| 33 | +- `ruff` for linting and import sorting. |
| 34 | +- Type hints encouraged but not required for small fixes. |
| 35 | +- Keep functions focused; prefer composing small helpers. |
42 | 36 |
|
43 | | -Maintainers only: |
| 37 | +## License |
44 | 38 |
|
45 | | -1. Bump `__version__` in `src/young_stock_cli/__version__.py`. |
46 | | -2. Move `## [Unreleased]` content to a new dated section in `CHANGELOG.md`. |
47 | | -3. Tag: `git tag v0.x.y && git push --tags`. |
48 | | -4. GitHub Actions builds the wheel and publishes to PyPI on tag push. |
| 39 | +By contributing, you agree your contribution will be licensed under the MIT license. |
0 commit comments