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
6 changes: 0 additions & 6 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,3 @@ jobs:

steps:
- uses: cvxgrp/.github/actions/test@main

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
files: artifacts/tests/coverage/coverage.info
format: lcov
12 changes: 1 addition & 11 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,14 @@ on:


jobs:
sphinx:
runs-on: "ubuntu-latest"
steps:
- uses: cvxgrp/.github/actions/sphinx@main

test:
runs-on: "ubuntu-latest"
steps:
- uses: cvxgrp/.github/actions/test@main

jupyter:
runs-on: "ubuntu-latest"
steps:
- uses: cvxgrp/.github/actions/jupyter@main

book:
runs-on: "ubuntu-latest"
needs: [test, sphinx, jupyter]
needs: [jupyter]

permissions:
contents: write
Expand Down
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ test: install ## Run tests
clean: ## Clean up caches and build artifacts
@git clean -X -d -f

.PHONY: coverage
coverage: install ## test and coverage
@poetry run coverage run --source=cvx/. -m pytest
@poetry run coverage report -m
@poetry 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


.PHONY: jupyter
jupyter: install ## Run jupyter lab
@poetry run pip install jupyterlab
Expand Down
2 changes: 1 addition & 1 deletion book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parse:
- dollarmath
myst_substitutions:
book_url: https://www.cvxgrp.org/markowitz-reference

# needed for plotly
sphinx:
config:
Expand Down
2 changes: 0 additions & 2 deletions book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ chapters:
- file: docs/nb
sections:
- glob: docs/notebooks/*
- file: docs/api
- file: docs/reports
5 changes: 0 additions & 5 deletions book/docs/api.md

This file was deleted.

71,672 changes: 2 additions & 71,670 deletions book/docs/notebooks/demo.ipynb

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions book/docs/reports.md

This file was deleted.

1 change: 0 additions & 1 deletion book/sphinx/_static/custom.css

This file was deleted.

Binary file removed book/sphinx/_static/logo.jpeg
Binary file not shown.
52 changes: 0 additions & 52 deletions book/sphinx/conf.py

This file was deleted.

20 changes: 0 additions & 20 deletions book/sphinx/index.rst

This file was deleted.

4 changes: 0 additions & 4 deletions book/sphinx/license.rst

This file was deleted.

2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "cvxsimulator"
name = "markowitz-reference"
version = "0.0.0"
description = "Simple simulator for investors"
authors = ["Thomas Schmelzer"]
Expand All @@ -14,16 +14,18 @@ pandas = "*"
cvxpy = { git = "https://github.com/cvxpy/cvxpy", branch = "master" }

[tool.poetry.group.test.dependencies]
pytest = "*"
pytest = "7.4.2"

[build-system]
requires = ["poetry>=1.6.0"]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
select = ["E", "F", "I"]
line-length = 120
target-version = "py310"
exclude = [
"*__init__.py"
"*__init__.py",
".venv",
"experiments"
]
13 changes: 13 additions & 0 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# """
# testing the builder
# """
from cvx.markowitz.backtest import ParameterizedProblem


def test_trivial(prices):
assert prices.shape == (602, 7)


def test_problem():
p = ParameterizedProblem(
problem="Markowitz",
variables=["x", "y"],
parameters="x + y",
)

assert p