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
67 changes: 42 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: hotspot

on:
Expand All @@ -9,30 +6,50 @@ on:
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0} # -e to fail on error

strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
python: ["3.10", "3.11", "3.12"]

name: Integration

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-v1-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-v1-
- name: Install dependencies
run: |
pip install .[test]
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"

- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel

- name: Install dependencies
run: |
pip install ".[test]"

- name: Test
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --color=yes
16 changes: 10 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
build:
image: latest
os: ubuntu-20.04
tools:
python: "3.11"
sphinx:
configuration: docs/source/conf.py
# disable this for more lenient docs builds
fail_on_warning: false
python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- method: pip
path: .
extra_requirements:
- docs
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'nbsphinx',
'myst_nb',
]

#autodoc settings
Expand All @@ -64,6 +64,7 @@
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
nb_execution_mode = "off"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -90,7 +91,6 @@

# nbsphinx specific settings
exclude_patterns = ["_build", "**.ipynb_checkpoints"]
nbsphinx_execute = "never"


# -- Options for HTML output -------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ python = ">=3.7,<4.0"
pynndescent = ">=0.5"
anndata = ">=0.7"
sphinx-book-theme = {version= ">=0.2.0", optional = true}
nbsphinx = {version = "*", optional = true}
myst-nb = {version = "*", optional = true}
sphinx = {version = ">=4.1", optional = true}
ipython = {version = "*", optional = true}
scanpy = {version = "*", optional = true}


[tool.poetry.extras]
test = ["pytest", "scanpy"]
docs=["sphinx-book-theme", "nbsphinx", "sphinx", "ipython"]
docs=["sphinx-book-theme", "myst-nb", "sphinx", "ipython"]

[tool.poetry.dev-dependencies]

Expand Down