Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install ecos
pip install ".[dev,all_extras]"

- name: Generate coverage report
run: |
pip install pytest pytest-cov
pytest --cov=./ --cov-report=xml

- name: Upload coverage to Codecov
# if false in order to skip for now
if: false
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,29 @@ jobs:

steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest isort black flake8
pip install ecos
pip install ".[dev,all_extras]"

- name: Test with pytest
run: |
pytest ./tests

- name: Check with isort
run: |
isort --check --diff .

- name: Check with black
run: |
black --check --diff .

- name: Check with flake8
run: |
flake8 --show-source --statistics .
File renamed without changes.
3,767 changes: 0 additions & 3,767 deletions poetry.lock

This file was deleted.

122 changes: 74 additions & 48 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,63 +1,89 @@
[tool.poetry]
[project]
name = "pyportfolioopt"
version = "1.5.6"
description = "Financial portfolio optimization in python"
license = "MIT"
authors = ["Robert Andrew Martin <martin.robertandrew@gmail.com>"]
license = { file = "LICENSE" }
maintainers = [
{ name = "Robert Andrew Martin", email = "martin.robertandrew@gmail.com" },
]
authors = [
{ name = "Robert Andrew Martin", email = "martin.robertandrew@gmail.com" },
]
readme = "README.md"
repository = "https://github.com/pyportfolio/pyportfolioopt"
documentation = "https://pyportfolioopt.readthedocs.io/en/latest/"
keywords= ["finance", "portfolio", "optimization", "quant", "investing"]
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Office/Business :: Financial",
"Topic :: Office/Business :: Financial :: Investment",
]
packages = [ {include = "pypfopt"} ]
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Office/Business :: Financial",
"Topic :: Office/Business :: Financial :: Investment",
]

[tool.poetry.urls]
"Issues" = "https://github.com/pyportfolio/pyportfolioopt/issues"
"Personal website" = "https://reasonabledeviations.com"
# core dependencies of pyportfolioopt
# this set should be kept minimal!
dependencies = [
"cvxpy>=1.1.19",
"numpy>=1.26.0",
"pandas>=0.19",
"scikit-learn>=0.24.1",
"scipy>=1.3.0",
]

[project.optional-dependencies]
# there are the following dependency sets:
# - all_extras - all soft dependencies
# - dev - the developer dependency set, for contributors
#
# soft dependencies are not required for the core functionality of pyportfolioopt

[tool.poetry.dependencies]
python = ">=3.9"
scipy = ">=1.3"
pandas = ">=0.19"
cvxpy = ">=1.1.19"
numpy = ">=1.26.0"
matplotlib = { version=">=3.2.0", optional=true }
scikit-learn = { version=">=0.24.1", optional=true }
ecos = { version="^2.0.14", optional=true }
plotly = { version="^5.0.0", optional=true }
# all soft dependencies
#
# users can install via "pip install pyportfolioopt[all_extras]"
#
all_extras = [
"matplotlib>=3.2.0",
"plotly>=5.0.0,<6",
"scikit-learn>=0.24.1",
"ecos>=2.0.14,<2.1",
"plotly>=5.0.0,<6",
"cvxopt; python_version < '3.14'",
]

[tool.poetry.dev-dependencies]
pytest = ">=7.1.2"
flake8 = ">=4.0.1"
jupyterlab = ">=3.4.2"
black = ">=22.3.0"
ipykernel = ">=6.13.0"
jedi = ">=0.18.1"
pytest-cov = ">=3.0.0"
yfinance = ">=0.1.70"
# dev - the developer dependency set, for contributors and CI
dev = [
"pytest>=7.1.2",
"flake8>=4.0.1",
"black>=22.3.0",
"pytest-cov>=3.0.0",
"yfinance>=0.1.70",
"isort",
]

[tool.poetry.extras]
optionals = ["scikit-learn", "matplotlib", "cvxopt"]
[project.urls]
Documentation = "https://pyportfolioopt.readthedocs.io/en/latest/"
Download = "https://pypi.org/project/pyportfolioopt/#files"
Homepage = "https://pyportfolioopt.readthedocs.io/en/latest/"
Repository = "https://github.com/pyportfolio/pyportfolioopt"
"Personal website" = "https://reasonabledeviations.com"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=78.1.1",
]

[tool.setuptools.packages.find]
exclude = ["example", "example.*", "tests", "tests.*"]

[tool.black]
line-length = 88
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

56 changes: 0 additions & 56 deletions setup.py

This file was deleted.