-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathjustfile
executable file
·46 lines (39 loc) · 1.76 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
#! /usr/bin/env -S just -f
# SPDX-FileCopyrightText: 2025 geisserml <geisserml@gmail.com>
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
default:
just -l
test *args:
python3 -m pytest tests/ {{args}}
_coverage_impl OMISSIONS *args:
python3 -m coverage run --omit "{{OMISSIONS}}" -m pytest tests/ {{args}}
python3 -m coverage report
coverage *args:
just _coverage_impl "src/pypdfium2_raw/bindings.py,tests/*,setupsrc/*" {{args}}
coverage-core *args:
just _coverage_impl "src/pypdfium2/__main__.py,src/pypdfium2/_cli/*,src/pypdfium2_raw/bindings.py,tests/*,setupsrc/*" {{args}}
docs-build:
python3 -m sphinx -b html docs/source docs/build/html
docs-open:
xdg-open docs/build/html/index.html &>/dev/null
clean:
rm -rf pypdfium2*.egg-info/ src/pypdfium2*.egg-info/ build/ dist/ data/* tests/output/* conda/bundle/out/ conda/helpers/out/ conda/raw/out/
check:
autoflake src/ setupsrc/ tests/ setup.py docs/source/conf.py --recursive --remove-all-unused-imports --ignore-pass-statements --ignore-init-module-imports
codespell --skip="./docs/build,./tests/resources,./tests/output,./data,./sourcebuild,./dist,./LICENSES/*,./RELEASE.md,./.git,__pycache__,.mypy_cache,.hypothesis" -L "FitH,flate"
reuse lint
distcheck:
twine check dist/*
# ignore W002: erroneous detection of __init__.py files as duplicates
check-wheel-contents dist/*.whl --ignore W002 --toplevel "pypdfium2,pypdfium2_raw"
update *args:
python3 setupsrc/pypdfium2_setup/update.py {{args}}
emplace *args:
python3 setupsrc/pypdfium2_setup/emplace.py {{args}}
sourcebuild *args:
python3 setupsrc/pypdfium2_setup/sourcebuild.py {{args}}
craft *args:
python3 setupsrc/pypdfium2_setup/craft.py {{args}}
craft-conda *args:
python3 conda/craft_conda_pkgs.py {{args}}
packaging-pypi: clean check update craft distcheck