From c9e5bec4305f3f8398cd64f73cda62fb87f166d1 Mon Sep 17 00:00:00 2001 From: scverse-bot Date: Tue, 21 May 2024 13:37:14 +0000 Subject: [PATCH] Update template to v0.4.0 --- .cruft.json | 7 +-- .github/workflows/test.yaml.rej | 16 +++++++ .gitignore | 1 + .pre-commit-config.yaml.rej | 34 +++++++++++++++ README.md.rej | 10 +++++ docs/conf.py | 10 ++--- docs/contributing.md | 3 +- docs/contributing.md.rej | 10 +++++ pyproject.toml | 4 +- pyproject.toml.rej | 75 +++++++++++++++++++++++++++++++++ 10 files changed, 159 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test.yaml.rej create mode 100644 .pre-commit-config.yaml.rej create mode 100644 README.md.rej create mode 100644 docs/contributing.md.rej create mode 100644 pyproject.toml.rej diff --git a/.cruft.json b/.cruft.json index ffef100..7f8e2ad 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,7 +1,7 @@ { "template": "https://github.com/scverse/cookiecutter-scverse", - "commit": "8e96abb5c3e2d5078c44713958da672711cf2a48", - "checkout": null, + "commit": "87a407a65408d75a949c0b54b19fd287475a56f8", + "checkout": "v0.4.0", "context": { "cookiecutter": { "project_name": "scHub", @@ -13,7 +13,8 @@ "project_repo": "https://github.com/CompCy-lab/scHub", "license": "MIT License", "_copy_without_render": [ - ".github/workflows/**.yaml", + ".github/workflows/build.yaml", + ".github/workflows/test.yaml", "docs/_templates/autosummary/**.rst" ], "_render_devdocs": false, diff --git a/.github/workflows/test.yaml.rej b/.github/workflows/test.yaml.rej new file mode 100644 index 0000000..e165fb8 --- /dev/null +++ b/.github/workflows/test.yaml.rej @@ -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 + diff --git a/.gitignore b/.gitignore index a26f8ff..f9648ec 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ src/schub/_version.py /.pytest_cache/ /.cache/ /data/ +/node_modules/ # docs /docs/generated/ diff --git a/.pre-commit-config.yaml.rej b/.pre-commit-config.yaml.rej new file mode 100644 index 0000000..5f9ac18 --- /dev/null +++ b/.pre-commit-config.yaml.rej @@ -0,0 +1,34 @@ +diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks) +@@ -6,29 +6,18 @@ default_stages: + - push + minimum_pre_commit_version: 2.16.0 + repos: +- - repo: https://github.com/psf/black +- rev: "24.4.2" +- hooks: +- - id: black +- - repo: https://github.com/asottile/blacken-docs +- rev: 1.16.0 +- hooks: +- - id: blacken-docs + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier +- # Newer versions of node don't work on systems that have an older version of GLIBC +- # (in particular Ubuntu 18.04 and Centos 7) +- # EOL of Centos 7 is in 2024-06, we can probably get rid of this then. +- # See https://github.com/scverse/cookiecutter-scverse/issues/143 and +- # https://github.com/jupyterlab/jupyterlab/issues/12675 +- language_version: "17.9.1" + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.4 + hooks: + - id: ruff ++ types_or: [python, pyi, jupyter] + args: [--fix, --exit-non-zero-on-fix] ++ - id: ruff-format ++ types_or: [python, pyi, jupyter] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: diff --git a/README.md.rej b/README.md.rej new file mode 100644 index 0000000..36b99dd --- /dev/null +++ b/README.md.rej @@ -0,0 +1,10 @@ +diff a/README.md b/README.md (rejected hunks) +@@ -17,7 +17,7 @@ Please refer to the [documentation][link-docs]. In particular, the + + ## Installation + +-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 scHub: diff --git a/docs/conf.py b/docs/conf.py index 237c1d8..0e13a7e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 @@ -36,10 +36,10 @@ html_context = { "display_github": True, # Integrate GitHub - "github_user": "haidyi", # 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": "haidyi", + "github_repo": "https://github.com/CompCy-lab/scHub", + "github_version": "main", + "conf_py_path": "/docs/", } # -- General configuration --------------------------------------------------- diff --git a/docs/contributing.md b/docs/contributing.md index 108fd7f..be854a3 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -90,7 +90,7 @@ Before making a release, you need to update the version number in the `pyproject > Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. Once you are done, commit and push your changes and navigate to the "Releases" page of this project on GitHub. -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. +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. ## Writing documentation @@ -156,3 +156,4 @@ open _build/html/index.html [numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html [sphinx autodoc typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints [pypi]: https://pypi.org/ +[managing GitHub releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository diff --git a/docs/contributing.md.rej b/docs/contributing.md.rej new file mode 100644 index 0000000..e003d40 --- /dev/null +++ b/docs/contributing.md.rej @@ -0,0 +1,10 @@ +diff a/docs/contributing.md b/docs/contributing.md (rejected hunks) +@@ -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 diff --git a/pyproject.toml b/pyproject.toml index 95e90fd..f0ca623 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,7 +118,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", @@ -162,5 +162,5 @@ skip = [ "docs/changelog.md", "docs/references.bib", "docs/references.md", - "docs/notebooks/example.ipynb" + "docs/notebooks/example.ipynb", ] diff --git a/pyproject.toml.rej b/pyproject.toml.rej new file mode 100644 index 0000000..66f3a10 --- /dev/null +++ b/pyproject.toml.rej @@ -0,0 +1,75 @@ +diff a/pyproject.toml b/pyproject.toml (rejected hunks) +@@ -7,7 +7,7 @@ name = "scHub" + version = "0.0.1" + description = "The collections of methods for single-cell studies developed lab at UNC-Chapel Hill" + readme = "README.md" +-requires-python = ">=3.9" ++requires-python = ">=3.10" + license = {file = "LICENSE"} + authors = [ + {name = "Haidong Yi"}, +@@ -21,19 +21,19 @@ urls.Home-page = "https://github.com/CompCy-lab/scHub" + 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.*", + "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", +@@ -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 +@@ -95,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", +@@ -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"]