Skip to content

Commit

Permalink
Creating files for automatic testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sm00thix committed Oct 13, 2023
1 parent 871cecc commit 03759b5
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import jax_ikpls_alg_1, jax_ikpls_alg_2, numpy_ikpls

__all__ = ["jax_ikpls_alg_1", "jax_ikpls_alg_2", "numpy_ikpls"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Algorithms.jax_improved_kernel_base import PLSBase
from algorithms.jax_ikpls_base import PLSBase
import jax
import jax.numpy as jnp
from functools import partial
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Algorithms.jax_improved_kernel_base import PLSBase
from algorithms.jax_ikpls_base import PLSBase
import jax
import jax.numpy as jnp
from functools import partial
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions algorithms/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import test_numpy_ikpls, test_jax_ikpls_alg_1, test_jax_ikpls_alg_2

__all__ = ["test_numpy_ikpls", "test_jax_ikpls_alg_1", "test_jax_ikpls_alg_2"]
Empty file.
Empty file.
7 changes: 7 additions & 0 deletions algorithms/tests/test_numpy_ikpls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from sklearn.cross_decomposition import PLSRegression

def test_check_stuff():
sklearn_pls = PLSRegression(n_components=10, scale=False)
from algorithms.numpy_ikpls import PLS
numpy_ikpls = PLS(algorithm=1)
assert 5 != 6
1 change: 1 addition & 0 deletions junit/test-results.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.554" timestamp="2023-10-13T19:53:41.687969" hostname="Toaster"><testcase classname="algorithms.tests.test_numpy_ikpls" name="test_check_stuff" time="0.001" /></testsuite></testsuites>
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jax==0.4.8
numpy==1.21.5
scikit_learn==1.3.1
tqdm==4.65.0

0 comments on commit 03759b5

Please sign in to comment.