diff --git a/.github/workflows/dca_tests.yml b/.github/workflows/dca_tests.yml index 367b807..d7e6b7a 100644 --- a/.github/workflows/dca_tests.yml +++ b/.github/workflows/dca_tests.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10"] steps: - name: Test DCA uses: actions/checkout@v4 diff --git a/README.md b/README.md index fae1dc1..74eca04 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ If you are installing with `pip` you can run $ pip install -e . -r requirements.txt ``` +Note: DCA only requires a CPU-only `pytorch`. If you wish to, **before** installing DCA as in the above instructions, +you can install a CPU-only `pytorch` by following the `pytorch` [installation guide](https://pytorch.org/get-started/locally/). + + +```bash +$ pip install torch --index-url https://download.pytorch.org/whl/cpu +``` + + ## Datasets The 4 datasets used in the DCA paper can be found in the following locations * [M1](https://zenodo.org/record/583331) - We used indy_20160627_01.mat diff --git a/docs/source/conf.py b/docs/source/conf.py index 89799a4..748d8f2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,7 +12,6 @@ # import os import sys -import sphinx_rtd_theme # Get the project root dir, which is the parent parent dir of this project_root = os.path.dirname(os.path.dirname(os.getcwd())) @@ -68,7 +67,6 @@ # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/pyproject.toml b/pyproject.toml index b0f0765..c842577 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,33 @@ [build-system] -requires = ["setuptools>=42"] +requires = ["setuptools>=61", "wheel"] # [CHANGE] upgraded setuptools to 61+ for full pyproject.toml metadata support build-backend = "setuptools.build_meta" + +[project] +name = "DynamicalComponentsAnalysis" +version = "1.1.0" +description = "Dynamical Components Analysis" +readme = "README.md" +requires-python = ">=3.6" +authors = [ + { name="Jesse Livezey", email="jesse.livezey@gmail.com" }, + { name="David Clark" } +] +license = { file = "LICENSE.txt" } +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent" +] +dynamic = ["dependencies"] + +[project.urls] +Homepage = "https://github.com/BouchardLab/DynamicalComponentsAnalysis" +"Bug Tracker" = "https://github.com/BouchardLab/DynamicalComponentsAnalysis/issues" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 87db078..7729219 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ h5py pandas scikit-learn matplotlib ---extra-index-url https://download.pytorch.org/whl/cpu torch diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 6c02238..0000000 --- a/setup.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[metadata] -name = dca -version = 1.0.0 -author = Jesse Livezey, David Clark -author_email = jesse.livezey@gmail.com -description = Dynamical Components Analysis -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/BouchardLab/DynamicalComponentsAnalysis -project_urls = - Bug Tracker = https://github.com/BouchardLab/DynamicalComponentsAnalysis/issues -classifiers = - Programming Language :: Python :: 3 - License :: OSI Approved :: BSD-3-Clause-LBNL - Operating System :: OS Independent - -[options] -package_dir = - = src -packages = find: -python_requires = >=3.6 - -[options.packages.find] -where = src diff --git a/setup.py b/setup.py deleted file mode 100644 index 4f75033..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -from setuptools import setup - - -setup() \ No newline at end of file diff --git a/src/dca/cov_util.py b/src/dca/cov_util.py index 4e5851e..7cf4305 100644 --- a/src/dca/cov_util.py +++ b/src/dca/cov_util.py @@ -812,8 +812,8 @@ def __get__(self, obj, objtype): @memoized def pv_permutation(T, N): - A = np.arange((T * N)**2, dtype=np.int).reshape((T * N, T * N)) - A_perm = np.zeros((T**2, N**2), dtype=np.int) + A = np.arange((T * N)**2, dtype=int).reshape((T * N, T * N)) + A_perm = np.zeros((T**2, N**2), dtype=int) for i in range(T): for j in range(T): row_idx = i * T + j