Skip to content

Commit

Permalink
Add Python 3.12 to test, remove 3.8 (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
flying-sheep and pre-commit-ci[bot] authored Oct 31, 2023
1 parent 9733551 commit 1374e74
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ jobs:
fail-fast: false
matrix:
config:
- { name: "3.12", os: ubuntu-latest, python: "3.12", r: release }
- { name: "3.11", os: ubuntu-latest, python: "3.11", r: release }
- { name: "3.10", os: ubuntu-latest, python: "3.10", r: release }
- { name: "3.9", os: ubuntu-latest, python: "3.9", r: release }
- { name: "3.8", os: ubuntu-latest, python: "3.8", r: oldrel }
- { name: "3.9", os: ubuntu-latest, python: "3.9", r: oldrel }

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

- name: Install system dependencies
if: runner.os == 'Linux'
Expand Down Expand Up @@ -72,6 +73,8 @@ jobs:
packages: |
bioc::SingleCellExperiment
bioc::scRNAseq
bioc::BiocFileCache@2.10.1
# BiocFileCache because of https://github.com/Bioconductor/AnnotationHub/issues/46

- name: Install anndata2ri
run: |
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ urls.'Documentation' = 'https://icb-anndata2ri.readthedocs-hosted.com/'
urls.'Source Code' = 'https://github.com/theislab/anndata2ri'
urls.'Issue Tracker' = 'https://github.com/theislab/anndata2ri/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc'
dynamic = ['version']
requires-python = '>= 3.8'
requires-python = '>= 3.9'
dependencies = [
'rpy2 >= 3.5.2', # first with get_conversion
'tzlocal', # for pandas2ri
Expand All @@ -36,7 +36,6 @@ doc = [
'sphinx>=3.0',
'scanpydoc[theme,typehints]',
'lxml', # For scraping the R link info
'importlib_resources; python_version < "3.9"',
]

[tool.hatch.version]
Expand All @@ -52,7 +51,7 @@ features = ['doc']
build = 'sphinx-build -M html docs docs/_build'

[[tool.hatch.envs.test.matrix]]
python = ['3.8', '3.9', '3.10', '3.11']
python = ['3.9', '3.10', '3.11', '3.12']
[tool.hatch.envs.test]
features = ['test']
[tool.hatch.envs.test.scripts]
Expand Down
7 changes: 1 addition & 6 deletions src/anndata2ri/scipy2ri/_py2r.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
from __future__ import annotations

from functools import lru_cache, wraps
from importlib.resources import files
from typing import TYPE_CHECKING


try:
from importlib.resources import files
except ImportError: # Python < 3.9
from importlib_resources import files

import numpy as np
from rpy2.robjects import default_converter, numpy2ri
from rpy2.robjects.conversion import localconverter
Expand Down
4 changes: 2 additions & 2 deletions src/anndata2ri/scipy2ri/_support.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from functools import lru_cache
from functools import cache
from typing import TYPE_CHECKING, Literal, get_args


Expand All @@ -15,7 +15,7 @@
supported_r_matrix_storage: frozenset[SupportedMatStor] = frozenset(get_args(SupportedMatStor))


@lru_cache(maxsize=None)
@cache
def supported_r_matrix_classes(
types: Iterable[SupportedMatType] | SupportedMatType = supported_r_matrix_types,
storage: Iterable[SupportedMatStor] | SupportedMatStor = supported_r_matrix_storage,
Expand Down

0 comments on commit 1374e74

Please sign in to comment.