Skip to content

Commit 369e543

Browse files
authored
Merge pull request #65 update packaging for release on pypi
2 parents de4ad5e + f7a4830 commit 369e543

File tree

8 files changed

+43
-35
lines changed

8 files changed

+43
-35
lines changed

.github/workflows/dca_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.8", "3.9"]
15+
python-version: ["3.8", "3.9", "3.10"]
1616
steps:
1717
- name: Test DCA
1818
uses: actions/checkout@v4

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ If you are installing with `pip` you can run
3232
$ pip install -e . -r requirements.txt
3333
```
3434

35+
Note: DCA only requires a CPU-only `pytorch`. If you wish to, **before** installing DCA as in the above instructions,
36+
you can install a CPU-only `pytorch` by following the `pytorch` [installation guide](https://pytorch.org/get-started/locally/).
37+
38+
39+
```bash
40+
$ pip install torch --index-url https://download.pytorch.org/whl/cpu
41+
```
42+
43+
3544
## Datasets
3645
The 4 datasets used in the DCA paper can be found in the following locations
3746
* [M1](https://zenodo.org/record/583331) - We used indy_20160627_01.mat

docs/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#
1313
import os
1414
import sys
15-
import sphinx_rtd_theme
1615

1716
# Get the project root dir, which is the parent parent dir of this
1817
project_root = os.path.dirname(os.path.dirname(os.getcwd()))
@@ -68,7 +67,6 @@
6867
# a list of builtin themes.
6968
#
7069
html_theme = 'sphinx_rtd_theme'
71-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
7270

7371
# Add any paths that contain custom static files (such as style sheets) here,
7472
# relative to this directory. They are copied after the builtin static files,

pyproject.toml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
[build-system]
2-
requires = ["setuptools>=42"]
2+
requires = ["setuptools>=61", "wheel"] # [CHANGE] upgraded setuptools to 61+ for full pyproject.toml metadata support
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "DynamicalComponentsAnalysis"
7+
version = "1.1.0"
8+
description = "Dynamical Components Analysis"
9+
readme = "README.md"
10+
requires-python = ">=3.6"
11+
authors = [
12+
{ name="Jesse Livezey", email="[email protected]" },
13+
{ name="David Clark" }
14+
]
15+
license = { file = "LICENSE.txt" }
16+
classifiers = [
17+
"Programming Language :: Python :: 3",
18+
"Operating System :: OS Independent"
19+
]
20+
dynamic = ["dependencies"]
21+
22+
[project.urls]
23+
Homepage = "https://github.com/BouchardLab/DynamicalComponentsAnalysis"
24+
"Bug Tracker" = "https://github.com/BouchardLab/DynamicalComponentsAnalysis/issues"
25+
26+
[tool.setuptools.packages.find]
27+
where = ["src"]
28+
29+
[tool.setuptools]
30+
package-dir = {"" = "src"}
31+
32+
[tool.setuptools.dynamic]
33+
dependencies = {file = ["requirements.txt"]}

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ h5py
44
pandas
55
scikit-learn
66
matplotlib
7-
--extra-index-url https://download.pytorch.org/whl/cpu
87
torch

setup.cfg

Lines changed: 0 additions & 24 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/dca/cov_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ def __get__(self, obj, objtype):
812812

813813
@memoized
814814
def pv_permutation(T, N):
815-
A = np.arange((T * N)**2, dtype=np.int).reshape((T * N, T * N))
816-
A_perm = np.zeros((T**2, N**2), dtype=np.int)
815+
A = np.arange((T * N)**2, dtype=int).reshape((T * N, T * N))
816+
A_perm = np.zeros((T**2, N**2), dtype=int)
817817
for i in range(T):
818818
for j in range(T):
819819
row_idx = i * T + j

0 commit comments

Comments
 (0)