Skip to content

Commit 7e7be16

Browse files
committed
refactor: 🔧 set lychee to verbose
1 parent c46a4df commit 7e7be16

2 files changed

Lines changed: 42 additions & 35 deletions

File tree

justfile

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,88 @@
22
just --list --unsorted
33

44
@_checks: check-spelling check-urls check-commits
5+
56
# Test Seedcase and non-Seedcase projects
67
@_tests: (test "true" "netlify") (test "false" "netlify") (test "true" "gh-pages") (test "false" "gh-pages")
8+
79
@_builds: build-contributors build-website build-readme
810

911
# Run all build-related recipes in the justfile
1012
run-all: update-quarto-theme update-template _checks format-md _tests _builds
1113

1214
# Install the pre-commit hooks
1315
install-precommit:
14-
# Install pre-commit hooks
15-
uvx pre-commit install
16-
# Run pre-commit hooks on all files
17-
uvx pre-commit run --all-files
18-
# Update versions of pre-commit hooks
19-
uvx pre-commit autoupdate
16+
# Install pre-commit hooks
17+
uvx pre-commit install
18+
# Run pre-commit hooks on all files
19+
uvx pre-commit run --all-files
20+
# Update versions of pre-commit hooks
21+
uvx pre-commit autoupdate
2022

2123
# Update the Quarto seedcase-theme extension
2224
update-quarto-theme:
23-
# Add theme if it doesn't exist, update if it does
24-
quarto update seedcase-project/seedcase-theme --no-prompt
25+
# Add theme if it doesn't exist, update if it does
26+
quarto update seedcase-project/seedcase-theme --no-prompt
2527

2628
# Update files in the template from the copier parent folder
2729
update-template:
28-
cp CODE_OF_CONDUCT.md .pre-commit-config.yaml .typos.toml .editorconfig .rumdl.toml template/
29-
mkdir -p template/tools
30-
cp tools/get-contributors.sh template/tools/
31-
cp .github/pull_request_template.md template/.github/
32-
cp .github/workflows/dependency-review.yml template/.github/workflows/
30+
cp CODE_OF_CONDUCT.md .pre-commit-config.yaml .typos.toml .editorconfig .rumdl.toml template/
31+
mkdir -p template/tools
32+
cp tools/get-contributors.sh template/tools/
33+
cp .github/pull_request_template.md template/.github/
34+
cp .github/workflows/dependency-review.yml template/.github/workflows/
3335

3436
# Check the commit messages on the current branch that are not on the main branch
3537
check-commits:
36-
#!/usr/bin/env bash
37-
branch_name=$(git rev-parse --abbrev-ref HEAD)
38-
number_of_commits=$(git rev-list --count HEAD ^main)
39-
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
40-
then
41-
# If issue happens, try `uv tool update-shell`
42-
uvx --from commitizen cz check --rev-range main..HEAD
43-
else
44-
echo "On 'main' or current branch doesn't have any commits."
45-
fi
38+
#!/usr/bin/env bash
39+
branch_name=$(git rev-parse --abbrev-ref HEAD)
40+
number_of_commits=$(git rev-list --count HEAD ^main)
41+
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
42+
then
43+
# If issue happens, try `uv tool update-shell`
44+
uvx --from commitizen cz check --rev-range main..HEAD
45+
else
46+
echo "On 'main' or current branch doesn't have any commits."
47+
fi
4648
4749
# Install lychee from https://lychee.cli.rs/guides/getting-started/
50+
4851
# Check that URLs work
4952
check-urls:
50-
lychee . \
51-
--extensions md,qmd,jinja \
52-
--exclude-path "_badges.qmd"
53+
lychee . \
54+
--verbose \
55+
--extensions md,qmd,jinja \
56+
--exclude-path "_badges.qmd"
5357

5458
# Check for spelling errors in files
5559
check-spelling:
56-
uvx typos
60+
uvx typos
5761

5862
# Format Markdown files
5963
format-md:
60-
uvx rumdl fmt --silent
64+
uvx rumdl fmt --silent
6165

6266
# Test that a Python package can be created from the template, with parameters for: `is_seedcase_project` (true or false) and `hosting_provider` (either "gh-pages" or "netlify")
6367
test is_seedcase_project="true" hosting_provider="netlify":
64-
sh ./test-template.sh {{ is_seedcase_project }} {{ hosting_provider }}
68+
sh ./test-template.sh {{ is_seedcase_project }} {{ hosting_provider }}
6569

6670
# Test template with the manual questionnaire answers
6771
test-manual:
68-
mkdir -p _temp/manual
69-
uvx copier copy --trust -r HEAD . _temp/manual/test-template
72+
mkdir -p _temp/manual
73+
uvx copier copy --trust -r HEAD . _temp/manual/test-template
7074

7175
# Clean up any leftover and temporary build files
7276
cleanup:
73-
rm -rf _temp
77+
rm -rf _temp
7478

7579
# Build the website using Quarto
7680
build-website:
77-
uvx --from quarto quarto render
81+
uvx --from quarto quarto render
7882

7983
# Re-build the README file from the Quarto version
8084
build-readme:
81-
uvx --from quarto quarto render README.qmd --to gfm
85+
uvx --from quarto quarto render README.qmd --to gfm
8286

8387
# Generate a Quarto include file with the contributors
8488
build-contributors:
85-
sh ./tools/get-contributors.sh seedcase-project/template-python-project > docs/includes/_contributors.qmd
89+
sh ./tools/get-contributors.sh seedcase-project/template-python-project > docs/includes/_contributors.qmd

template/justfile.jinja

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
just --list --unsorted
33

44
@_checks: check-python check-unused check-security check-spelling check-urls check-commits
5+
56
@_tests: test-python
7+
68
@_builds: build-contributors build-website build-readme
79

810
# Run all build-related recipes in the justfile
@@ -100,6 +102,7 @@ check-spelling:
100102
# Check that URLs work
101103
check-urls:
102104
lychee . \
105+
--verbose \
103106
--extensions md,qmd,py \
104107
--exclude-path "_badges.qmd"
105108

0 commit comments

Comments
 (0)