From 2b4162f40d647d501a66c3389fc5f1e0e056b0db Mon Sep 17 00:00:00 2001 From: Derek Tucker Date: Tue, 3 Sep 2024 15:20:08 -0600 Subject: [PATCH 1/8] Update python-package.yml --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 91d326d..26c0600 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,7 @@ jobs: name: Test with pytest run: | pip install . - pytest test/ --cov + pytest --cov test/ - if: runner.os == 'Windows' name: Build run: | From 3c851851254cfc2fb4f352fcf4bc5366d11659d7 Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:24:20 -0600 Subject: [PATCH 2/8] rename files --- debug/{test_oc_geod.py => oc_geod.py} | 0 debug/{test_oc_karcher.py => oc_karcher.py} | 0 debug/{test_oc_logit.py => oc_logit.py} | 0 debug/test_oc_mlogit.py | 38 --------------------- 4 files changed, 38 deletions(-) rename debug/{test_oc_geod.py => oc_geod.py} (100%) rename debug/{test_oc_karcher.py => oc_karcher.py} (100%) rename debug/{test_oc_logit.py => oc_logit.py} (100%) delete mode 100644 debug/test_oc_mlogit.py 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_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) From 7312b15e6c3469da8bc01b283d70afb7b68f64e0 Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:26:18 -0600 Subject: [PATCH 3/8] one more rename --- debug/{test_ps_geod.py => ps_geod.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename debug/{test_ps_geod.py => ps_geod.py} (100%) 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 From ee97c9b5342bc327d33d099643b792dd59cca3f2 Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:31:39 -0600 Subject: [PATCH 4/8] change directory --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 26c0600..1433baa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,7 @@ jobs: name: Test with pytest run: | pip install . - pytest --cov test/ + pytest --cov - if: runner.os == 'Windows' name: Build run: | From 8d55b9b71613d141d03d68383addcd6cf9d5350a Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:35:43 -0600 Subject: [PATCH 5/8] restore full test invok --- .github/workflows/python-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1433baa..36b47d1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,8 +50,7 @@ jobs: - if: runner.os == 'Linux' name: Test with pytest run: | - pip install . - pytest --cov + python -m pytest --addopts "test --cov fdasrsf" - if: runner.os == 'Windows' name: Build run: | From 2ea50a2291da199510218b7e18157e7a4692e5c4 Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:38:11 -0600 Subject: [PATCH 6/8] wrong command --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 36b47d1..ba99c0f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,7 +50,7 @@ jobs: - if: runner.os == 'Linux' name: Test with pytest run: | - python -m pytest --addopts "test --cov fdasrsf" + python setup.py pytest --addopts "test --cov fdasrsf" - if: runner.os == 'Windows' name: Build run: | From 09b1ee168031990f1a461b86d68064aa92f05cbc Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:44:56 -0600 Subject: [PATCH 7/8] update version pinned --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96aff7d..ec476aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ select = "*-win_amd64" environment = { PKG_CONFIG_PATH = "c:/opt/64/lib/pkgconfig" } [build-system] -requires = ["setuptools<=73.0.1", "wheel", "cffi>=1.0.0", "Cython", "findblas", "numpy"] # PEP 518 - what is required to build +requires = ["setuptools<72.0.0", "wheel", "cffi>=1.0.0", "Cython", "findblas", "numpy"] # PEP 518 - what is required to build build-backend = "setuptools.build_meta" [tool.pytest.ini_options] From d7c58b7252d0014701174d728066c8d4efc966c8 Mon Sep 17 00:00:00 2001 From: "J. Derek Tucker" Date: Tue, 3 Sep 2024 15:53:54 -0600 Subject: [PATCH 8/8] fix for 3.12 --- .github/workflows/python-package.yml | 3 ++- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ba99c0f..b1cbffe 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,7 +50,8 @@ jobs: - if: runner.os == 'Linux' name: Test with pytest run: | - python setup.py pytest --addopts "test --cov fdasrsf" + pip install -e . + pytest --cov - if: runner.os == 'Windows' name: Build run: | diff --git a/pyproject.toml b/pyproject.toml index ec476aa..d29fc00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,12 +77,12 @@ select = "*-win_amd64" environment = { PKG_CONFIG_PATH = "c:/opt/64/lib/pkgconfig" } [build-system] -requires = ["setuptools<72.0.0", "wheel", "cffi>=1.0.0", "Cython", "findblas", "numpy"] # PEP 518 - what is required to build +requires = ["setuptools<=73.0.1", "wheel", "cffi>=1.0.0", "Cython", "findblas", "numpy"] # PEP 518 - what is required to build build-backend = "setuptools.build_meta" [tool.pytest.ini_options] minversion = "6.0" -addopts = "-ra -q" +addopts = "--import-mode=importlib" testpaths = [ "tests", ]