Skip to content

Commit 24e0a5f

Browse files
committed
chore: Update project template to sphinx-notes/cookiecutter@48631580
1 parent 02a110c commit 24e0a5f

File tree

6 files changed

+40
-3
lines changed

6 files changed

+40
-3
lines changed

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/sphinx-notes/template",
3-
"commit": "0db2ed864acc101a2ee90a3bf94b54b9f46473cf",
3+
"commit": "4863158051bf17ac253d631aac0521e8513977dd",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

.github/workflows/lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Ruff
2+
on: [ push, pull_request ]
3+
4+
jobs:
5+
ruff:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- uses: chartboost/ruff-action@v1

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.6.1
4+
hooks:
5+
- id: ruff
6+
- id: ruff-format

Makefile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,35 @@ MAKE = make
77
PY = python3
88
RM = rm -rf
99
GIT = git
10+
OPEN = xdg-open
1011

1112
# Build sphinx documentation.
1213
.PHONY: docs
1314
docs:
1415
$(MAKE) -C docs/
1516

17+
# View sphinx HTML documentation in browser.
18+
.PHONY: view
19+
view:
20+
$(OPEN) docs/_build/html/index.html
21+
22+
.PHONY: clean
23+
clean:
24+
$(MAKE) -C docs/ clean
25+
$(RM) dist/
26+
27+
.PHONY: clean
28+
fmt:
29+
ruff format src/
30+
1631
# Run unittest.
1732
.PHONY: test
1833
test:
1934
$(PY) -m unittest discover -s tests -v
2035

2136
# Build distribution package, for "install" or "upload".
2237
.PHONY: dist
23-
dist: pyproject.toml
24-
$(RM) dist/ # clean up old dist
38+
dist: pyproject.toml clean
2539
$(PY) -m build
2640

2741
# Install distribution package to user directory.
@@ -62,7 +76,11 @@ bump-version:
6276
@echo -n "Please enter the version to bump: "
6377
@read version && $(PY) -m cruft update --variables-to-update "{ \"version\" : \"$$version\" }"
6478

79+
# EXTRA TARGETS START
80+
6581
# Usage: make cli args=--help
6682
.PHONY: cli
6783
cli:
6884
$(PY) ./utils/cli.py --config ./utils/conf.py $(args)
85+
86+
# EXTRA TARGETS END

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ dev = [
4747
"build",
4848
"twine",
4949
"cruft",
50+
"ruff",
51+
"pre-commit"
5052
]
5153
test = [
5254
"pytest",

ruff.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[format]
2+
quote-style = "single"

0 commit comments

Comments
 (0)