-
Notifications
You must be signed in to change notification settings - Fork 46
/
justfile
70 lines (54 loc) · 1.39 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
68
69
70
package := "ssg"
# List available commands
list:
just --list
# Launch Streamlit app
app:
poetry run streamlit run app/Static_site_generators.py
# Use black and isort
lint:
black .
isort .
# Build documentation files
docs-build:
poetry run sphinx-build -a docs docs/site
# Show documentation in browser
docs-show:
python -m http.server -d docs/site
# Publish documentation to Github Pages
docs-publish:
poetry run ghp-import docs/site
# Create RST source file for API documentation
docs-create:
poetry run sphinx-apidoc -o docs src/{{package}}
# Create new CSV file, patch version and make release
update-full:
just update
just patch
just release
# Create new CSV file and SVG badge
update:
poetry run python example/update.py
just badge
# Bump 0.0.x version number
patch:
poetry version patch
# Make Github release using version from poetry.toml
release:
just version | xargs -I % gh release create % --notes-file release.md
# Run pytest and pyright
test:
poetry run pytest
poetry run pyright src
# Run precommit hook
precommit:
pre-commit run --all-files
# Show package version
version:
poetry version -s | tr -d '\r' | xargs -I % echo v%
# Create brightgreen SVG badge with SSG count
badge:
wc -l data/ssg.csv | xargs -I % npx badge SSG % :brightgreen > app/ssg_count.svg
# Run prettier on markdown files
prettier:
npx prettier *.md --write