File tree Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Expand file tree Collapse file tree 5 files changed +39
-2
lines changed 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.
@@ -61,3 +75,7 @@ update-template-done:
6175bump-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
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ dev = [
3838 " build" ,
3939 " twine" ,
4040 " cruft" ,
41+ " ruff" ,
42+ " pre-commit"
4143]
4244test = [
4345 " 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