diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 91d326d..b1cbffe 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,8 +50,8 @@ jobs: - if: runner.os == 'Linux' name: Test with pytest run: | - pip install . - pytest test/ --cov + pip install -e . + pytest --cov - if: runner.os == 'Windows' name: Build run: | diff --git a/debug/test_oc_geod.py b/debug/oc_geod.py similarity index 100% rename from debug/test_oc_geod.py rename to debug/oc_geod.py diff --git a/debug/test_oc_karcher.py b/debug/oc_karcher.py similarity index 100% rename from debug/test_oc_karcher.py rename to debug/oc_karcher.py diff --git a/debug/test_oc_logit.py b/debug/oc_logit.py similarity index 100% rename from debug/test_oc_logit.py rename to debug/oc_logit.py diff --git a/debug/test_ps_geod.py b/debug/ps_geod.py similarity index 100% rename from debug/test_ps_geod.py rename to debug/ps_geod.py diff --git a/debug/test_oc_mlogit.py b/debug/test_oc_mlogit.py deleted file mode 100644 index 5871bf8..0000000 --- a/debug/test_oc_mlogit.py +++ /dev/null @@ -1,38 +0,0 @@ -import os, sys, inspect -# realpath() with make your script run, even if you symlink it :) -cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0]) + "/../fdasrsf") -if cmd_folder not in sys.path: - sys.path.insert(0, cmd_folder) -import h5py -import numpy as np -import curve_functions as cf -import curve_regression as cr -fun = h5py.File('/Users/jdtucker/Documents/Research/SRVF_FDA/Data/Full20shapedata.h5') -C = fun['beta'][:] -C = C.T - -a, b, c = C.shape -beta = np.zeros((a, b, 80)) -for ii in range(0, 20): - beta_tmp = np.zeros((a, b+1)) - beta_tmp[:, 0:b] = C[:, :, ii] - beta_tmp[:, b] = C[:, 0, ii] - beta[:, :, ii] = cf.resamplecurve(beta_tmp, b) - beta_tmp[:, 0:b] = C[:, :, ii+20] - beta_tmp[:, b] = C[:, 0, ii+20] - beta[:, :, ii+20] = cf.resamplecurve(beta_tmp, b) - beta_tmp[:, 0:b] = C[:, :, ii+40] - beta_tmp[:, b] = C[:, 0, ii+40] - beta[:, :, ii+40] = cf.resamplecurve(beta_tmp, b) - beta_tmp[:, 0:b] = C[:, :, ii+60] - beta_tmp[:, b] = C[:, 0, ii+60] - beta[:, :, ii+60] = cf.resamplecurve(beta_tmp, b) - -y = np.ones(80, dtype=int) -y[20:40] = 2 -y[40:60] = 3 -y[60:80] = 4 - -model = cr.oc_elastic_mlogistic(beta, y, df=60, T=200, max_itr=40, - deltaO=.08, deltag=.05) -out = cr.oc_elastic_prediction(beta, model, y=y) diff --git a/pyproject.toml b/pyproject.toml index 96aff7d..d29fc00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ build-backend = "setuptools.build_meta" [tool.pytest.ini_options] minversion = "6.0" -addopts = "-ra -q" +addopts = "--import-mode=importlib" testpaths = [ "tests", ]