Skip to content

Commit 09ba2f7

Browse files
committed
chore: Update project template to sphinx-notes/cookiecutter@62cd9619
1 parent 901b9e2 commit 09ba2f7

8 files changed

Lines changed: 53 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": "7a50ba075b59fb6e386d75181e33135d458c8974",
3+
"commit": "62cd96195962da3392cdc34125c95e9144a5f5ca",
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": "7a50ba075b59fb6e386d75181e33135d458c8974"
23+
"_commit": "62cd96195962da3392cdc34125c95e9144a5f5ca"
2424
}
2525
},
2626
"directory": null

.github/workflows/test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,14 @@ jobs:
1212
- uses: actions/setup-python@v5
1313
with:
1414
python-version-file: 'pyproject.toml'
15-
- run: python3 -m pip install .[dev]
15+
- run: python3 -m pip install .[test]
1616
- run: make test
17+
doctest:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version-file: 'pyproject.toml'
24+
- run: python3 -m pip install .[docs]
25+
- run: make doctest

.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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ 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:
30-
$(PY) -m unittest discover -s tests -v
30+
$(PY) -m pytest tests/ -v
31+
32+
.PHONY: doctest
33+
doctest:
34+
$(MAKE) doctest -C docs/
3135

3236
################################################################################
3337
# Distribution Package
@@ -36,7 +40,8 @@ test:
3640
# Build distribution package, for "install" or "upload".
3741
.PHONY: dist
3842
dist: pyproject.toml clean
39-
$(PY) -m build
43+
# Use ``--no-isolation`` to prevent network accessing when in local env.
44+
$(PY) -m build $(if $(CI),,--no-isolation)
4045

4146
# Install distribution package to user directory.
4247
#

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: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# ones.
2424
extensions = [
2525
'sphinx.ext.githubpages',
26+
'sphinx.ext.doctest',
2627
'sphinx_design',
2728
'sphinx_copybutton',
2829
'sphinx_last_updated_by_git',
@@ -45,19 +46,16 @@
4546
# produce any output in the built files.
4647
show_authors = True
4748

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

5054
# The theme to use for HTML and HTML Help pages. See the documentation for
5155
# a list of builtin themes.
5256
#
5357
html_theme = 'furo'
5458

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']
6159
html_theme_options = {
6260
"source_repository": "https://github.com/sphinx-notes/strike/",
6361
"source_branch": "master",
@@ -70,6 +68,13 @@
7068

7169
html_logo = html_favicon = '_static/sphinx-notes.png'
7270

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

7580
extensions.append('sphinx.ext.extlinks')
@@ -87,11 +92,7 @@
8792
autodoc_typehints = 'description'
8893

8994
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-
}
95+
intersphinx_mapping = {}
9596

9697
extensions.append('sphinx_sitemap')
9798
sitemap_filename = "sitemap.xml"

docs/index.rst

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

9898
Home <https://sphinx.silverrainz.me/>
99+
GitHub <https://github.com/sphinx-notes>
99100
Blog <https://silverrainz.me/blog/category/sphinx.html>
100101
PyPI <https://pypi.org/search/?q=sphinxnotes>
101102

tests/test_always_pass.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is generated from sphinx-notes/cookiecutter.
2+
# DO NOT EDIT.
3+
4+
import unittest
5+
6+
7+
class TestAlwaysPass(unittest.TestCase):
8+
def test_dummy(self):
9+
self.assertTrue(True)

0 commit comments

Comments
 (0)