just: a little bit less brace expansions for a lot more readability
This commit is contained in:
parent
a989713592
commit
22fc814327
1 changed files with 24 additions and 24 deletions
48
justfile
48
justfile
|
|
@ -19,47 +19,47 @@ default:
|
||||||
|
|
||||||
# create venv, install dependencies
|
# create venv, install dependencies
|
||||||
setup:
|
setup:
|
||||||
{{ uv }} sync
|
uv sync
|
||||||
|
|
||||||
# console to observe log messages
|
# console to observe log messages
|
||||||
console:
|
console:
|
||||||
{{ uv }} run textual console
|
uv run textual console
|
||||||
|
|
||||||
# run app with logs going to console
|
# run app with logs going to console
|
||||||
run-console:
|
run-console:
|
||||||
{{ uv }} run textual run --dev {{ the_app }}
|
uv run textual run --dev {{ the_app }}
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
run:
|
run:
|
||||||
{{ uv }} run python -m {{ the_app }}
|
uv run python -m {{ the_app }}
|
||||||
|
|
||||||
# Update dependencies to new versions
|
# Update dependencies to new versions
|
||||||
update-deps:
|
update-deps:
|
||||||
{{ uv }} lock --upgrade
|
uv lock --upgrade
|
||||||
{{ uv }} sync
|
uv sync
|
||||||
|
|
||||||
# export dependencies into requirements files
|
# export dependencies into requirements files
|
||||||
exports-deps:
|
exports-deps:
|
||||||
{{ uv }} export {{ uv_export_options }} --output-file {{ requirements_file }}
|
uv export {{ uv_export_options }} --output-file {{ requirements_file }}
|
||||||
{{ uv }} export {{ uv_export_options }} --output-file {{ requirements_file_dev }} --only-dev
|
uv export {{ uv_export_options }} --output-file {{ requirements_file_dev }} --only-dev
|
||||||
|
|
||||||
# Run tests, ARGS are passed-through to pytest
|
# Run tests, ARGS are passed-through to pytest
|
||||||
test *ARGS:
|
test *ARGS:
|
||||||
{{ uv }} run pytest -m "not final" {{ ARGS }}
|
uv run pytest -m "not final" {{ ARGS }}
|
||||||
|
|
||||||
alltests *ARGS:
|
alltests *ARGS:
|
||||||
{{ uv }} run pytest {{ ARGS }}
|
uv run pytest {{ ARGS }}
|
||||||
|
|
||||||
# run tests and create coverage reports
|
# run tests and create coverage reports
|
||||||
coverage:
|
coverage:
|
||||||
{{ uv }} run pytest -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config {{ pyproject }}
|
uv run pytest -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config {{ pyproject }}
|
||||||
|
|
||||||
# lint python, markdown, wheel file names, prek config
|
# lint python, markdown, wheel file names, prek config
|
||||||
lint:
|
lint:
|
||||||
{{ uv }} run ruff check .
|
uv run ruff check .
|
||||||
{{ markdownlint }} .
|
markdownlint-cli2 .
|
||||||
{{ uv }} run twine check --strict dist/*
|
uv run twine check --strict dist/*
|
||||||
{{ prek }} validate-config prek.toml
|
prek validate-config prek.toml
|
||||||
woodpecker-cli lint .woodpecker/workflow.yaml
|
woodpecker-cli lint .woodpecker/workflow.yaml
|
||||||
|
|
||||||
release *release_name: setup
|
release *release_name: setup
|
||||||
|
|
@ -68,23 +68,23 @@ release *release_name: setup
|
||||||
set -l tag (uv version --short --output-format text)
|
set -l tag (uv version --short --output-format text)
|
||||||
|
|
||||||
just exports-deps
|
just exports-deps
|
||||||
{{ git }} add {{ pyproject }} uv.lock {{ requirements_file }} {{ requirements_file_dev }}
|
git add {{ pyproject }} uv.lock {{ requirements_file }} {{ requirements_file_dev }}
|
||||||
{{ git }} commit -m "Release version $tag"
|
git commit -m "Release version $tag"
|
||||||
{{ git }} tag "v$tag"
|
git tag "v$tag"
|
||||||
|
|
||||||
{{ git }} push
|
git push
|
||||||
{{ git }} push origin tag "v$tag"
|
git push origin tag "v$tag"
|
||||||
|
|
||||||
just build
|
just build
|
||||||
|
|
||||||
{{ fj }} release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body"
|
fj release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body"
|
||||||
just upload
|
just upload
|
||||||
{{ mv }} {{ releasenotes }} {{ releasenotes }}.$tag
|
mv {{ releasenotes }} {{ releasenotes }}.$tag
|
||||||
|
|
||||||
# builds a package
|
# builds a package
|
||||||
build:
|
build:
|
||||||
{{ uv }} build --wheel --clear
|
uv build --wheel --clear
|
||||||
|
|
||||||
# upload to Package Registry
|
# upload to Package Registry
|
||||||
upload:
|
upload:
|
||||||
{{ uv }} run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
uv run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue