Skip to content

Commit

Permalink
Merge pull request #32 from cvxgrp/31-remove-tests
Browse files Browse the repository at this point in the history
31 remove tests
  • Loading branch information
tschm authored Dec 9, 2023
2 parents 9775329 + 05665a7 commit 2b65447
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
with:
extra_args: '--verbose --all-files'

test:
experiment:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: testing
- name: experiments
shell: bash
run: |
make test
make experiment
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
checkpoints

.idea
.vscode
.python-version
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ fmt: install ## Run autoformatting and linting
${VENV}/bin/pre-commit install
${VENV}/bin/pre-commit run --all-files

.PHONY: test
test: install ## Run tests
${VENV}/bin/pip install pytest
${VENV}/bin/pytest tests

.PHONY: clean
clean: ## Clean up caches and build artifacts
@git clean -X -d -f
Expand Down
3 changes: 3 additions & 0 deletions experiments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from pathlib import Path

from experiments.taming import main as taming_main

if __name__ == "__main__":
Path("checkpoints").mkdir(exist_ok=True)
taming_main()
6 changes: 1 addition & 5 deletions experiments/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
from functools import lru_cache
from pathlib import Path
import pickle
import sys
import time
from typing import Callable
import numpy as np
import cvxpy as cp
import pandas as pd
from utils import synthetic_returns

# hack to allow importing from parent directory without having a package
sys.path.append(str(Path(__file__).parent.parent))
from experiments.utils import synthetic_returns


def data_folder():
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions experiments/taming.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
import pandas as pd
import cvxpy as cp
from backtest import BacktestResult, OptimizationInput, run_backtest
from markowitz import Data, Parameters, markowitz
from experiments.backtest import BacktestResult, OptimizationInput, run_backtest
from experiments.markowitz import Data, Parameters, markowitz


def basic_markowitz(inputs: OptimizationInput) -> np.ndarray:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cvxpy
numpy
pandas
pandas[output-formatting]
matplotlib
Empty file removed tests/__init__.py
Empty file.
17 changes: 0 additions & 17 deletions tests/conftest.py

This file was deleted.

Empty file removed tests/resources/.gitkeep
Empty file.
12 changes: 0 additions & 12 deletions tests/test_markowitz.py

This file was deleted.

0 comments on commit 2b65447

Please sign in to comment.