Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update template to v0.4.0 #40

Merged
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "586b1652162ff7994b0070a034023d64289ae416",
"checkout": "v0.3.1",
"commit": "87a407a65408d75a949c0b54b19fd287475a56f8",
"checkout": "v0.4.0",
"context": {
"cookiecutter": {
"project_name": "cellcharter",
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff a/.github/workflows/test.yaml b/.github/workflows/test.yaml (rejected hunks)
@@ -24,11 +24,11 @@ jobs:
matrix:
include:
- os: ubuntu-latest
- python: "3.9"
+ python: "3.10"
- os: ubuntu-latest
- python: "3.11"
+ python: "3.12"
- os: ubuntu-latest
- python: "3.11"
+ python: "3.12"
pip-flags: "--pre"
name: PRE-RELEASE DEPENDENCIES

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ __pycache__/
/.pytest_cache/
/.cache/
/data/
/node_modules/

# docs
/docs/generated/
Expand Down
4 changes: 2 additions & 2 deletions README.md.rej
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ diff a/README.md b/README.md (rejected hunks)

## Installation

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

There are several alternative options to install cellcharter:
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration file for the Sphinx documentation builder.
#

# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
Expand Down
28 changes: 13 additions & 15 deletions docs/conf.py.rej
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
diff a/docs/conf.py b/docs/conf.py (rejected hunks)
@@ -16,12 +16,15 @@ sys.path.insert(0, str(HERE / "extensions"))
@@ -36,10 +36,10 @@ needs_sphinx = "4.0"

# -- Project information -----------------------------------------------------
html_context = {
"display_github": True, # Integrate GitHub
- "github_user": "marcovarrone", # Username
- "github_repo": project_name, # Repo name
- "github_version": "main", # Version
- "conf_py_path": "/docs/", # Path in the checkout to the docs root
+ "github_user": "marcovarrone",
+ "github_repo": "https://github.com/marcovarrone/cellcharter",
+ "github_version": "main",
+ "conf_py_path": "/docs/",
}

+# NOTE: If you installed your project in editable mode, this might be stale.
+# If this is the case, reinstall it to refresh the metadata
info = metadata("cellcharter")
project_name = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
version = info["Version"]
-repository_url = f"https://github.com/marcovarrone/{project_name}"
+urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
+repository_url = urls["Source"]

# The full version, including alpha/beta/rc tags
release = info["Version"]
# -- General configuration ---------------------------------------------------
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ and [prettier][prettier-editors].
## Writing tests

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

This package uses the [pytest][] for automated testing. Please [write tests][scanpy-test-docs] for every function added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ doc = [
"docutils>=0.8,!=0.18.*,!=0.19.*",
"sphinx>=4",
"sphinx-book-theme>=1.0.0",
"myst-nb",
"myst-nb>=1.1.0",
"sphinxcontrib-bibtex>=1.0.0",
"sphinx-autodoc-typehints",
"sphinxext-opengraph",
Expand Down
83 changes: 18 additions & 65 deletions pyproject.toml.rej
Original file line number Diff line number Diff line change
@@ -1,66 +1,19 @@
diff a/pyproject.toml b/pyproject.toml (rejected hunks)
@@ -21,13 +21,13 @@ urls.Home-page = "https://github.com/marcovarrone/cellcharter"
dependencies = [
"anndata",
# for debug logging (referenced from the issue template)
- "session-info"
+ "session-info",
]

[project.optional-dependencies]
dev = [
"pre-commit",
- "twine>=4.0.2"
+ "twine>=4.0.2",
]
doc = [
"docutils>=0.8,!=0.18.*,!=0.19.*",
@@ -61,12 +61,15 @@ addopts = [
"--import-mode=importlib", # allow using test files with same name
]

-[tool.black]
-line-length = 120
-
[tool.ruff]
-src = ["src"]
line-length = 120
+src = ["src"]
+extend-include = ["*.ipynb"]
+
+[tool.ruff.format]
+docstring-code-format = true
+
+[tool.ruff.lint]
select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
@@ -81,7 +84,7 @@ select = [
"RUF100", # Report unused noqa directives
]
ignore = [
- # line too long -> we accept long comment lines; black gets rid of long code lines
+ # line too long -> we accept long comment lines; formatter gets rid of long code lines
"E501",
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E731",
@@ -108,10 +111,10 @@ ignore = [
"D213",
]

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

-[tool.ruff.per-file-ignores]
+[tool.ruff.lint.per-file-ignores]
"docs/*" = ["I"]
"tests/*" = ["D"]
"*/__init__.py" = ["F401"]
@@ -125,5 +128,5 @@ skip = [
"docs/changelog.md",
"docs/references.bib",
"docs/references.md",
- "docs/notebooks/example.ipynb"
+ "docs/notebooks/example.ipynb",
]
@@ -7,7 +7,7 @@ name = "cellcharter"
version = "0.0.1"
description = "A Python package for the identification, characterization and comparison of spatial clusters from spatial -omics data."
readme = "README.md"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
license = {file = "LICENSE"}
authors = [
{name = "Marco Varrone"},
@@ -98,7 +98,7 @@ ignore = [
"D107",
# Errors from function calls in argument defaults. These are fine when the result is immutable.
"B008",
- # __magic__ methods are are often self-explanatory, allow missing docstrings
+ # __magic__ methods are often self-explanatory, allow missing docstrings
"D105",
# first line should end with a period [Bug: doesn't work with single-line docstrings]
"D400",
Loading