Skip to content

Commit 1dbc48d

Browse files
committed
chore: Update project template to sphinx-notes/cookiecutter@80a61fa9
1 parent c57399c commit 1dbc48d

File tree

6 files changed

+47
-3
lines changed

6 files changed

+47
-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/cookiecutter",
3-
"commit": "0db2ed864acc101a2ee90a3bf94b54b9f46473cf",
3+
"commit": "80a61fa9abcd9474d8cfbc36d0bf5d41f99c916c",
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.
@@ -61,3 +75,7 @@ update-template-done:
6175
bump-version:
6276
@echo -n "Please enter the version to bump: "
6377
@read version && $(PY) -m cruft update --variables-to-update "{ \"version\" : \"$$version\" }"
78+
79+
# EXTRA TARGETS START
80+
81+
# EXTRA TARGETS END

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ dev = [
4141
"build",
4242
"twine",
4343
"cruft",
44+
"ruff",
45+
"pre-commit"
4446
]
4547
test = [
4648
"pytest",

ruff.toml

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+
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
3+
4+
exclude = [
5+
"docs/conf.py",
6+
]
7+
8+
[format]
9+
quote-style = "single"

0 commit comments

Comments
 (0)