-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,568 additions
and
3,817 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
SHELL=/bin/bash | ||
|
||
UNAME=$(shell uname -s) | ||
|
||
.PHONY: install | ||
install: ## Install a virtual environment with all extras | ||
@curl -LsSf https://astral.sh/uv/install.sh | sh | ||
@uv venv | ||
@uv sync -vv --all-extras | ||
@echo "Virtual environment created with all extras. Activate with:" | ||
@echo "source .venv/bin/activate" | ||
|
||
.PHONY: fmt | ||
fmt: ## Run autoformatting and linting | ||
@uv pip install pre-commit | ||
@uv run pre-commit install | ||
@uv run pre-commit run --all-files | ||
|
||
|
||
.PHONY: test | ||
test: install ## Run tests | ||
@uv run pytest | ||
|
||
|
||
.PHONY: clean | ||
clean: ## Clean up caches and build artifacts | ||
@git clean -X -d -f | ||
|
||
|
||
.PHONY: coverage | ||
coverage: install ## test and coverage | ||
@uv run coverage run --source=cvx/. -m pytest | ||
@uv run coverage report -m | ||
@uv run coverage html | ||
|
||
@if [ ${UNAME} == "Darwin" ]; then \ | ||
open htmlcov/index.html; \ | ||
elif [ ${UNAME} == "linux" ]; then \ | ||
xdg-open htmlcov/index.html 2> /dev/null; \ | ||
fi | ||
|
||
|
||
.PHONY: help | ||
help: ## Display this help screen | ||
@echo -e "\033[1mAvailable commands:\033[0m" | ||
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "pyportfolioopt" | ||
version = "1.5.6" | ||
version = "0.0.0" | ||
description = "Financial portfolio optimization in python" | ||
license = "MIT" | ||
authors = ["Robert Andrew Martin <[email protected]>"] | ||
authors = [{name="Robert Andrew Martin", email="[email protected]"}] | ||
readme = "README.md" | ||
repository = "https://github.com/robertmartin8/PyPortfolioOpt" | ||
documentation = "https://pyportfolioopt.readthedocs.io/en/latest/" | ||
keywords= ["finance", "portfolio", "optimization", "quant", "investing"] | ||
requires-python = ">=3.10" | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
|
@@ -25,43 +26,90 @@ classifiers=[ | |
"Topic :: Office/Business :: Financial", | ||
"Topic :: Office/Business :: Financial :: Investment", | ||
] | ||
packages = [ {include = "pypfopt"} ] | ||
dependencies = [ | ||
"scipy", | ||
"pandas", | ||
"cvxpy", | ||
"numpy" | ||
] | ||
|
||
[tool.poetry.urls] | ||
"Issues" = "https://github.com/robertmartin8/PyPortfolioOpt/issues" | ||
"Personal website" = "https://reasonabledeviations.com" | ||
#[tool.poetry.urls] | ||
#"Issues" = "https://github.com/robertmartin8/PyPortfolioOpt/issues" | ||
#"Personal website" = "https://reasonabledeviations.com" | ||
|
||
[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 } | ||
[project.optional-dependencies] | ||
plot = [ | ||
"matplotlib", | ||
"plotly", | ||
"scikit-learn", | ||
"ecos" | ||
] | ||
|
||
[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" | ||
[dependency-groups] | ||
dev = [ | ||
"pytest-cov>=6.0.0", | ||
"pytest>=8.3.3", | ||
"pre-commit>=4.0.1", | ||
"jedi", | ||
"yfinance", | ||
"ecos" | ||
] | ||
|
||
[tool.poetry.extras] | ||
optionals = ["scikit-learn", "matplotlib", "cvxopt"] | ||
#excel = [ | ||
# "odfpy>=1.4.1", | ||
# "openpyxl>=3.1.0", | ||
# "python-calamine>=0.1.7", | ||
# "pyxlsb>=1.0.10", | ||
# "xlrd>=2.0.1", | ||
# "xlsxwriter>=3.0.5" | ||
#] | ||
|
||
#[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 } | ||
|
||
#[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" | ||
|
||
#[tool.poetry.extras] | ||
#optionals = ["scikit-learn", "matplotlib", "cvxopt"] | ||
|
||
[tool.ruff] | ||
select = ["E", "F", "I"] | ||
line-length = 120 | ||
target-version = "py310" | ||
exclude = [ | ||
"*__init__.py", "tests/test_imports.py" | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["pypfopt"] | ||
|
||
#[build-system] | ||
#requires = ["poetry-core>=1.0.0"] | ||
#build-backend = "poetry.core.masonry.api" | ||
|
||
|
||
[tool.black] | ||
line-length = 88 | ||
#[tool.black] | ||
#line-length = 88 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
#[tool.isort] | ||
#profile = "black" |
Oops, something went wrong.