move supporting code for papers to module paper_code #27
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: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Verify imports | |
| run: | | |
| python -c " | |
| from optimalportfolios import ( | |
| PortfolioObjective, Constraints, GroupLowerUpperConstraints, | |
| FactorCovarEstimator, EwmaCovarEstimator | |
| ) | |
| print('All imports OK') | |
| " | |
| - name: Verify factorlasso integration | |
| run: | | |
| python -c " | |
| from factorlasso import LassoModel as FL_LassoModel | |
| from optimalportfolios import LassoModel as OP_LassoModel | |
| assert FL_LassoModel is OP_LassoModel, 'Re-export mismatch' | |
| print('factorlasso integration OK') | |
| " | |
| - name: Run solver tests (no external data) | |
| run: | | |
| python optimalportfolios/optimization/tests/constraints_test.py | |
| python optimalportfolios/optimization/tests/carra_mixture_test.py | |
| python optimalportfolios/optimization/tests/quadratic_test.py | |
| python optimalportfolios/optimization/tests/maximise_alpha_with_target_yield_test.py | |
| python optimalportfolios/optimization/tests/maximise_alpha_over_tre_test.py | |
| python optimalportfolios/utils/tests/portfolios_funcs_test.py |