-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
67 lines (51 loc) · 1.49 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
default: tests
version := `hatch version`
# run benchmarks
benchmarks:
hatch run benchmarks:run
# normalize Python code
black:
black benchmarks _delb delb integration-tests tests
# runs tests (except loaders) and reports uncovered lines
coverage-report:
hatch run unit-tests:coverage-report
# code linting with flake8
code-lint:
hatch run linting:check
# generate Sphinx HTML documentation, including API docs
docs:
hatch run docs:clean
hatch run docs:build-html
# verifies testable code snippets in the HTML documentation
doctest:
hatch run docs:clean
hatch run docs:doctest
# run static type checks with mypy
mypy:
hatch run mypy:check
# run the complete testsuite
pytest:
hatch run unit-tests:check
# release the current version on github & the PyPI
release: tests
test "{{trim_end_match(version, '-dev')}}" = "{{version}}" || false
{{just_executable()}} -f {{justfile()}} update-citation-file
git add CITATION.cff
git commit -m "Updates CITATION.cff"
git tag {{version}}
git push origin main
git push origin {{version}}
hatch clean
hatch build
hatch publish
# build and serve HTML documentation at 0.0.0.0:8000
serve-docs: docs
hatch run docs:serve
# build and open HTML documentation
show-docs: docs
xdg-open docs/build/html/index.html
# run all tests on normalized code
tests: black code-lint mypy pytest doctest
# Generates and validates CITATION.cff
update-citation-file:
hatch run citation-file:cff-from-621