Refactor into installable mlquant package with tests, CI, and docs #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| pyproject.toml | |
| requirements-dev.txt | |
| - name: Install package + dev deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] | |
| - name: Ruff lint | |
| run: python -m ruff check src tests | |
| - name: Pytest | |
| run: python -m pytest --cov=mlquant --cov-report=term-missing | |
| - name: Smoke test the CLI | |
| run: | | |
| mkdir -p artifacts/small | |
| python -m mlquant.cli.main gen-data --config configs/small.yaml | |
| python -m mlquant.cli.main features --config configs/small.yaml | |
| python -m mlquant.cli.main train --config configs/small.yaml | |
| python -m mlquant.cli.main portfolio --config configs/small.yaml | |
| python -m mlquant.cli.main backtest --config configs/small.yaml |