diff --git a/DeepSITH_testing.ipynb b/notebooks/DeepSITH_testing.ipynb similarity index 99% rename from DeepSITH_testing.ipynb rename to notebooks/DeepSITH_testing.ipynb index 976583e..a405617 100644 --- a/DeepSITH_testing.ipynb +++ b/notebooks/DeepSITH_testing.ipynb @@ -11,14 +11,14 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "\n" + "\n" ] } ], @@ -38,7 +38,7 @@ "from math import factorial\n", "ttype = torch.cuda.DoubleTensor if torch.cuda.is_available() else torch.DoubleTensor\n", "print(ttype)\n", - "from deep_isith import DeepSITH\n", + "from sith import DeepSITH\n", "from tqdm.notebook import tqdm\n", "import pickle\n", "sn.set_context(\"poster\")" @@ -441,7 +441,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.8.5" } }, "nbformat": 4, diff --git a/DeepiSITH_testing.ipynb b/notebooks/DeepiSITH_testing.ipynb similarity index 99% rename from DeepiSITH_testing.ipynb rename to notebooks/DeepiSITH_testing.ipynb index ca965f0..dbee8ee 100644 --- a/DeepiSITH_testing.ipynb +++ b/notebooks/DeepiSITH_testing.ipynb @@ -11,14 +11,14 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "\n" + "\n" ] } ], @@ -40,7 +40,7 @@ "print(ttype)\n", "\n", "# deep_iSITH is being used here, not deep_sith\n", - "from deep_isith import DeepSITH\n", + "from sith import DeepSITH\n", "from tqdm.notebook import tqdm\n", "import pickle\n", "sn.set_context(\"poster\")" @@ -435,7 +435,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.8.5" } }, "nbformat": 4, diff --git a/Simple_Network_example.ipynb b/notebooks/Simple_Network_example.ipynb similarity index 99% rename from Simple_Network_example.ipynb rename to notebooks/Simple_Network_example.ipynb index 8389fa1..6a43696 100644 --- a/Simple_Network_example.ipynb +++ b/notebooks/Simple_Network_example.ipynb @@ -912,7 +912,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.8.5" }, "toc": { "nav_menu": {}, diff --git a/Sith_Layer_Verification.ipynb b/notebooks/Sith_Layer_Verification.ipynb similarity index 99% rename from Sith_Layer_Verification.ipynb rename to notebooks/Sith_Layer_Verification.ipynb index ed9f805..f3b354a 100644 --- a/Sith_Layer_Verification.ipynb +++ b/notebooks/Sith_Layer_Verification.ipynb @@ -520,7 +520,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.8.5" }, "toc": { "nav_menu": {}, diff --git a/iSITH_verifications.ipynb b/notebooks/iSITH_verifications.ipynb similarity index 99% rename from iSITH_verifications.ipynb rename to notebooks/iSITH_verifications.ipynb index ec1b428..614595f 100644 --- a/iSITH_verifications.ipynb +++ b/notebooks/iSITH_verifications.ipynb @@ -40,7 +40,7 @@ "print(ttype)\n", "\n", "# deep_iSITH is being used here, not deep_sith\n", - "from isith import iSITH\n", + "from sith import iSITH\n", "from tqdm.notebook import tqdm\n", "import pickle\n", "sn.set_context(\"poster\")" @@ -1035,7 +1035,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.8.5" } }, "nbformat": 4, diff --git a/plagueis.txt b/notebooks/plagueis.txt similarity index 100% rename from plagueis.txt rename to notebooks/plagueis.txt diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8e82ac9 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,31 @@ +[metadata] +author = Beeg Jacques +author_email = beegjacques@yahoo.com +classifiers = + Development Status :: 1 - Alpha + Intended Audience :: Science/Research + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Programming Language :: Python :: 3.7 +description = This repo contains code for the Scale Invariant Temporal History (SITH) module for use with PyTorch. It is build on a Laplace module that performs the Laplace transform of a temporal series. +license_file = LICENSE +project_urls = + GitHub = https://github.com/compmem/SITH_Layer +url = https://github.com/compmem/SITH_Layer + +[options] +python_requires = >= 3.7 +install_requires = + attrs + jinja2 + matplotlib >= 2.2.0 + packaging + pandas + scipy + seaborn + torch + +packages = find: + +[options.packages.find] +exclude = + *.tests diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f63d6a4 --- /dev/null +++ b/setup.py @@ -0,0 +1,26 @@ + +#!/usr/bin/env python +# -*- coding: utf-8 -*- +""" comppsychflows setup script """ +import sys +from setuptools import setup + +# Use setup_requires to let setuptools complain if it's too old for a feature we need +# 30.3.0 allows us to put most metadata in setup.cfg +# 30.4.0 gives us options.packages.find +# 40.8.0 includes license_file, reducing MANIFEST.in requirements +# +# To install, 30.4.0 is enough, but if we're building an sdist, require 40.8.0 +# This imposes a stricter rule on the maintainer than the user +# Keep the installation version synchronized with pyproject.toml +SETUP_REQUIRES = ['setuptools >= %s' % ("40.8.0" if "sdist" in sys.argv else "30.4.0")] + +# This enables setuptools to install wheel on-the-fly +SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else [] + +if __name__ == '__main__': + # Note that "name" is used by GitHub to determine what repository provides a package + # in building its dependency graph. + setup(name='SITH_Layer', + setup_requires=SETUP_REQUIRES, + ) \ No newline at end of file diff --git a/sith/__init__.py b/sith/__init__.py new file mode 100644 index 0000000..977e589 --- /dev/null +++ b/sith/__init__.py @@ -0,0 +1,6 @@ +from .sith import SITH +from .isith import iSITH +from .laplace import Laplace +from .deep_isith import DeepSITH + +__all__ = [SITH, iSITH, Laplace, DeepSITH] \ No newline at end of file diff --git a/deep_isith.py b/sith/deep_isith.py similarity index 99% rename from deep_isith.py rename to sith/deep_isith.py index 3bfc12a..6aa08c6 100644 --- a/deep_isith.py +++ b/sith/deep_isith.py @@ -4,7 +4,7 @@ import torch from torch import nn -from isith import iSITH +from .isith import iSITH from torch.nn.utils import weight_norm diff --git a/isith.py b/sith/isith.py similarity index 100% rename from isith.py rename to sith/isith.py diff --git a/laplace.py b/sith/laplace.py similarity index 100% rename from laplace.py rename to sith/laplace.py diff --git a/sith.py b/sith/sith.py similarity index 99% rename from sith.py rename to sith/sith.py index 4750a8e..9a06540 100644 --- a/sith.py +++ b/sith/sith.py @@ -4,7 +4,7 @@ import torch from torch import nn as nn -from laplace import Laplace +from .laplace import Laplace from math import factorial