Skip to content

Commit 1614b9a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 420d34c commit 1614b9a

File tree

5 files changed

+157
-157
lines changed

5 files changed

+157
-157
lines changed

.github/codecov.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Based on pydata/xarray
22
codecov:
3-
require_ci_to_pass: false
3+
require_ci_to_pass: false
44

55
coverage:
6-
status:
7-
project:
8-
default:
9-
# Require 1% coverage, i.e., always succeed
10-
target: 1
11-
patch: false
12-
changes: false
6+
status:
7+
project:
8+
default:
9+
# Require 1% coverage, i.e., always succeed
10+
target: 1
11+
patch: false
12+
changes: false
1313

1414
comment:
15-
layout: "diff, flags, files"
16-
behavior: once
17-
require_base: false
15+
layout: "diff, flags, files"
16+
behavior: once
17+
require_base: false
1818

1919
fixes:
20-
- "/spatialdata-plot/spatialdata-plot/::spatialdata-plot/src/spatialdat_plot/"
20+
- "/spatialdata-plot/spatialdata-plot/::spatialdata-plot/src/spatialdat_plot/"

.github/workflows/build.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Check Build
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
jobs:
10-
package:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python 3.10
15-
uses: actions/setup-python@v2
16-
with:
17-
python-version: "3.10"
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
10+
package:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
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
Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
11
name: Test
22

33
on:
4-
push:
5-
branches: [main]
6-
tags:
7-
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
8-
pull_request:
9-
branches: [main]
4+
push:
5+
branches: [main]
6+
tags:
7+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
8+
pull_request:
9+
branches: [main]
1010

1111
jobs:
12-
test:
13-
runs-on: ${{ matrix.os }}
14-
defaults:
15-
run:
16-
shell: bash -e {0} # -e to fail on error
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
defaults:
15+
run:
16+
shell: bash -e {0} # -e to fail on error
1717

18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
python: ["3.9", "3.10"]
22-
os: [ubuntu-latest]
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python: ["3.9", "3.10"]
22+
os: [ubuntu-latest]
2323

24-
env:
25-
OS: ${{ matrix.os }}
26-
PYTHON: ${{ matrix.python }}
24+
env:
25+
OS: ${{ matrix.os }}
26+
PYTHON: ${{ matrix.python }}
2727

28-
steps:
29-
- uses: actions/checkout@v3
30-
- name: Set up Python ${{ matrix.python }}
31-
uses: actions/setup-python@v3
32-
with:
33-
python-version: ${{ matrix.python }}
28+
steps:
29+
- uses: actions/checkout@v3
30+
- name: Set up Python ${{ matrix.python }}
31+
uses: actions/setup-python@v3
32+
with:
33+
python-version: ${{ matrix.python }}
3434

35-
- name: Get pip cache dir
36-
id: pip-cache-dir
37-
run: |
38-
echo "::set-output name=dir::$(pip cache dir)"
39-
- name: Restore pip cache
40-
uses: actions/cache@v3
41-
with:
42-
path: ${{ steps.pip-cache-dir.outputs.dir }}
43-
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
44-
restore-keys: |
45-
pip-${{ runner.os }}-${{ env.pythonLocation }}-
46-
- name: Install test dependencies
47-
run: |
48-
python -m pip install --upgrade pip wheel
49-
pip install pytest-cov
50-
- name: Install dependencies
51-
run: |
52-
pip install -e ".[dev,test]"
53-
- name: Test
54-
env:
55-
MPLBACKEND: agg
56-
PLATFORM: ${{ matrix.os }}
57-
DISPLAY: :42
58-
run: |
59-
pytest -v --cov --color=yes --cov-report=xml
60-
# - name: Generate GH action "groundtruth" figures as artifacts, uncomment if needed
61-
# if: always()
62-
# uses: actions/upload-artifact@v3
63-
# with:
64-
# name: groundtruth-figures
65-
# path: /home/runner/work/spatialdata-plot/spatialdata-plot/tests/_images/*
66-
- name: Archive figures generated during testing
67-
if: always()
68-
uses: actions/upload-artifact@v3
69-
with:
70-
name: plotting-results
71-
path: /home/runner/work/spatialdata-plot/spatialdata-plot/tests/figures/*
72-
- name: Upload coverage to Codecov
73-
uses: codecov/codecov-action@v3
74-
with:
75-
token: ${{ secrets.CODECOV_TOKEN }}
76-
fail_ci_if_error: true # optional (default = false)
77-
verbose: true # optional (default = false)
78-
deploy:
79-
# this will run when you have tagged a commit, starting with "v*"
80-
# and requires that you have put your twine API key in your
81-
# github secrets (see readme for details)
82-
needs: [test]
83-
runs-on: ubuntu-latest
84-
if: contains(github.ref, 'tags')
85-
steps:
86-
- name: Checkout code
87-
uses: actions/checkout@v3
35+
- name: Get pip cache dir
36+
id: pip-cache-dir
37+
run: |
38+
echo "::set-output name=dir::$(pip cache dir)"
39+
- name: Restore pip cache
40+
uses: actions/cache@v3
41+
with:
42+
path: ${{ steps.pip-cache-dir.outputs.dir }}
43+
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
44+
restore-keys: |
45+
pip-${{ runner.os }}-${{ env.pythonLocation }}-
46+
- name: Install test dependencies
47+
run: |
48+
python -m pip install --upgrade pip wheel
49+
pip install pytest-cov
50+
- name: Install dependencies
51+
run: |
52+
pip install -e ".[dev,test]"
53+
- name: Test
54+
env:
55+
MPLBACKEND: agg
56+
PLATFORM: ${{ matrix.os }}
57+
DISPLAY: :42
58+
run: |
59+
pytest -v --cov --color=yes --cov-report=xml
60+
# - name: Generate GH action "groundtruth" figures as artifacts, uncomment if needed
61+
# if: always()
62+
# uses: actions/upload-artifact@v3
63+
# with:
64+
# name: groundtruth-figures
65+
# path: /home/runner/work/spatialdata-plot/spatialdata-plot/tests/_images/*
66+
- name: Archive figures generated during testing
67+
if: always()
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: plotting-results
71+
path: /home/runner/work/spatialdata-plot/spatialdata-plot/tests/figures/*
72+
- name: Upload coverage to Codecov
73+
uses: codecov/codecov-action@v3
74+
with:
75+
token: ${{ secrets.CODECOV_TOKEN }}
76+
fail_ci_if_error: true # optional (default = false)
77+
verbose: true # optional (default = false)
78+
deploy:
79+
# this will run when you have tagged a commit, starting with "v*"
80+
# and requires that you have put your twine API key in your
81+
# github secrets (see readme for details)
82+
needs: [test]
83+
runs-on: ubuntu-latest
84+
if: contains(github.ref, 'tags')
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v3
8888

89-
- name: Set up Python 3.10
90-
uses: actions/setup-python@v4
91-
with:
92-
python-version: "3.10"
89+
- name: Set up Python 3.10
90+
uses: actions/setup-python@v4
91+
with:
92+
python-version: "3.10"
9393

94-
- name: Install hatch
95-
run: pip install hatch
94+
- name: Install hatch
95+
run: pip install hatch
9696

97-
- name: Build project for distribution
98-
run: hatch build
97+
- name: Build project for distribution
98+
run: hatch build
9999

100-
- name: Publish a Python distribution to PyPI
101-
uses: pypa/gh-action-pypi-publish@release/v1
102-
with:
103-
password: ${{ secrets.PYPI_API_TOKEN }}
100+
- name: Publish a Python distribution to PyPI
101+
uses: pypa/gh-action-pypi-publish@release/v1
102+
with:
103+
password: ${{ secrets.PYPI_API_TOKEN }}

.pre-commit-config.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
fail_fast: false
22
default_language_version:
3-
python: python3
3+
python: python3
44
default_stages:
5-
- commit
6-
- push
5+
- commit
6+
- push
77
minimum_pre_commit_version: 2.16.0
88
ci:
9-
skip: []
9+
skip: []
1010
repos:
11-
- repo: https://github.com/psf/black
12-
rev: 23.11.0
13-
hooks:
14-
- id: black
15-
- repo: https://github.com/pre-commit/mirrors-prettier
16-
rev: v3.1.0
17-
hooks:
18-
- id: prettier
19-
- repo: https://github.com/asottile/blacken-docs
20-
rev: 1.16.0
21-
hooks:
22-
- id: blacken-docs
23-
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.7.0
25-
hooks:
26-
- id: mypy
27-
additional_dependencies: [numpy, types-requests]
28-
exclude: tests/|docs/
29-
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.1.6
31-
hooks:
32-
- id: ruff
33-
args: [--fix, --exit-non-zero-on-fix]
11+
- repo: https://github.com/psf/black
12+
rev: 23.11.0
13+
hooks:
14+
- id: black
15+
- repo: https://github.com/pre-commit/mirrors-prettier
16+
rev: v3.1.0
17+
hooks:
18+
- id: prettier
19+
- repo: https://github.com/asottile/blacken-docs
20+
rev: 1.16.0
21+
hooks:
22+
- id: blacken-docs
23+
- repo: https://github.com/pre-commit/mirrors-mypy
24+
rev: v1.7.0
25+
hooks:
26+
- id: mypy
27+
additional_dependencies: [numpy, types-requests]
28+
exclude: tests/|docs/
29+
- repo: https://github.com/astral-sh/ruff-pre-commit
30+
rev: v0.1.6
31+
hooks:
32+
- id: ruff
33+
args: [--fix, --exit-non-zero-on-fix]

.readthedocs.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# https://docs.readthedocs.io/en/stable/config-file/v2.html
22
version: 2
33
build:
4-
os: ubuntu-20.04
5-
tools:
6-
python: "3.10"
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.10"
77
sphinx:
8-
configuration: docs/conf.py
9-
fail_on_warning: false
8+
configuration: docs/conf.py
9+
fail_on_warning: false
1010
python:
11-
install:
12-
- method: pip
13-
path: .
14-
extra_requirements:
15-
- docs
11+
install:
12+
- method: pip
13+
path: .
14+
extra_requirements:
15+
- docs

0 commit comments

Comments
 (0)