Skip to content

Commit bdf5479

Browse files
add coverage recipes and fix answers file
1 parent b75b04e commit bdf5479

File tree

4 files changed

+45
-27
lines changed

4 files changed

+45
-27
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[Uu]ntitled*
22
scratch*
3+
{{ _copier_conf.answers_file }}
34
# Windows thumbnail cache files
45
Thumbs.db
56
Thumbs.db:encryptable
@@ -64,6 +65,7 @@ pip-log.txt
6465
pip-delete-this-directory.txt
6566

6667
# Unit test / coverage reports
68+
lcov.info
6769
htmlcov/
6870
.tox/
6971
.nox/

template/justfile

Lines changed: 0 additions & 27 deletions
This file was deleted.

template/justfile.jinja

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
module_name := "{{module_name}}"
2+
3+
default:
4+
@just --list
5+
6+
# setup for development
7+
setup: install git-setup
8+
9+
# install the packages
10+
install:
11+
{% raw %}{{if path_exists("uv.lock") != "true" {"uv sync --dev --all-extras --inexact"} else {"uv sync --dev --all-extras --locked --inexact"} }}{% endraw %}
12+
13+
# ensure code quality before git commit via pre-commit and nbwipers
14+
git-setup: install
15+
uv run nbwipers install local
16+
uv run pre-commit install --install-hooks
17+
18+
# run test coverage and create
19+
test-cov:
20+
uv run pytest --cov {% raw %}{{module_name}}{% endraw %} --cov-report=lcov:lcov.info --cov-report=term-missing --cov-report html --cov-report xml
21+
22+
# format and sort imports
23+
format:
24+
uv run ruff check --fix --select=I001 .
25+
uv run ruff format .
26+
27+
# autofix with ruff
28+
autofix:
29+
uv run ruff --fix --show-fixes .
30+
31+
# lint with ruff
32+
lint:
33+
uv run ruff check --output-format=full .
34+
35+
# update packages and uv lock file
36+
update:
37+
uv sync -U --dev --all-extras --inexact
38+
39+
# update pre-commit file
40+
pc-update:
41+
uvx pre-commit-update
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Changes here will be overwritten by Copier
2+
{{ _copier_answers|to_nice_yaml -}}

0 commit comments

Comments
 (0)