docs: namespace 3 stale package-path refs in module docstrings #11
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: | |
| jobs: | |
| test: | |
| name: lint + tests (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| # The test suite and lint need only the scientific core; every heavy / | |
| # optional dependency (boosting libs, torch, hmmlearn, broker SDKs, ...) | |
| # is lazily imported with a fallback, so it is intentionally not installed | |
| # here. This keeps CI fast and proves the package imports + tests pass | |
| # without the optional extras. | |
| - name: Install core dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install numpy pandas scipy scikit-learn pyarrow matplotlib pytest pytest-cov ruff | |
| - name: Lint (ruff) | |
| run: ruff check . | |
| - name: Tests (pytest) | |
| run: pytest tests/ -q --tb=short | |
| package: | |
| name: build + install smoke (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| # Tests run from the repo root with pythonpath=["."], which would not catch | |
| # a packaging-data problem (e.g. the bundled snapshot not shipping in the | |
| # wheel). Build the artifacts, install the wheel into a clean venv, and | |
| # prove the package imports and the sample CSV is present at the path the | |
| # report generator resolves through quantcortex.__file__. | |
| - name: Build sdist + wheel | |
| run: | | |
| python -m pip install --upgrade pip build | |
| python -m build | |
| - name: Install wheel into a clean venv and verify packaged data | |
| run: | | |
| python -m venv /tmp/wheeltest | |
| /tmp/wheeltest/bin/pip install dist/*.whl | |
| cd /tmp && /tmp/wheeltest/bin/python -c "from pathlib import Path; import quantcortex, quantcortex.portfolio.base, quantcortex.backtest.engines.vectorized, quantcortex.strategies.base_strategy; csv = Path(quantcortex.__file__).resolve().parent / 'data' / 'sample' / 'rotation_prices.csv'; assert csv.is_file(), f'sample CSV missing from installed package: {csv}'; print('packaged import OK; sample CSV present at', csv)" |