Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

31 remove tests #32

Merged
merged 7 commits into from
Dec 9, 2023
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: 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.