Skip to content

Commit 531d6ba

Browse files
committed
chore: Update project template to sphinx-notes/cookiecutter@4c6b17ae
1 parent c965b48 commit 531d6ba

5 files changed

Lines changed: 32 additions & 7 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": "158e67b1043bf95237e70c4ffffbda02dffc4886",
3+
"commit": "4c6b17aec1a4b8ddca95c4882c6bed2bc230d595",
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": "158e67b1043bf95237e70c4ffffbda02dffc4886"
23+
"_commit": "4c6b17aec1a4b8ddca95c4882c6bed2bc230d595"
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

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ fmt:
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/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
# ones.
2424
extensions = [
2525
'sphinx.ext.githubpages',
26+
'sphinx.ext.doctest',
27+
'sphinx.ext.viewcode',
2628
'sphinx_design',
2729
'sphinx_copybutton',
2830
'sphinx_last_updated_by_git',
@@ -114,8 +116,8 @@
114116
# documentation root, use os.path.abspath to make it absolute, like shown here.
115117
import os
116118
import sys
117-
sys.path.insert(0, os.path.abspath('../src/sphinxnotes'))
118-
extensions.append('project')
119+
sys.path.insert(0, os.path.abspath('../src/'))
120+
extensions.append('sphinxnotes.project')
119121

120122
# CUSTOM CONFIGURATION
121123
primary_domain = 'any'

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)