mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
* chore(config): add Python and uv support to project - Add comprehensive Python .gitignore rules (pycache, venv, pytest, etc.) - Add uv package manager specific ignores (.uv/, uv.lock) - Initialize pyproject.toml for Python tooling Co-authored-by: tinkle-community <tinklefund@gmail.com> * chore(deps): add testing dependencies - Add github.com/stretchr/testify v1.11.1 for test assertions - Add github.com/agiledragon/gomonkey/v2 v2.13.0 for mocking - Promote github.com/rs/zerolog to direct dependency Co-authored-by: tinkle-community <tinklefund@gmail.com> * ci(workflow): add PR test coverage reporting Add GitHub Actions workflow to run unit tests and report coverage on PRs: - Run Go tests with race detection and coverage profiling - Calculate coverage statistics and generate detailed reports - Post coverage results as PR comments with visual indicators - Fix Go version to 1.23 (was incorrectly set to 1.25.0) Coverage guidelines: - Green (>=80%): excellent - Yellow (>=60%): good - Orange (>=40%): fair - Red (<40%): needs improvement This workflow is advisory only and does not block PR merging. Co-authored-by: tinkle-community <tinklefund@gmail.com> * test(trader): add comprehensive unit tests for trader modules Add unit test suites for multiple trader implementations: - aster_trader_test.go: AsterTrader functionality tests - auto_trader_test.go: AutoTrader lifecycle and operations tests - binance_futures_test.go: Binance futures trader tests - hyperliquid_trader_test.go: Hyperliquid trader tests - trader_test_suite.go: Common test suite utilities and helpers Also fix minor formatting issue in auto_trader.go (trailing whitespace) Co-authored-by: tinkle-community <tinklefund@gmail.com> * test(trader): preserve existing calculatePnLPercentage unit tests Merge existing calculatePnLPercentage tests with incoming comprehensive test suite: - Preserve TestCalculatePnLPercentage with 9 test cases covering edge cases - Preserve TestCalculatePnLPercentage_RealWorldScenarios with 3 trading scenarios - Add math package import for floating-point precision comparison - All tests validate PnL percentage calculation with different leverage scenarios Co-authored-by: tinkle-community <tinklefund@gmail.com> --------- Co-authored-by: tinkle-community <tinklefund@gmail.com>
125 lines
1.2 KiB
Plaintext
125 lines
1.2 KiB
Plaintext
# IDE 配置文件
|
||
.idea/
|
||
*.iml
|
||
*.xml
|
||
|
||
# AI 工具
|
||
.claude/
|
||
CLAUDE.md
|
||
|
||
# 编译产物
|
||
nofx-auto
|
||
*.exe
|
||
nofx
|
||
nofx_test
|
||
|
||
# Go 相关
|
||
*.test
|
||
*.out
|
||
|
||
# 操作系统
|
||
.DS_Store
|
||
Thumbs.db
|
||
|
||
# 临时文件
|
||
*.log
|
||
*.tmp
|
||
*.bak
|
||
*.backup
|
||
|
||
# 环境变量
|
||
.env
|
||
config.json
|
||
config.db*
|
||
nofx.db
|
||
configbak.json
|
||
|
||
# 决策日志
|
||
decision_logs/
|
||
coin_pool_cache/
|
||
nofx_test
|
||
|
||
# Node.js
|
||
web/node_modules/
|
||
node_modules/
|
||
web/dist/
|
||
web/.vite/
|
||
|
||
# ESLint 临时报告文件(调试时生成,不纳入版本控制)
|
||
eslint-*.json
|
||
|
||
# VS code
|
||
.vscode
|
||
|
||
# 密钥和敏感文件
|
||
# 注意:crypto目录包含加密服务代码,应该被提交
|
||
# 只忽略密钥文件本身
|
||
secrets/
|
||
*.key
|
||
*.pem
|
||
*.p12
|
||
*.pfx
|
||
rsa_key*
|
||
|
||
# 加密相关
|
||
DATA_ENCRYPTION_KEY=*
|
||
*.enc
|
||
|
||
# Python
|
||
__pycache__/
|
||
*.py[cod]
|
||
*$py.class
|
||
*.so
|
||
.Python
|
||
build/
|
||
develop-eggs/
|
||
dist/
|
||
downloads/
|
||
eggs/
|
||
.eggs/
|
||
lib/
|
||
lib64/
|
||
parts/
|
||
sdist/
|
||
var/
|
||
wheels/
|
||
pip-wheel-metadata/
|
||
share/python-wheels/
|
||
*.egg-info/
|
||
.installed.cfg
|
||
*.egg
|
||
MANIFEST
|
||
|
||
# Python 虚拟环境
|
||
.venv/
|
||
venv/
|
||
ENV/
|
||
env/
|
||
.env/
|
||
|
||
# uv
|
||
.uv/
|
||
uv.lock
|
||
|
||
# Pytest
|
||
.pytest_cache/
|
||
.coverage
|
||
htmlcov/
|
||
*.cover
|
||
.hypothesis/
|
||
|
||
# Jupyter Notebook
|
||
.ipynb_checkpoints
|
||
*.ipynb
|
||
|
||
# pyenv
|
||
.python-version
|
||
|
||
# mypy
|
||
.mypy_cache/
|
||
.dmypy.json
|
||
dmypy.json
|
||
|
||
# Pyre type checker
|
||
.pyre/
|