Skip to content

Commit 3b68c3c

Browse files
authored
Merge pull request #160 from KrishnaswamyLab/158-update-requirements-and-installation-procedure
158 update requirements and installation procedure
2 parents d305a59 + 67861e7 commit 3b68c3c

File tree

13 files changed

+99
-749
lines changed

13 files changed

+99
-749
lines changed

.github/workflows/run_tests.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
config:
24-
- {name: 'current', os: ubuntu-latest, python: '3.8' }
24+
- {name: 'current', os: ubuntu-latest, python: '3.9' }
2525

2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
2828

2929
- name: Set up Python
30-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v5
3131
with:
3232
python-version: ${{ matrix.config.python }}
3333

@@ -54,14 +54,14 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
config:
57+
- {name: '3.13', os: ubuntu-latest, python: '3.13' }
58+
- {name: '3.12', os: ubuntu-latest, python: '3.12' }
5759
- {name: '3.11', os: ubuntu-latest, python: '3.11' }
5860
- {name: '3.10', os: ubuntu-latest, python: '3.10' }
5961
- {name: '3.9', os: ubuntu-latest, python: '3.9' }
60-
- {name: '3.8', os: ubuntu-latest, python: '3.8' }
61-
- {name: '3.7', os: ubuntu-latest, python: '3.7' }
6262

6363
steps:
64-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v4
6565
with:
6666
fetch-depth: 0
6767

@@ -72,12 +72,12 @@ jobs:
7272
sudo apt-get install -y libhdf5-dev libhdf5-serial-dev pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev libcurl4-openssl-dev ffmpeg
7373
7474
- name: Set up Python
75-
uses: actions/setup-python@v2
75+
uses: actions/setup-python@v5
7676
with:
7777
python-version: ${{ matrix.config.python }}
7878

7979
- name: Cache Python packages
80-
uses: actions/cache@v2
80+
uses: actions/cache@v4
8181
with:
8282
path: ${{ env.pythonLocation }}
8383
key: ${{runner.os}}-${{ matrix.config.python }}-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
@@ -88,24 +88,26 @@ jobs:
8888
cd Python
8989
python -m pip install --upgrade pip
9090
pip install -U wheel setuptools
91-
pip install -U --prefer-binary .[test]
91+
pip install -e .[test]
9292
python -c "import phate"
9393
94-
- name: Run tests
94+
- name: Run tests with coverage
9595
run: |
9696
cd Python
97-
nose2 -vvv
97+
pip install coverage pytest-cov
98+
pytest --cov=. --cov-report=lcov:coverage.lcov -vv
9899
99100
- name: Coveralls
100-
env:
101-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102-
COVERALLS_SERVICE_NAME: github
103-
run: |
104-
coveralls
101+
uses: coverallsapp/github-action@v2
102+
with:
103+
github-token: ${{ secrets.GITHUB_TOKEN }}
104+
path-to-lcov: Python/coverage.lcov
105+
continue-on-error: true
105106

106107
- name: Upload check results on fail
107108
if: failure()
108-
uses: actions/upload-artifact@master
109+
uses: actions/upload-artifact@v4
109110
with:
110111
name: ${{ matrix.config.name }}_results
111112
path: check
113+

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
language: python
22
python:
3-
- "3.5"
4-
- "3.6"
5-
- "3.7"
63
- "3.8"
74
- "3.9"
85
- "3.10"

Python/phate/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from .phate import PHATE
44
import phate.tree
5-
import phate.io
6-
import phate.preprocessing
75
import phate.mds
86
import phate.vne
97
import phate.plot

Python/phate/io.py

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

Python/phate/mds.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from deprecated import deprecated
1111

1212
import tasklogger
13-
import scprep
1413

1514
_logger = tasklogger.get_tasklogger("graphtools")
1615

@@ -74,7 +73,13 @@ def sgd(D, n_components=2, random_state=None, init=None):
7473
-------
7574
Y : array-like, embedded data [n_sample, ndim]
7675
"""
77-
return smacof(D=D, n_components=n_components, random_state=random_state, init=init, metric=True)
76+
return smacof(
77+
D=D,
78+
n_components=n_components,
79+
random_state=random_state,
80+
init=init,
81+
metric=True,
82+
)
7883

7984

8085
def smacof(

Python/phate/phate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def __init__(
179179
n_jobs=1,
180180
random_state=None,
181181
verbose=1,
182-
**kwargs
182+
**kwargs,
183183
):
184184
if "k" in kwargs:
185185
warnings.warn("k is deprecated. Please use knn in future.", FutureWarning)
@@ -835,7 +835,7 @@ def fit(self, X):
835835
n_jobs=self.n_jobs,
836836
verbose=self.verbose,
837837
random_state=self.random_state,
838-
**(self.kwargs)
838+
**(self.kwargs),
839839
)
840840

841841
# landmark op doesn't build unless forced

0 commit comments

Comments
 (0)