Skip to content

Commit c6575e2

Browse files
authored
Update template to v0.4.0 (#263)
Co-authored-by: scverse-bot <None>
1 parent 87801ac commit c6575e2

File tree

9 files changed

+173
-11
lines changed

9 files changed

+173
-11
lines changed

.cruft.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"template": "https://github.com/scverse/cookiecutter-scverse",
3-
"commit": "8e96abb5c3e2d5078c44713958da672711cf2a48",
4-
"checkout": "v0.3.0",
3+
"commit": "87a407a65408d75a949c0b54b19fd287475a56f8",
4+
"checkout": "v0.4.0",
55
"context": {
66
"cookiecutter": {
77
"project_name": "spatialdata-plot",
@@ -13,7 +13,8 @@
1313
"project_repo": "https://github.com/scverse/spatialdata-plot",
1414
"license": "BSD 3-Clause License",
1515
"_copy_without_render": [
16-
".github/workflows/**.yaml",
16+
".github/workflows/build.yaml",
17+
".github/workflows/test.yaml",
1718
"docs/_templates/autosummary/**.rst"
1819
],
1920
"_render_devdocs": false,

.github/workflows/release.yaml.rej

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff a/.github/workflows/release.yaml b/.github/workflows/release.yaml (rejected hunks)
2+
@@ -11,7 +11,7 @@ jobs:
3+
runs-on: ubuntu-latest
4+
environment:
5+
name: pypi
6+
- url: https://pypi.org/p/{{ cookiecutter.package_name }}
7+
+ url: https://pypi.org/p/spatialdata_plot
8+
permissions:
9+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
10+
steps:

.github/workflows/test.yaml.rej

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff a/.github/workflows/test.yaml b/.github/workflows/test.yaml (rejected hunks)
2+
@@ -24,11 +24,11 @@ jobs:
3+
matrix:
4+
include:
5+
- os: ubuntu-latest
6+
- python: "3.9"
7+
+ python: "3.10"
8+
- os: ubuntu-latest
9+
- python: "3.11"
10+
+ python: "3.12"
11+
- os: ubuntu-latest
12+
- python: "3.11"
13+
+ python: "3.12"
14+
pip-flags: "--pre"
15+
name: PRE-RELEASE DEPENDENCIES
16+

.gitignore.rej

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
diff a/.gitignore b/.gitignore (rejected hunks)
2+
@@ -18,6 +18,7 @@ __pycache__/
3+
/.pytest_cache/
4+
/.cache/
5+
/data/
6+
+/node_modules/
7+
8+
# docs
9+
/docs/generated/

.pre-commit-config.yaml.rej

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
2+
@@ -6,29 +6,18 @@ default_stages:
3+
- push
4+
minimum_pre_commit_version: 2.16.0
5+
repos:
6+
- - repo: https://github.com/psf/black
7+
- rev: "24.4.2"
8+
- hooks:
9+
- - id: black
10+
- - repo: https://github.com/asottile/blacken-docs
11+
- rev: 1.16.0
12+
- hooks:
13+
- - id: blacken-docs
14+
- repo: https://github.com/pre-commit/mirrors-prettier
15+
rev: v4.0.0-alpha.8
16+
hooks:
17+
- id: prettier
18+
- # Newer versions of node don't work on systems that have an older version of GLIBC
19+
- # (in particular Ubuntu 18.04 and Centos 7)
20+
- # EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
21+
- # See https://github.com/scverse/cookiecutter-scverse/issues/143 and
22+
- # https://github.com/jupyterlab/jupyterlab/issues/12675
23+
- language_version: "17.9.1"
24+
- repo: https://github.com/astral-sh/ruff-pre-commit
25+
rev: v0.4.4
26+
hooks:
27+
- id: ruff
28+
+ types_or: [python, pyi, jupyter]
29+
args: [--fix, --exit-non-zero-on-fix]
30+
+ - id: ruff-format
31+
+ types_or: [python, pyi, jupyter]
32+
- repo: https://github.com/pre-commit/pre-commit-hooks
33+
rev: v4.6.0
34+
hooks:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ For more information on the `spatialdata-plot` library, please refer to the [doc
3131

3232
## Installation
3333

34-
You need to have Python 3.9 or newer installed on your system. If you don't have
34+
You need to have Python 3.10 or newer installed on your system. If you don't have
3535
Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).
3636

3737
There are several alternative options to install spatialdata-plot:

docs/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration file for the Sphinx documentation builder.
2-
#
2+
33
# This file only contains a selection of the most common options. For a full
44
# list see the documentation:
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
@@ -37,10 +37,10 @@
3737

3838
html_context = {
3939
"display_github": True, # Integrate GitHub
40-
"github_user": "scverse", # Username
41-
"github_repo": project_name, # Repo name
42-
"github_version": "main", # Version
43-
"conf_py_path": "/docs/", # Path in the checkout to the docs root
40+
"github_user": "scverse",
41+
"github_repo": "https://github.com/scverse/spatialdata-plot",
42+
"github_version": "main",
43+
"conf_py_path": "/docs/",
4444
}
4545

4646
# -- General configuration ---------------------------------------------------

docs/contributing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ and [prettier][prettier-editors].
5151
## Writing tests
5252

5353
```{note}
54-
Remember to first install the package with `pip install '-e[dev,test]'`
54+
Remember to first install the package with `pip install -e '.[dev,test]'`
5555
```
5656

5757
This package uses the [pytest][] for automated testing. Please [write tests][scanpy-test-docs] for every function added
@@ -93,7 +93,7 @@ Before making a release, you need to update the version number in the `pyproject
9393
> Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
9494
9595
Once you are done, commit and push your changes and navigate to the "Releases" page of this project on GitHub.
96-
Specify `vX.X.X` as a tag name and create a release. For more information, see [managing Github releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI.
96+
Specify `vX.X.X` as a tag name and create a release. For more information, see [managing GitHub releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI.
9797

9898
## Writing documentation
9999

@@ -157,3 +157,4 @@ open _build/html/index.html
157157
[numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html
158158
[sphinx autodoc typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints
159159
[pypi]: https://pypi.org/
160+
[managing GitHub releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

pyproject.toml.rej

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
diff a/pyproject.toml b/pyproject.toml (rejected hunks)
2+
@@ -7,7 +7,7 @@ name = "spatialdata-plot"
3+
version = "0.0.1"
4+
description = "A very interesting piece of code"
5+
readme = "README.md"
6+
-requires-python = ">=3.9"
7+
+requires-python = ">=3.10"
8+
license = {file = "LICENSE"}
9+
authors = [
10+
{name = "scverse"},
11+
@@ -21,19 +21,19 @@ urls.Home-page = "https://github.com/scverse/spatialdata-plot"
12+
dependencies = [
13+
"anndata",
14+
# for debug logging (referenced from the issue template)
15+
- "session-info"
16+
+ "session-info",
17+
]
18+
19+
[project.optional-dependencies]
20+
dev = [
21+
"pre-commit",
22+
- "twine>=4.0.2"
23+
+ "twine>=4.0.2",
24+
]
25+
doc = [
26+
"docutils>=0.8,!=0.18.*,!=0.19.*",
27+
"sphinx>=4",
28+
"sphinx-book-theme>=1.0.0",
29+
- "myst-nb",
30+
+ "myst-nb>=1.1.0",
31+
"sphinxcontrib-bibtex>=1.0.0",
32+
"sphinx-autodoc-typehints",
33+
"sphinxext-opengraph",
34+
@@ -61,12 +61,15 @@ addopts = [
35+
"--import-mode=importlib", # allow using test files with same name
36+
]
37+
38+
-[tool.black]
39+
-line-length = 120
40+
-
41+
[tool.ruff]
42+
-src = ["src"]
43+
line-length = 120
44+
+src = ["src"]
45+
+extend-include = ["*.ipynb"]
46+
+
47+
+[tool.ruff.format]
48+
+docstring-code-format = true
49+
+
50+
+[tool.ruff.lint]
51+
select = [
52+
"F", # Errors detected by Pyflakes
53+
"E", # Error detected by Pycodestyle
54+
@@ -81,7 +84,7 @@ select = [
55+
"RUF100", # Report unused noqa directives
56+
]
57+
ignore = [
58+
- # line too long -> we accept long comment lines; black gets rid of long code lines
59+
+ # line too long -> we accept long comment lines; formatter gets rid of long code lines
60+
"E501",
61+
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
62+
"E731",
63+
@@ -95,7 +98,7 @@ ignore = [
64+
"D107",
65+
# Errors from function calls in argument defaults. These are fine when the result is immutable.
66+
"B008",
67+
- # __magic__ methods are are often self-explanatory, allow missing docstrings
68+
+ # __magic__ methods are often self-explanatory, allow missing docstrings
69+
"D105",
70+
# first line should end with a period [Bug: doesn't work with single-line docstrings]
71+
"D400",
72+
@@ -108,10 +111,10 @@ ignore = [
73+
"D213",
74+
]
75+
76+
-[tool.ruff.pydocstyle]
77+
+[tool.ruff.lint.pydocstyle]
78+
convention = "numpy"
79+
80+
-[tool.ruff.per-file-ignores]
81+
+[tool.ruff.lint.per-file-ignores]
82+
"docs/*" = ["I"]
83+
"tests/*" = ["D"]
84+
"*/__init__.py" = ["F401"]
85+
@@ -125,5 +128,5 @@ skip = [
86+
"docs/changelog.md",
87+
"docs/references.bib",
88+
"docs/references.md",
89+
- "docs/notebooks/example.ipynb"
90+
+ "docs/notebooks/example.ipynb",
91+
]

0 commit comments

Comments
 (0)