mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-04 10:47:43 +00:00
feat: Add GitHub infrastructure, CI/CD pipelines, and examples
- Add GitHub issue templates (bug, feature, docs) - Add pull request template with closed-source checklist - Add CODEOWNERS for code review assignment - Add CI/CD workflows (ci, lint, security, docs, release) - pytest + coverage with Python 3.10/3.11 matrix - Ruff + MyPy code quality checks - Bandit + safety security scanning - Sphinx docs + GitHub Pages deployment - Automated PyPI releases on tag push - Add 6 comprehensive examples + Jupyter quickstart - 01_factor_discovery.py (LLM factor generation) - 02_factor_evolution.py (factor optimization) - 03_strategy_generation.py (IC-weighted combination) - 04_backtest_simple.py (strategy backtesting) - 05_model_training.py (XGBoost/LSTM training) - 06_rl_trading_agent.py (PPO/DQN/A2C agents) - notebooks/quickstart.ipynb (interactive tutorial) - Restructure .gitignore with explicit closed-source sections - Add CI/coverage/license badges to README - Complete CLI docstrings for all 9 commands - Add data_config.yaml for quant loop configuration
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
name: Code Quality
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint & Format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/pyproject.toml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-lint-
|
||||
|
||||
- name: Install lint dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff mypy
|
||||
|
||||
- name: Run Ruff (linter)
|
||||
run: |
|
||||
echo "=== Running Ruff Linter ==="
|
||||
ruff check . --statistics || {
|
||||
echo "::error::Ruff linter found issues. Run: ruff check . --fix"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Run Ruff (formatter)
|
||||
run: |
|
||||
echo "=== Running Ruff Formatter ==="
|
||||
ruff format --check . || {
|
||||
echo "::error::Ruff formatter found issues. Run: ruff format ."
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Run MyPy (type checker)
|
||||
run: |
|
||||
echo "=== Running MyPy Type Checker ==="
|
||||
mypy rdagent/ \
|
||||
--ignore-missing-imports \
|
||||
--no-strict-optional \
|
||||
--follow-imports=skip \
|
||||
--warn-return-any || {
|
||||
echo "::warning::MyPy found type issues (non-blocking)"
|
||||
# Non-blocking: MyPy warnings don't fail the build
|
||||
exit 0
|
||||
}
|
||||
|
||||
- name: Check for trailing whitespace
|
||||
run: |
|
||||
echo "=== Checking for trailing whitespace ==="
|
||||
if grep -rIn '[[:space:]]$' --include='*.py' --include='*.md' --include='*.rst' . | grep -v '.git'; then
|
||||
echo "::error::Found trailing whitespace. Please remove it."
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ No trailing whitespace found"
|
||||
|
||||
- name: Check for merge conflicts
|
||||
run: |
|
||||
echo "=== Checking for merge conflict markers ==="
|
||||
if grep -rn '<<<<<<< HEAD\|=======\|>>>>>>>' --include='*.py' --include='*.md' . | grep -v '.git'; then
|
||||
echo "::error::Found merge conflict markers. Please resolve them."
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ No merge conflict markers found"
|
||||
Reference in New Issue
Block a user