robertmartin8 / PyPortfolioOpt

Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
https://pyportfolioopt.readthedocs.io/
MIT License
4.43k stars 948 forks source link

Github CI does not run on MacOS and Windows #509

Closed yosukesan closed 1 year ago

yosukesan commented 1 year ago

Describe the bug This is not code issue, but CI issue. Inserted the line below and got 'linux' from pytest (macos-latest) and pytest (windows-latest) run. This meant all CI tests run on Ubuntu.

python -c "import sys; print(sys.platform)" 

Collaps 'Get full python version' tab and check line 8 https://github.com/yosukesan/PyPortfolioOpt/actions/runs/3775428942/jobs/6418111547 https://github.com/yosukesan/PyPortfolioOpt/actions/runs/3775428942/jobs/6418111498

Expected behavior Windows-latest and macos-latest tests shall run on the specified OS respectively

Code sample I think the change blow fix this problem.

- runs-on : ubuntu-latest
+ runs-on : ${{ matrix.os }}
yosukesan commented 1 year ago

After changing the code as Code sample, CI run on correct OS, but we've got installation problem now. The same check again. Collapse 'Get full python version' tab and check line 8. I got 'win32' and 'darwin' now.

windows: https://github.com/yosukesan/PyPortfolioOpt/actions/runs/3775485419/jobs/6418196256

macos: https://github.com/yosukesan/PyPortfolioOpt/actions/runs/3775485419/jobs/6418196292

Changes: https://github.com/robertmartin8/PyPortfolioOpt/compare/master...yosukesan:PyPortfolioOpt:CI_does_not_work_on_maxos_and_win32%23509

From error message, on win32 looks just adding to $PATH, but I have no idea for macos for now.

yosukesan commented 1 year ago

Just sent RP https://github.com/robertmartin8/PyPortfolioOpt/pull/510 for fix CI issue. Can I add two installation issues for win and mac after it is merged ?

88d52bdba0366127fffca9dfa93895 commented 1 year ago

fixed the CI on latest master, close this issue. Please feel free to reopen it if necessary.

yosukesan commented 1 year ago

From https://github.com/robertmartin8/PyPortfolioOpt/actions/runs/4836018171 Install dependencies logs, I think test is running on correct OS now. I haven't got win and mac env locally, so haven't checked. Thanks for your work.