Skip to content

Commit eaa68cd

Browse files
committed
chore: Update project template to sphinx-notes/cookiecutter@a829f105
1 parent 133ce58 commit eaa68cd

9 files changed

Lines changed: 50 additions & 18 deletions

File tree

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/sphinx-notes/cookiecutter",
3-
"commit": "4736b672023e3bf4bc80d0d51850d7bc45ca1e12",
3+
"commit": "a829f105e638f3cba98b799eabef94c0148cd9c0",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -20,7 +20,7 @@
2020
"sphinx_version": "7.0",
2121
"development_status": "3 - Alpha",
2222
"_template": "https://github.com/sphinx-notes/cookiecutter",
23-
"_commit": "4736b672023e3bf4bc80d0d51850d7bc45ca1e12"
23+
"_commit": "a829f105e638f3cba98b799eabef94c0148cd9c0"
2424
}
2525
},
2626
"directory": null

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '0 7 * * 6'
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version-file: 'pyproject.toml'
15+
- run: python3 -m pip install .[dev]
16+
- run: make test

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.6.1
3+
rev: v0.14.11
44
hooks:
55
- id: ruff-check
66
args: [ --fix ]

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ clean:
2323

2424
.PHONY: fmt
2525
fmt:
26-
ruff format src/ && ruff check --fix src/
26+
ruff format src/ tests/ && ruff check --fix src/ tests/
2727

2828
.PHONY: test
2929
test:
@@ -36,7 +36,8 @@ test:
3636
# Build distribution package, for "install" or "upload".
3737
.PHONY: dist
3838
dist: pyproject.toml clean
39-
$(PY) -m build
39+
# Use ``--no-isolation`` to prevent network accessing.
40+
$(PY) -m build --no-isolation
4041

4142
# Install distribution package to user directory.
4243
#

docs/_static/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* This file is generated from sphinx-notes/cookiecutter.
2+
* DO NOT EDIT.
3+
*/
4+
5+
/* Missing style for nodes.system_message from Alabaster. */
6+
.system-message {
7+
background-color: #fda;
8+
padding: 5px;
9+
border: 3px solid red;
10+
}

docs/conf.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,16 @@
4545
# produce any output in the built files.
4646
show_authors = True
4747

48+
# Keep warnings as “system message” paragraphs in the rendered documents.
49+
keep_warnings = True
50+
4851
# -- Options for HTML output -------------------------------------------------
4952

5053
# The theme to use for HTML and HTML Help pages. See the documentation for
5154
# a list of builtin themes.
5255
#
5356
html_theme = 'furo'
5457

55-
html_theme_options = {}
56-
57-
# Add any paths that contain custom static files (such as style sheets) here,
58-
# relative to this directory. They are copied after the builtin static files,
59-
# so a file named "default.css" will overwrite the builtin "default.css".
60-
html_static_path = ['_static']
6158
html_theme_options = {
6259
"source_repository": "https://github.com/sphinx-notes/isso/",
6360
"source_branch": "master",
@@ -70,6 +67,13 @@
7067

7168
html_logo = html_favicon = '_static/sphinx-notes.png'
7269

70+
# Add any paths that contain custom static files (such as style sheets) here,
71+
# relative to this directory. They are copied after the builtin static files,
72+
# so a file named "default.css" will overwrite the builtin "default.css".
73+
html_static_path = ['_static']
74+
75+
html_css_files = ['custom.css']
76+
7377
# -- Extensions -------------------------------------------------------------
7478

7579
extensions.append('sphinx.ext.extlinks')
@@ -87,11 +91,7 @@
8791
autodoc_typehints = 'description'
8892

8993
extensions.append('sphinx.ext.intersphinx')
90-
intersphinx_mapping = {
91-
'python': ('https://docs.python.org/3', None),
92-
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
93-
'jinja': ('https://jinja.palletsprojects.com/en/latest/', None),
94-
}
94+
intersphinx_mapping = {}
9595

9696
extensions.append('sphinx_sitemap')
9797
sitemap_filename = "sitemap.xml"

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ as part of **The Sphinx Notes Project**.
120120
:caption: The Sphinx Notes Project
121121

122122
Home <https://sphinx.silverrainz.me/>
123+
GitHub <https://github.com/sphinx-notes>
123124
Blog <https://silverrainz.me/blog/category/sphinx.html>
124125
PyPI <https://pypi.org/search/?q=sphinxnotes>
125126

src/sphinxnotes/isso/meta.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from __future__ import annotations
99
from importlib import metadata
1010

11+
from sphinx.application import Sphinx
12+
from sphinx.util.typing import ExtensionMetadata
13+
14+
1115
__project__ = 'sphinxnotes-isso'
1216
__author__ = 'Shengyu Zhang'
1317
__desc__ = 'Sphinx extension for embeding Isso comments in documents'
@@ -23,11 +27,11 @@
2327
################################################################################
2428

2529

26-
def pre_setup(app):
30+
def pre_setup(app: Sphinx) -> None:
2731
app.require_sphinx('7.0')
2832

2933

30-
def post_setup(app):
34+
def post_setup(app: Sphinx) -> ExtensionMetadata:
3135
return {
3236
'version': __version__,
3337
'parallel_read_safe': True,

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)