-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
60 lines (47 loc) · 1.33 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
# CLI Helpers.
# Help
help:
@just -l
# Package repository as tar for easy distribution
tar-source: package-deps
rm -rf tar-src/
mkdir tar-src/
git-archive-all --prefix template/ tar-src/template-v0.0.0.tar.gz
# Upgrade dependencies for packaging
package-deps:
python3 -m pip install -U twine wheel build git-archive-all
# Package the source code
package-source: package-deps clean
python -m build .
# Check the distribution is valid
package-check: clean package-source
twine check dist/*
# Upload package to test.pypi
package-upload-test: clean package-deps package-check
twine upload dist/* --repository-url https://test.pypi.org/legacy/ --verbose
# Upload package to pypi
package-upload: clean package-deps package-check
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ --verbose
# Run pre-commit-checks.
pre-commit-checks:
pre-commit run --all-files
# All checks
all-checks: pre-commit-checks
# Upgrade project dependencies
upgrade:
pip-upgrade
# Generate documentation
docs:
rm -rf docs/*
pdoc3 --force --html -o docs src/
mv docs/src/* docs/.
rm -r docs/src
# Serve the documentation
serve-docs:
python3 -m http.server --directory docs/
# Clean the package directory
clean:
rm -rf src/*.egg-info/
rm -rf build/
rm -rf dist/
rm -rf tar-src/