Use github actions for CI (#10)
* chore: Absolute imports * feat: Add new mesh util * chore: replace bumpversion original fork no longer maintained, move config * ci: remove old configuration files * ci: update github action * ci: add python 3.10 test * chore: update pre-commit hooks * ci: update supported python versions supported are 3.7, 3.8 and 3.9. 3.6 had EOL in december 2021. 3.10 has no pytorch distribution yet. * ci: add windows test * ci: update action less windows tests, pre commit * ci: fix typo * chore: run precommit for all files * ci: two step tests * ci: compatibility waits for style * fix: init file had missing imports * ci: add deployment script * ci: skip complete publish step * ci: cleanup readme
This commit is contained in:
committed by
GitHub
parent
b49b7a2d41
commit
a28601751e
@@ -404,6 +404,7 @@ def test_glvq_loss_one_hot_unequal():
|
||||
|
||||
# Activations
|
||||
class TestActivations(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.flist = ["identity", "sigmoid_beta", "swish_beta"]
|
||||
self.x = torch.randn(1024, 1)
|
||||
@@ -418,6 +419,7 @@ class TestActivations(unittest.TestCase):
|
||||
self.assertTrue(iscallable)
|
||||
|
||||
def test_callable_deserialization(self):
|
||||
|
||||
def dummy(x, **kwargs):
|
||||
return x
|
||||
|
||||
@@ -462,6 +464,7 @@ class TestActivations(unittest.TestCase):
|
||||
|
||||
# Competitions
|
||||
class TestCompetitions(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
@@ -515,6 +518,7 @@ class TestCompetitions(unittest.TestCase):
|
||||
|
||||
# Pooling
|
||||
class TestPooling(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
@@ -615,6 +619,7 @@ class TestPooling(unittest.TestCase):
|
||||
|
||||
# Distances
|
||||
class TestDistances(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.nx, self.mx = 32, 2048
|
||||
self.ny, self.my = 8, 2048
|
||||
|
@@ -12,6 +12,7 @@ from prototorch.datasets.abstract import Dataset, ProtoDataset
|
||||
|
||||
|
||||
class TestAbstract(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.ds = Dataset("./artifacts")
|
||||
|
||||
@@ -28,6 +29,7 @@ class TestAbstract(unittest.TestCase):
|
||||
|
||||
|
||||
class TestProtoDataset(unittest.TestCase):
|
||||
|
||||
def test_download(self):
|
||||
with self.assertRaises(NotImplementedError):
|
||||
_ = ProtoDataset("./artifacts", download=True)
|
||||
@@ -38,6 +40,7 @@ class TestProtoDataset(unittest.TestCase):
|
||||
|
||||
|
||||
class TestNumpyDataset(unittest.TestCase):
|
||||
|
||||
def test_list_init(self):
|
||||
ds = pt.datasets.NumpyDataset([1], [1])
|
||||
self.assertEqual(len(ds), 1)
|
||||
@@ -50,6 +53,7 @@ class TestNumpyDataset(unittest.TestCase):
|
||||
|
||||
|
||||
class TestCSVDataset(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
data = np.random.rand(100, 4)
|
||||
targets = np.random.randint(2, size=(100, 1))
|
||||
@@ -67,12 +71,14 @@ class TestCSVDataset(unittest.TestCase):
|
||||
|
||||
|
||||
class TestSpiral(unittest.TestCase):
|
||||
|
||||
def test_init(self):
|
||||
ds = pt.datasets.Spiral(num_samples=10)
|
||||
self.assertEqual(len(ds), 10)
|
||||
|
||||
|
||||
class TestIris(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.ds = pt.datasets.Iris()
|
||||
|
||||
@@ -88,24 +94,28 @@ class TestIris(unittest.TestCase):
|
||||
|
||||
|
||||
class TestBlobs(unittest.TestCase):
|
||||
|
||||
def test_size(self):
|
||||
ds = pt.datasets.Blobs(num_samples=10)
|
||||
self.assertEqual(len(ds), 10)
|
||||
|
||||
|
||||
class TestRandom(unittest.TestCase):
|
||||
|
||||
def test_size(self):
|
||||
ds = pt.datasets.Random(num_samples=10)
|
||||
self.assertEqual(len(ds), 10)
|
||||
|
||||
|
||||
class TestCircles(unittest.TestCase):
|
||||
|
||||
def test_size(self):
|
||||
ds = pt.datasets.Circles(num_samples=10)
|
||||
self.assertEqual(len(ds), 10)
|
||||
|
||||
|
||||
class TestMoons(unittest.TestCase):
|
||||
|
||||
def test_size(self):
|
||||
ds = pt.datasets.Moons(num_samples=10)
|
||||
self.assertEqual(len(ds), 10)
|
||||
|
Reference in New Issue
Block a user