Skip to content

Commit d7a8258

Browse files
committed
Fix test
2 parents d8890d1 + f53d6e8 commit d7a8258

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2274
-855
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.6.0
2+
current_version = 1.6.2
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Bug Report
33
about: Report a bug to help us improve Squidpy
44
title: ""
55
labels: bug
6-
assignees: "michalk8"
6+
assignees: ""
77
---
88

99
## Description

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Question
33
about: Ask a question about Squidpy
44
title:
55
labels: question
6-
assignees: "giovp"
6+
assignees:
77
---
88

99
<!-- Put your question regarding Squidpy below: -->

.github/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- release-ignore
5+
authors:
6+
- pre-commit-ci
7+
categories:
8+
- title: Added
9+
labels:
10+
- "release-added"
11+
- title: Changed
12+
labels:
13+
- "release-changed"
14+
- title: Deprecated
15+
labels:
16+
- "release-deprecated"
17+
- title: Removed
18+
labels:
19+
- "release-removed"
20+
- title: Fixed
21+
labels:
22+
- "release-fixed"
23+
- title: Security
24+
labels:
25+
- "release-security"
26+
- title: Other Changes
27+
labels:
28+
- "*"

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
submodules: true
18-
- name: Set up Python 3.9
18+
- name: Set up Python 3.11
1919
uses: actions/setup-python@v4
2020
with:
21-
python-version: 3.9
21+
python-version: 3.11
2222

2323
- uses: actions/cache@v3
2424
with:

.github/workflows/release.yml

Lines changed: 21 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,31 @@
11
name: Release
22

3-
on: create
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
6-
release:
7-
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
8+
package_and_release:
89
runs-on: ubuntu-latest
10+
if: startsWith(github.ref, 'refs/tags/v')
911
steps:
1012
- uses: actions/checkout@v3
11-
with:
12-
token: ${{ secrets.TOWNCRIER_TOKEN }}
13-
fetch-depth: 0
14-
submodules: true
15-
16-
- name: Set up Python 3.10
13+
- name: Set up Python 3.12
1714
uses: actions/setup-python@v4
1815
with:
19-
python-version: "3.10"
20-
21-
- name: Extract the tag
22-
id: vars
23-
run: |
24-
echo "::set-output name=tag::${GITHUB_REF##*/}"
25-
26-
- name: Check tag validity
27-
env:
28-
VERSION: ${{ steps.vars.outputs.tag }}
29-
run: |
30-
grep "^v[[:digit:]]\.[[:digit:]]\.[[:digit:]]$" <<< "$VERSION" || (echo "Invalid version: '$VERSION'" && exit 42)
31-
32-
- name: Install dependencies
33-
run: |
34-
sudo apt install pandoc
35-
python -m pip install --upgrade pip
36-
pip install tox bump2version
37-
pip install -e '.'
38-
39-
- name: Check generated docs
40-
run: |
41-
tox -e check-docs
42-
43-
- name: Bump the version
44-
# the part (patch) doesn't matter when supplying --new-version
45-
env:
46-
VERSION: ${{ steps.vars.outputs.tag }}
47-
run: |
48-
bump2version patch --no-commit --no-tag --verbose --new-version "${VERSION/v/}"
49-
50-
- name: Commit version bump
51-
uses: stefanzweifel/git-auto-commit-action@v4
52-
with:
53-
file_pattern: .bumpversion.cfg
54-
commit_user_name: CI
55-
commit_message: ${{ format('[auto][ci skip] Release {0}', steps.vars.outputs.tag) }}
56-
tagging_message: ${{ steps.vars.outputs.tag }}
57-
skip_dirty_check: false
58-
59-
# `Test` triggers `Deployment`
60-
# TODO(michalk8): can't find WD for `Test`
61-
- name: Invoke deployment workflow
62-
uses: benc-uk/workflow-dispatch@v1
16+
python-version: "3.12"
17+
cache: pip
18+
- name: Install build dependencies
19+
run: python -m pip install --upgrade pip wheel twine build
20+
- name: Build package
21+
run: python -m build
22+
- name: Check package
23+
run: twine check --strict dist/*.whl
24+
- name: Install hatch
25+
run: pip install hatch
26+
- name: Build project for distribution
27+
run: hatch build
28+
- name: Publish a Python distribution to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
6330
with:
64-
workflow: Deployment
65-
token: ${{ secrets.RELEASE_DISPATCH_TOKEN }}
66-
inputs: '{ "reason": "release" }'
31+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python: [3.9, "3.10", "3.11"]
23+
python: ["3.10", "3.11", "3.12"]
2424
os: [ubuntu-latest]
2525
include:
2626
- python: "3.12"
@@ -91,8 +91,19 @@ jobs:
9191
run: |
9292
tox -vv
9393
94+
- name: List figures for potential debugging
95+
ls -alh /home/runner/work/squidpy/squidpy/tests/figures
96+
97+
- name: Archive figures generated during testing
98+
if: always()
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: visual_test_results_${{ matrix.os }}-python${{ matrix.python }}
102+
path: /home/runner/work/squidpy/squidpy/tests/figures/*
103+
94104
- name: Upload coverage to Codecov
95-
uses: codecov/codecov-action@v3.1.1
105+
uses: codecov/codecov-action@v4
96106
with:
97107
name: coverage
98108
verbose: true
109+
token: ${{ secrets.CODECOV_TOKEN }} # required

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ __pycache__/
55

66
# C extensions
77
*.so
8+
*.pyc
89
.DS_Store
910
*/.DS_Store
1011
.idea

.mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[mypy]
22
mypy_path = squidpy
3-
python_version = 3.9
3+
python_version = 3.10
44
plugins = numpy.typing.mypy_plugin
55

66
ignore_errors = False

.pre-commit-config.yaml

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,25 @@
11
fail_fast: false
2-
default_language_version:
3-
python: python3
42
default_stages:
53
- commit
64
- push
75
minimum_pre_commit_version: 2.9.3
86
repos:
9-
- repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: v1.11.0
11-
hooks:
12-
- id: mypy
13-
additional_dependencies: [numpy, pandas, types-requests]
14-
exclude: .scripts/ci/download_data.py|squidpy/datasets/_(dataset|image).py # See https://github.com/pre-commit/mirrors-mypy/issues/33
15-
- repo: https://github.com/pre-commit/mirrors-prettier
16-
rev: v4.0.0-alpha.8
17-
hooks:
18-
- id: prettier
19-
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v4.6.0
21-
hooks:
22-
- id: detect-private-key
23-
- id: check-merge-conflict
24-
- id: check-ast
25-
- id: check-symlinks
26-
- id: check-added-large-files
27-
- id: check-executables-have-shebangs
28-
- id: fix-encoding-pragma
29-
args: [--remove]
30-
- id: end-of-file-fixer
31-
- id: mixed-line-ending
32-
args: [--fix=lf]
33-
- id: trailing-whitespace
34-
exclude: ^.bumpversion.cfg$
35-
- id: name-tests-test
36-
args: [--django]
37-
- id: check-case-conflict
38-
- id: check-docstring-first
39-
- id: check-yaml
40-
- id: check-toml
41-
- id: requirements-txt-fixer
42-
- repo: https://github.com/jumanjihouse/pre-commit-hooks
43-
rev: 3.0.0
44-
hooks:
45-
- id: script-must-have-extension
46-
name: Check executable files use .sh extension
47-
types: [shell, executable]
487
- repo: https://github.com/astral-sh/ruff-pre-commit
49-
rev: v0.5.4
8+
rev: v0.9.10
509
hooks:
5110
- id: ruff
5211
types_or: [python, pyi, jupyter]
5312
args: [--fix, --exit-non-zero-on-fix]
5413
- id: ruff-format
5514
types_or: [python, pyi, jupyter]
56-
- repo: https://github.com/pre-commit/pygrep-hooks
57-
rev: v1.10.0
15+
- repo: https://github.com/asottile/blacken-docs
16+
rev: 1.19.1
17+
hooks:
18+
- id: blacken-docs
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v1.15.0
5821
hooks:
59-
- id: python-no-eval
60-
- id: python-use-type-annotations
61-
- id: python-check-blanket-noqa
62-
- id: rst-backticks
63-
- id: rst-directive-colons
64-
- id: rst-inline-touching-normal
22+
- id: mypy
23+
additional_dependencies: [numpy, pandas, types-requests]
24+
exclude: .scripts/ci/download_data.py|squidpy/datasets/_(dataset|image).py # See https://github.com/
25+

0 commit comments

Comments
 (0)