From fb283d5a74dcaf54a85bea67539ae7510d3e5429 Mon Sep 17 00:00:00 2001 From: ori-kron-wis Date: Mon, 13 Apr 2026 12:07:36 +0300 Subject: [PATCH] Updated with pre-commit fixes --- .editorconfig | 4 +-- .flake8 | 1 - .github/workflows/test.yml | 47 ++++++++++++++++---------------- README.md | 21 +++++++++----- docs/api/index.rst | 2 +- docs/extensions/typed_returns.py | 2 +- docs/release_notes/index.rst | 2 +- docs/release_notes/v0.1.0.rst | 2 +- pyproject.toml | 6 ++-- 9 files changed, 46 insertions(+), 41 deletions(-) diff --git a/.editorconfig b/.editorconfig index de025f3..e63add8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ import logging from rich.console import Console from rich.logging import RichHandler -from ._destvi_utils import +from ._destvi_utils import try: import importlib.metadata as importlib_metadata @@ -29,4 +29,4 @@ logger.addHandler(ch) # this prevents double outputs logger.propagate = False -__all__ = ["destvi_utils"] \ No newline at end of file +__all__ = ["destvi_utils"] diff --git a/.flake8 b/.flake8 index 460d241..1caef0c 100644 --- a/.flake8 +++ b/.flake8 @@ -2,4 +2,3 @@ ignore = E203, E266, E501, W503, W605, N812 exclude = .git,docs max-line-length = 119 - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d76492f..8a164ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,35 +11,34 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: matrix: python-version: [3.11, 3.12, 3.13] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - cache: "pip" - cache-dependency-path: "**/pyproject.toml" + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: "pip" + cache-dependency-path: "**/pyproject.toml" - - name: Install dependencies - run: | - pip install pytest-cov - pip install .[dev] - - name: Lint with flake8 - run: | - flake8 - - name: Format with black - run: | - black --check . - - name: Test with pytest - run: | - pytest --cov-report=xml --cov=destvi_utils - - name: After success - run: | - bash <(curl -s https://codecov.io/bash) - pip list + - name: Install dependencies + run: | + pip install pytest-cov + pip install .[dev] + - name: Lint with flake8 + run: | + flake8 + - name: Format with black + run: | + black --check . + - name: Test with pytest + run: | + pytest --cov-report=xml --cov=destvi_utils + - name: After success + run: | + bash <(curl -s https://codecov.io/bash) + pip list diff --git a/README.md b/README.md index 31d2f64..f3253ed 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,25 @@ [![codecov](https://codecov.io/gh/YosefLab/destvi_utils/branch/main/graph/badge.svg?token=BGI9Z8R11R)](https://codecov.io/gh/YosefLab/destvi_utils) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) -Implementation of the automatic pipeline for downstream analysis of DestVI's results. This small package will help generate scientific hypotheses via similar visualization techniques as in the original publication, [destVI](https://www.biorxiv.org/content/10.1101/2021.05.10.443517v1). +Implementation of the automatic pipeline for downstream analysis of DestVI's +results. This small package will help generate scientific hypotheses via similar +visualization techniques as in the original publication, +[destVI](https://www.biorxiv.org/content/10.1101/2021.05.10.443517v1). -# Basic installation +## Basic installation -``` +```bash pip install git+https://github.com/yoseflab/destvi_utils.git ``` -Please be sure to install a version of [PyTorch](https://pytorch.org/) that is compatible with your GPU (if applicable). +Please be sure to install a version of +[PyTorch](https://pytorch.org/) that is compatible with your GPU (if +applicable). -# Resources +## Resources -- API reference, and installation guides are available in +- API reference, and installation guides are available in the [documentation](https://destvi-utils.readthedocs.io/en/latest/). -- Please use the [issues](https://github.com/yoseflab/destvi_utils_/issues) to submit bug reports. +- Please use the + [issues](https://github.com/yoseflab/destvi_utils_/issues) to submit + bug reports. diff --git a/docs/api/index.rst b/docs/api/index.rst index 45fe654..3552665 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -14,4 +14,4 @@ destvi_utils automatic_proportion_threshold explore_gamma_space de_genes - plot_de_genes \ No newline at end of file + plot_de_genes diff --git a/docs/extensions/typed_returns.py b/docs/extensions/typed_returns.py index d4e1d26..56a8779 100644 --- a/docs/extensions/typed_returns.py +++ b/docs/extensions/typed_returns.py @@ -11,7 +11,7 @@ def process_return(lines): m = re.fullmatch(r"(?P\w+)\s+:\s+(?P[\w.]+)", line) if m: # Once this is in scanpydoc, we can use the fancy hover stuff - yield f'-{m["param"]} (:class:`~{m["type"]}`)' + yield f"-{m['param']} (:class:`~{m['type']}`)" else: yield line diff --git a/docs/release_notes/index.rst b/docs/release_notes/index.rst index ffffd7f..5a70257 100644 --- a/docs/release_notes/index.rst +++ b/docs/release_notes/index.rst @@ -9,4 +9,4 @@ Version 0.1 .. toctree:: :maxdepth: 2 - v0.1.0 \ No newline at end of file + v0.1.0 diff --git a/docs/release_notes/v0.1.0.rst b/docs/release_notes/v0.1.0.rst index 08d094d..c3acbdc 100644 --- a/docs/release_notes/v0.1.0.rst +++ b/docs/release_notes/v0.1.0.rst @@ -1,3 +1,3 @@ New in 0.1.0 (2022-04-02) ------------------------- -Initial release of the utilities functions. Complies with `scvi-tools>=0.15.0`. \ No newline at end of file +Initial release of the utilities functions. Complies with `scvi-tools>=0.15.0`. diff --git a/pyproject.toml b/pyproject.toml index 1030cc6..fc919d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,11 +33,11 @@ version = "0.2.0" adjustText = ">=0.7.1" anndata = ">=0.7.5" black = {version = ">=20.8b1", optional = true} -cmap2d = {git = "https://github.com/cane11/cmap2d", tag = "v1.0"} +cmap2d = {git = "https://github.com/cane11/cmap2d", tag = "master"} codecov = {version = ">=2.0.8", optional = true} flake8 = {version = ">=3.7.7", optional = true} gseapy = {version = ">=0.10.2"} -hotspot = {git = "https://github.com/YosefLab/Hotspot", tag = "v1.0"} +hotspotsc = {version = ">=1.0"} importlib-metadata = {version = "^1.0", python = "<3.8"} ipython = ">=7.1.1" isort = {version = ">=5.7", optional = true} @@ -55,7 +55,7 @@ python = ">=3.11.0,<4.0" igraph = {version = "*"} scanpy = ">=1.6,<2.0" scanpydoc = {version = ">=0.5", optional = true} -scvi-tools = {git = "https://github.com/scverse/scvi-tools", tag = "Ori-destvi_v2_2"} +scvi-tools = {version = ">=1.4.1"} sphinx = {version = ">=4.1,<4.4", optional = true} sphinx-autodoc-typehints = {version = "*", optional = true} sphinx-rtd-theme = {version = "*", optional = true}