File tree Expand file tree Collapse file tree 6 files changed +40
-3
lines changed Expand file tree Collapse file tree 6 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "template" : " https://github.com/sphinx-notes/template" ,
3- "commit" : " 0db2ed864acc101a2ee90a3bf94b54b9f46473cf " ,
3+ "commit" : " 4863158051bf17ac253d631aac0521e8513977dd " ,
44 "checkout" : null ,
55 "context" : {
66 "cookiecutter" : {
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -7,21 +7,35 @@ MAKE = make
77PY = python3
88RM = rm -rf
99GIT = git
10+ OPEN = xdg-open
1011
1112# Build sphinx documentation.
1213.PHONY : docs
1314docs :
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
1833test :
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
6783cli :
6884$(PY ) ./utils/cli.py --config ./utils/conf.py $(args )
85+
86+ # EXTRA TARGETS END
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ dev = [
4747 " build" ,
4848 " twine" ,
4949 " cruft" ,
50+ " ruff" ,
51+ " pre-commit"
5052]
5153test = [
5254 " pytest" ,
Original file line number Diff line number Diff line change 1+ [format ]
2+ quote-style = " single"
You can’t perform that action at this time.
0 commit comments