Skip to content
Closed
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
8 changes: 0 additions & 8 deletions .bumpversion.cfg

This file was deleted.

27 changes: 7 additions & 20 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,17 @@ jobs:
PYTHON: ${{ matrix.python }}

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

- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Restore pip cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-${{ env.pythonLocation }}-
- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel
pip install pytest-cov
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install --pre -e ".[dev,test]"
python -m pip install --upgrade "pip>=25.1" wheel
python -m pip install -e . --group test

- name: Download artifact of test data
if: matrix.python == '3.13'
Expand All @@ -65,7 +52,7 @@ jobs:
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --cov --color=yes --cov-report=xml
python -m pytest -v --cov --color=yes --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
27 changes: 0 additions & 27 deletions .mypy.ini

This file was deleted.

11 changes: 1 addition & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ default_stages:
- pre-push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.3
hooks:
- id: prettier
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.2
Expand All @@ -26,11 +22,6 @@ repos:
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-ast
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- id: check-case-conflict
- repo: local
hooks:
Expand Down
23 changes: 12 additions & 11 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.12"
os: ubuntu-24.04
tools:
python: "3.12"

sphinx:
configuration: docs/conf.py
fail_on_warning: true
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- method: pip
path: .
extra_requirements:
- doc
- pre
install:
- method: uv
command: sync
groups:
- doc
69 changes: 51 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ dependencies = [
"xmltodict",
]

[project.optional-dependencies]
[dependency-groups]
dev = [
# CLI for bumping the version number
"bump2version",
"pre-commit"
"pre-commit",
]

doc = [
"sphinx>=4.5,<9",
"sphinx-book-theme>=1.0.0",
Expand All @@ -53,22 +52,15 @@ doc = [
"sphinx-autodoc-typehints",
"sphinx-design",
"sphinx-click",
# For notebooks
"ipython>=8.6.0",
"sphinx-copybutton",
]

test = [
"pytest",
"pytest-cov",
# https://github.com/scverse/spatialdata-io/issues/334
"pyarrow!=22",
"pytest-mock"
]
# this will be used by readthedocs and will make pip also look for pre-releases, generally installing the latest available version
# update: readthedocs doens't seem to try to install pre-releases even if when trying to install the pre optional-dependency. For
# the moment, if needed, let's add the latest pre-release explicitly here.
pre = [
"spatialdata>=0.7.3a0"
"pytest-mock",
]

[tool.coverage.run]
Expand All @@ -85,7 +77,9 @@ addopts = [
]

[tool.ruff]
target-version = "py311"
line-length = 120
indent-width = 4
exclude = [
".git",
".tox",
Expand All @@ -95,7 +89,9 @@ exclude = [
"dist",
"setup.py",
]
lint.select = [

[tool.ruff.lint]
select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
"W", # Warning detected by Pycodestyle
Expand All @@ -112,7 +108,7 @@ lint.select = [
# "PTH", # Use pathlib
# "S" # Security
]
lint.ignore = [
ignore = [
# Do not catch blind exception: `Exception`
"BLE001",
# Errors from function calls in argument defaults. These are fine when the result is immutable.
Expand Down Expand Up @@ -140,7 +136,7 @@ lint.ignore = [
# Missing docstring in __init__
"D107",
## Disable one in each pair of mutually incompatible rules
# We dont want a blank line before a class docstring
# We don't want a blank line before a class docstring
"D203",
# 1 blank line required after class docstring
"D204",
Expand Down Expand Up @@ -186,11 +182,48 @@ lint.ignore = [
# Unused imports
"F401",
]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.per-file-ignores]
"src/spatialdata_io/__init__.py" = ["I001"]

[tool.jupytext]
formats = "ipynb,md"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"

[tool.mypy]
python_version = "3.11"

ignore_errors = false
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true

disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_any_generics = true

strict_optional = true
strict_equality = true
warn_return_any = true
warn_unreachable = false
check_untyped_defs = true

# because of docrep
allow_untyped_decorators = true

no_implicit_optional = true
no_implicit_reexport = true
no_warn_no_return = true

show_error_codes = true
show_column_numbers = true
error_summary = true


[tool.hatch.metadata]
allow-direct-references = true
Expand Down
Loading