Skip to content

Update template to v0.5.0 #212

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 18 additions & 4 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": "87a407a65408d75a949c0b54b19fd287475a56f8",
"checkout": "v0.4.0",
"commit": "94ef9fb6f9ad8cfe65a3d9575679c03c80c49cd1",
"checkout": "v0.5.0",
"context": {
"cookiecutter": {
"project_name": "scverse-tutorials",
Expand All @@ -10,19 +10,33 @@
"author_full_name": "scverse team",
"author_email": "[email protected]",
"github_user": "scverse",
"project_repo": "https://github.com/scverse/scverse-tutorials",
"github_repo": "scverse-tutorials",
"license": "BSD 3-Clause License",
"ide_integration": true,
"_copy_without_render": [
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_exclude_on_template_update": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"docs/api.md",
"docs/index.md",
"docs/notebooks/example.ipynb",
"docs/references.bib",
"docs/references.md",
"src/**",
"tests/**"
],
"_render_devdocs": false,
"_jinja2_env_vars": {
"lstrip_blocks": true,
"trim_blocks": true
},
"_template": "https://github.com/scverse/cookiecutter-scverse"
"_template": "https://github.com/scverse/cookiecutter-scverse",
"_commit": "94ef9fb6f9ad8cfe65a3d9575679c03c80c49cd1"
}
},
"directory": null
Expand Down
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_size = 2

[.cruft.json]
[{*.{yml,yaml,toml},.cruft.json}]
indent_size = 2

[Makefile]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/execute-nbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
activate-environment: tutorials
channel-priority: flexible
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-variant: Miniforge3
miniforge-version: latest
use-mamba: true
# some important packages are not available as .tar.bz2 anymore
Expand Down Expand Up @@ -83,6 +83,6 @@ jobs:
jcache notebook merge $f $f
done

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Render notebooks
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ __pycache__/
# Temp files
.DS_Store
*~
buck-out/

# Virtual environments
# Compiled files
.venv/

# Build artifacts
# Distribution / packaging
/dist/

# Tests and coverage
/data/
/node_modules/

# docs
/docs/generated/
/docs/_build/

# User configuration
/hatch.toml

# IDEs
/.idea/
/.vscode/
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ default_stages:
- pre-push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.3
- repo: https://github.com/biomejs/pre-commit
rev: v1.9.4
hooks:
- id: prettier
- id: biome-format
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.5
hooks:
Expand Down
18 changes: 18 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"recommendations": [
// GitHub integration
"github.vscode-github-actions",
"github.vscode-pull-request-github",
// Language support
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"tamasfe.even-better-toml",
// Dependency management
"ninoseki.vscode-mogami",
// Linting and formatting
"editorconfig.editorconfig",
"charliermarsh.ruff",
"biomejs.biome",
],
}
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Build Documentation",
"type": "debugpy",
"request": "launch",
"module": "sphinx",
"args": ["-M", "html", ".", "_build"],
"cwd": "${workspaceFolder}/docs",
"console": "internalConsole",
"justMyCode": false,
},
{
"name": "Python: Debug Test",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "internalConsole",
"justMyCode": false,
"env": {
"PYTEST_ADDOPTS": "--color=yes",
},
"presentation": {
"hidden": true,
},
},
],
}
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"[python][json][jsonc]": {
"editor.formatOnSave": true,
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always",
},
},
"[json][jsonc]": {
"editor.defaultFormatter": "biomejs.biome",
},
"python.analysis.typeCheckingMode": "basic",
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["-vv", "--color=yes"],
}
16 changes: 16 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": { "useEditorconfig": true },
"overrides": [
{
"include": ["./.vscode/*.json", "**/*.jsonc"],
"json": {
"formatter": { "trailingCommas": "all" },
"parser": {
"allowComments": true,
"allowTrailingCommas": true,
},
},
},
],
}
8 changes: 4 additions & 4 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
{% block attributes %}
{% if attributes %}
Attributes table
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~

.. autosummary::
{% for item in attributes %}
~{{ fullname }}.{{ item }}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
Expand All @@ -26,7 +26,7 @@ Methods table
.. autosummary::
{% for item in methods %}
{%- if item != '__init__' %}
~{{ fullname }}.{{ item }}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
Expand All @@ -35,7 +35,7 @@ Methods table
{% block attributes_documentation %}
{% if attributes %}
Attributes
~~~~~~~~~~~
~~~~~~~~~~

{% for item in attributes %}

Expand Down
12 changes: 9 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
needs_sphinx = "4.0"

html_context = {
"display_github": True,
"display_github": True, # Integrate GitHub
"github_user": "scverse",
"github_repo": project_name,
"github_version": "main",
Expand Down Expand Up @@ -89,14 +89,20 @@
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints", ".jupyter_cache"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"**.ipynb_checkpoints",
".jupyter_cache",
]


# -- Options for HTML output -------------------------------------------------
Expand Down
Loading
Loading