diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30042e5..a75f736 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,29 +8,20 @@ on: push jobs: build: runs-on: self-hosted - strategy: - matrix: - python-version: - - 3.10.14 - - 3.11 - - 3.12 steps: - uses: actions/checkout@v4 - - name: Setup rye - uses: eifinger/setup-rye@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 with: enable-cache: true - version: '0.44.0' - - name: Pin Python version - run: rye pin ${{ matrix.python-version }} - name: Setup environment run: make .venv - name: Test with pytest run: make coverage.xml - name: Check formatting - run: rye fmt --check parafac2 + run: uv run ruff format --check parafac2 - name: Check linting - run: rye lint parafac2 + run: uv run ruff check parafac2 - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.gitignore b/.gitignore index 9a5bd0b..e3b3934 100644 --- a/.gitignore +++ b/.gitignore @@ -6,36 +6,6 @@ __pycache__/ # C extensions *.so -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - # Unit test / coverage reports htmlcov/ .tox/ @@ -160,6 +130,5 @@ cython_debug/ #.idea/ .DS_Store -requirements.lock -requirements-dev.lock +uv.lock .python-version diff --git a/makefile b/makefile index b4d5f12..f305b20 100644 --- a/makefile +++ b/makefile @@ -1,20 +1,20 @@ .PHONY: clean test pyright test: .venv - rye run pytest -s -v -x --durations=0 + uv run pytest -s -v -x --durations=0 .venv: pyproject.toml - rye sync + uv sync --dev testprofile: - rye run python3 -m cProfile -o profile -m pytest -s -x -v - rye run gprof2dot -f pstats --node-thres=1.0 profile | dot -Tsvg -o profile.svg + uv run python3 -m cProfile -o profile -m pytest -s -x -v + uv run gprof2dot -f pstats --node-thres=1.0 profile | dot -Tsvg -o profile.svg coverage.xml: .venv - rye run pytest --junitxml=junit.xml --cov=parafac2 --cov-report xml:coverage.xml + uv run pytest --junitxml=junit.xml --cov=parafac2 --cov-report xml:coverage.xml pyright: .venv - rye run pyright parafac2 + uv run pyright parafac2 clean: rm -rf output profile profile.svg diff --git a/pyproject.toml b/pyproject.toml index 6a22a06..a6b2e4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,24 +1,24 @@ [project] name = "parafac2" -version = "0.1.0" +version = "0.2.0" description = "An implementation of PARAFAC2 that handles sparsity for single cell data." authors = [{name = "Aaron Meyer", email = "git@asmlab.org" }] license = "MIT" -requires-python = ">= 3.11" +requires-python = ">= 3.12" dependencies = [ "numpy>=2.2", - "scipy>=1.15", + "scipy>=1.16", "tensorly>=0.8.1", "tqdm>=4.66", - "cupy-cuda12x>=13.4", - "anndata>=0.11", + "cupy-cuda12x>=13.6", + "anndata>=0.12", ] -[tool.rye] -managed = true -dev-dependencies = [ - "pytest>=8.3", +[dependency-groups] +dev = [ + "ruff>=0.14.1", + "pytest>=8.4", "pytest-cov>=6.1", "pyright>=1.1.380", ] @@ -48,3 +48,5 @@ select = [ # type checking "TC", ] + +