-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (38 loc) · 1.21 KB
/
Makefile
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
.PHONY: clean clean-dist docs format lint test typecheck
clean: clean-dist
clean-dist:
find . -name *.pyc -delete && find . -name __pycache__ -delete
rm -rf build
rm -rf dist
rm -rf *.egg-info
demo-render:
terminalizer render docs/demo.yml -o docs/docs/images/demo.gif -q 100
docs:
echo "# CLI Help Documentation\n" > docs/docs/cli.md
@echo '```bash' >> docs/docs/cli.md
@echo "reprex --help" >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
@echo "" >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
@reprex --help >> docs/docs/cli.md
@echo '```' >> docs/docs/cli.md
sed 's|https://raw.githubusercontent.com/jayqi/reprexlite/main/docs/docs/images/demo.gif|images/demo.gif|g' README.md \
| sed 's|https://jayqi.github.io/reprexlite/stable/||g' \
> docs/docs/index.md
sed 's|https://jayqi.github.io/reprexlite/stable/||g' CHANGELOG.md \
> docs/docs/changelog.md
cd docs && mkdocs build
dist: clean-dist
python -m build
format:
ruff reprexlite tests --fix
black reprexlite tests
generate-test-assets:
python tests/expected_reprexes.py
lint:
black --check reprexlite tests
ruff reprexlite tests
test:
pytest -vv
typecheck:
mypy reprexlite --show-error-codes --install-types --non-interactive