Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
fail-fast: false
matrix:
config:
- {name: 'current', os: ubuntu-latest, python: '3.8' }
- {name: 'current', os: ubuntu-latest, python: '3.9' }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}

Expand All @@ -54,14 +54,14 @@ jobs:
fail-fast: false
matrix:
config:
- {name: '3.13', os: ubuntu-latest, python: '3.13' }
- {name: '3.12', os: ubuntu-latest, python: '3.12' }
- {name: '3.11', os: ubuntu-latest, python: '3.11' }
- {name: '3.10', os: ubuntu-latest, python: '3.10' }
- {name: '3.9', os: ubuntu-latest, python: '3.9' }
- {name: '3.8', os: ubuntu-latest, python: '3.8' }
- {name: '3.7', os: ubuntu-latest, python: '3.7' }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -72,12 +72,12 @@ jobs:
sudo apt-get install -y libhdf5-dev libhdf5-serial-dev pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev libcurl4-openssl-dev ffmpeg

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}

- name: Cache Python packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{runner.os}}-${{ matrix.config.python }}-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
Expand All @@ -88,24 +88,26 @@ jobs:
cd Python
python -m pip install --upgrade pip
pip install -U wheel setuptools
pip install -U --prefer-binary .[test]
pip install -e .[test]
python -c "import phate"

- name: Run tests
- name: Run tests with coverage
run: |
cd Python
nose2 -vvv
pip install coverage pytest-cov
pytest --cov=. --cov-report=lcov:coverage.lcov -vv

- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: Python/coverage.lcov
continue-on-error: true

- name: Upload check results on fail
if: failure()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.name }}_results
path: check

3 changes: 0 additions & 3 deletions .travis.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not need to test in python 3.11+ ?

Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: python
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
2 changes: 0 additions & 2 deletions Python/phate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from .phate import PHATE
import phate.tree
import phate.io
import phate.preprocessing
import phate.mds
import phate.vne
import phate.plot
Expand Down
12 changes: 0 additions & 12 deletions Python/phate/io.py

This file was deleted.

9 changes: 7 additions & 2 deletions Python/phate/mds.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from deprecated import deprecated

import tasklogger
import scprep

_logger = tasklogger.get_tasklogger("graphtools")

Expand Down Expand Up @@ -74,7 +73,13 @@ def sgd(D, n_components=2, random_state=None, init=None):
-------
Y : array-like, embedded data [n_sample, ndim]
"""
return smacof(D=D, n_components=n_components, random_state=random_state, init=init, metric=True)
return smacof(
D=D,
n_components=n_components,
random_state=random_state,
init=init,
metric=True,
)


def smacof(
Expand Down
4 changes: 2 additions & 2 deletions Python/phate/phate.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(
n_jobs=1,
random_state=None,
verbose=1,
**kwargs
**kwargs,
):
if "k" in kwargs:
warnings.warn("k is deprecated. Please use knn in future.", FutureWarning)
Expand Down Expand Up @@ -835,7 +835,7 @@ def fit(self, X):
n_jobs=self.n_jobs,
verbose=self.verbose,
random_state=self.random_state,
**(self.kwargs)
**(self.kwargs),
)

# landmark op doesn't build unless forced
Expand Down
Loading
Loading