Repository: cai4cai/torchsparsegradutils (language: python)

Issue:
Set up structure for pip installation
For simplicity, it would be good to enable installation with pip + github:
```
pip install git+https://github.com/cai4cai/sparsitypreservingtorchutils#egg=sparsitypreservingtorchutils
```

This will also help be ready for PyPi when the time comes.


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index a67fe77..a9925cc 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,18 @@
 # Sparsity-preserving gradient utility tools for PyTorch
 A collection of utility functions to work with PyTorch sparse tensors
+
+## Installation
+The provided package can be installed using:
+
+`pip install torchsparsegradutils` (TODO)
+
+or
+
+`pip install git+https://github.com/cai4cai/sparsitypreservingtorchutils`
+
+## Unit Tests
+A number of unittests are provided, which can be run as:
+
+```
+python -m unittest
+```
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..88ddb2b
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,26 @@
+import setuptools
+
+def readme():
+    with open('README.md') as f:
+        return f.read()
+
+setuptools.setup(name='torchsparsegradutils',
+      version='0.0.1',
+      description='A collection of utility functions to work with PyTorch sparse tensors',
+      long_description=readme(),
+      long_description_content_type="text/markdown",
+      classifiers=[
+        'Operating System :: OS Independent',
+        'License :: OSI Approved :: Apache Software License',
+        'Programming Language :: Python :: 3',
+      ],
+      keywords='sparse torch utility',
+      url='https://github.com/cai4cai/sparsitypreservingtorchutils',
+      author='TODO',
+      author_email='TODO',
+      license='Apache-2.0',
+      packages=['torchsparsegradutils'],
+      install_requires=[
+          'torch',
+      ],
+      zip_safe=False)
\ No newline at end of file
diff --git a/torchsparsegradutils/__init__.py b/torchsparsegradutils/__init__.py
new file mode 100644
index 0000000..e416a76
--- /dev/null
+++ b/torchsparsegradutils/__init__.py
@@ -0,0 +1,3 @@
+
+def dummy_interface():
+    print("called dummy_interface() function")
\ No newline at end of file


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_util.py b/tests/test_util.py
new file mode 100644
index 0000000..3540545
--- /dev/null
+++ b/tests/test_util.py
@@ -0,0 +1,16 @@
+import unittest
+
+# import torch
+
+import torchsparsegradutils
+
+# # set deterministic seed
+# torch.manual_seed(15)
+
+
+class TestDummyInterface(unittest.TestCase):
+    def test_dummy_shape(self):
+        torchsparsegradutils.dummy_interface()
+
+if __name__ == "__main__":
+    unittest.main()
\ No newline at end of file