Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.

Commit 2a35cf3

Browse files
chore: sync template files
1 parent fa014fc commit 2a35cf3

File tree

16 files changed

+342
-90
lines changed

16 files changed

+342
-90
lines changed

.github/actions/setup-project/action.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,25 @@ runs:
4141
run: |
4242
mkdir -p bin
4343
44+
# Add ./bin to the PATH
45+
echo "Adding ./bin to PATH"
46+
echo "$(pwd)/bin" >> $GITHUB_PATH
47+
4448
# Install Task
4549
curl -fsSL https://taskfile.dev/install.sh | sh -s -- -d -b ./bin
4650
4751
# Install uv and uvx
4852
curl -fsSL https://astral.sh/uv/install.sh | UV_INSTALL_DIR="./bin" sh
4953
50-
# Verify installations
51-
./bin/task --version
52-
./bin/uv --version
53-
./bin/uvx --version
54+
- name: Check version for task
55+
shell: bash
56+
run: |
57+
task --version
58+
59+
- name: Check version for uv
60+
shell: bash
61+
run: |
62+
uv --version
5463
5564
- name: Render the project
5665
if: hashFiles('tests/resources/render.yml') != ''
@@ -85,13 +94,13 @@ runs:
8594
8695
- name: Build the virtual environment
8796
shell: bash
88-
run: ./bin/uv venv --python ${{ inputs.python-version }}
97+
run: uv venv --python ${{ inputs.python-version }}
8998

90-
- name: "Build the virtual environment for ${{ github.repository }}"
99+
- name: "Sync the virtual environment for ${{ github.repository }} if pyproject.toml exists"
91100
shell: bash
92101
run: |
93102
if [ -f "pyproject.toml" ]; then
94-
./bin/uv sync --all-extras
103+
uv sync --all-extras
95104
else
96105
echo "No pyproject.toml found, skipping package installation"
97106
fi

.github/workflows/book.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ jobs:
4646

4747
- name: "Make the docs"
4848
run: |
49-
./bin/task docs:docs
49+
task docs:docs
5050
5151
- name: "Make the tests"
5252
run: |
53-
./bin/task docs:test
53+
task docs:test
5454
5555
- name: "Make the notebooks"
5656
run: |
57-
./bin/task docs:marimushka
57+
task docs:marimushka
5858
5959
- name: "Make the book"
6060
run: |
61-
./bin/task docs:book
61+
task docs:book
6262
6363
# Step 5: Package all artifacts for GitHub Pages deployment
6464
# This prepares the combined outputs for deployment by creating a single artifact

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# (https://github.com/tschm/.config-templates).
33
#
44
# Workflow: Continuous Integration
5-
#
5+
#
66
# Purpose: This workflow runs tests on multiple Python versions to ensure
77
# compatibility and code quality across different environments.
88
#
@@ -33,7 +33,7 @@ jobs:
3333
matrix:
3434
# mongo container action only supported on Linux
3535
os: [ ubuntu-latest ]
36-
python-version: [ '3.11', '3.12', '3.13' ]
36+
python-version: [ '3.11', '3.12', '3.13', '3.14']
3737

3838
# Steps represent a sequence of tasks that will be executed as part of the job
3939
steps:
@@ -51,5 +51,9 @@ jobs:
5151

5252
- name: "Run the tests"
5353
run: |
54-
./bin/uv pip install pytest
55-
./bin/uv run pytest tests
54+
# if there is a tests/requirements.txt file, install it
55+
if [ -f "tests/requirements.txt" ]; then
56+
uv pip install -r tests/requirements.txt
57+
fi
58+
uv pip install pytest
59+
uv run pytest tests

.github/workflows/deptry.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,21 @@ jobs:
2626
name: Check dependencies with deptry
2727
runs-on: ubuntu-latest
2828
container:
29-
image: ghcr.io/astral-sh/uv:0.9.4-python3.12-trixie
29+
image: ghcr.io/astral-sh/uv:0.9.5-python3.12-trixie
3030

3131
steps:
3232
- uses: actions/checkout@v5
3333

3434
- name: Run deptry
3535
run: |
36+
set -euo pipefail
3637
if [ -f "pyproject.toml" ]; then
37-
uvx deptry src # Run deptry on the src directory
38+
if [ -d "src" ]; then
39+
SOURCE_FOLDER="src"
40+
else
41+
SOURCE_FOLDER="."
42+
fi
43+
uvx deptry "$SOURCE_FOLDER"
3844
else
39-
echo "pyproject.toml not found, skipping deptry analysis"
45+
printf "${YELLOW:-}[WARN] No pyproject.toml found, skipping deptry${RESET:-}\n"
4046
fi

.github/workflows/marimo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ jobs:
8282
# Execute the notebook with the appropriate runner based on its content
8383
- name: Run notebook
8484
run: |
85-
./bin/uv run "${{ matrix.notebook }}"
85+
uv run "${{ matrix.notebook }}"
8686
shell: bash

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
- uses: actions/checkout@v5
3232
- uses: actions/setup-python@v6
3333
with:
34-
python-version: '3.12'
34+
python-version: '3.14'
3535
- uses: pre-commit/[email protected]

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- name: Upload dist artifact
7979
# not tested at runtime!
8080
if: hashFiles('pyproject.toml') != ''
81-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@v5
8282
with:
8383
name: dist
8484
path: dist
@@ -90,11 +90,12 @@ jobs:
9090

9191
steps:
9292
- name: Download dist artifact
93-
uses: actions/download-artifact@v5
93+
uses: actions/download-artifact@v6
9494
with:
9595
name: dist
9696
path: dist
97-
continue-on-error: true
97+
# Fail fast if dist artifact is missing; don’t create empty releases.
98+
# continue-on-error: true
9899

99100
- name: Create GitHub Release with artifacts
100101
uses: softprops/[email protected]
@@ -112,7 +113,7 @@ jobs:
112113

113114
steps:
114115
- name: Download dist artifact
115-
uses: actions/download-artifact@v5
116+
uses: actions/download-artifact@v6
116117
with:
117118
name: dist
118119
path: dist

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: check-yaml
1010

1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: 'v0.14.1'
12+
rev: 'v0.14.2'
1313
hooks:
1414
- id: ruff
1515
args: [ --fix, --exit-non-zero-on-fix, --unsafe-fixes ]

Makefile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,49 @@ RESET := \033[0m
1717
# Declare phony targets (they don't produce files)
1818
.PHONY: install-task install clean test marimo book fmt deptry help all
1919

20+
UV_INSTALL_DIR := "./bin"
21+
2022
##@ Bootstrap
2123
install-task: ## ensure go-task (Taskfile) is installed
22-
@mkdir -p ./bin;
23-
# install task
24-
@if command -v ./bin/task >/dev/null 2>&1; then \
25-
printf "$(GREEN)task is already installed$(RESET)\n"; \
26-
else \
24+
@mkdir -p ${UV_INSTALL_DIR}
25+
26+
@if [ ! -x "${UV_INSTALL_DIR}/task" ]; then \
2727
printf "$(BLUE)Installing go-task (Taskfile)$(RESET)\n"; \
28-
sh -c "$$(curl --location https://taskfile.dev/install.sh)" -- -d -b ./bin; \
29-
fi
30-
# install uv
31-
@if [ -x "./bin/uv" ]; then \
32-
printf "${BLUE}[INFO] uv already present in ./bin, skipping installation${RESET}\n"; \
33-
else \
34-
curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR="./bin" sh || { printf "${RED}[ERROR] Failed to install uv${RESET}\n"; exit 1; }; \
28+
curl --location https://taskfile.dev/install.sh | sh -s -- -d -b ${UV_INSTALL_DIR}; \
3529
fi
36-
# verify task is installed
37-
./bin/task --version
30+
3831

3932
install: install-task ## install
40-
./bin/task build:install
33+
@./bin/task build:install --silent
4134

4235
clean: install-task ## clean
43-
./bin/task cleanup:clean
36+
@./bin/task cleanup:clean --silent
4437

4538
##@ Development and Testing
46-
test: install ## run all tests
47-
./bin/task docs:test
39+
test: install-task ## run all tests
40+
@./bin/task docs:test --silent
4841

49-
marimo: install ## fire up Marimo server
50-
./bin/task docs:marimo
42+
marimo: install-task ## fire up Marimo server
43+
@./bin/task docs:marimo --silent
5144

5245
##@ Documentation
53-
book: test ## compile the companion book
54-
./bin/task docs:docs
55-
./bin/task docs:marimushka
56-
./bin/task docs:book
46+
book: install-task ## compile the companion book
47+
@./bin/task docs:test --silent
48+
@./bin/task docs:docs --silent
49+
@./bin/task docs:marimushka --silent
50+
@./bin/task docs:book --silent
5751

58-
fmt: install ## check the pre-commit hooks and the linting
59-
./bin/task quality:lint
52+
fmt: install-task ## check the pre-commit hooks and the linting
53+
@./bin/task quality:lint --silent
6054

61-
deptry: install ## check deptry
62-
./bin/task quality:deptry
55+
deptry: install-task ## run deptry if pyproject.toml exists
56+
@if [ -f pyproject.toml ]; then \
57+
./bin/task build:uv --silent; \
58+
echo "→ Running deptry..."; \
59+
./bin/task quality:deptry --silent; \
60+
else \
61+
echo "${GREEN} ⚠ Skipping deptry (no pyproject.toml)"; \
62+
fi
6363

6464
all: fmt deptry test book ## Run everything
6565
echo "Run fmt, deptry, test and book"

Taskfile.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
# - help: show all tasks including nested ones
1515

1616
version: '3'
17+
silent: true
1718

1819
# Variables
1920
vars:
2021
TESTS_FOLDER: tests
2122
MARIMO_FOLDER: book/marimo
22-
BOOK_TITLE: '{{.REPO_NAME}}'
23+
BOOK_TITLE: '{{env "REPO_NAME"}}' # defined below env section
2324
BOOK_SUBTITLE: 'Documentation and Reports'
2425
OPTIONS: ''
2526

@@ -38,9 +39,9 @@ env:
3839
REPO_NAME:
3940
sh: basename $(pwd)
4041

41-
LOG_INFO: 'printf "${BLUE}[INFO] %s${RESET}\n"'
42-
LOG_SUCCESS: 'printf "${GREEN}[SUCCESS] %s${RESET}\n"'
43-
LOG_ERROR: 'printf "${RED}[ERROR] %s${RESET}\n"'
42+
#LOG_INFO: 'printf "${BLUE}[INFO] %s${RESET}\n"'
43+
#LOG_SUCCESS: 'printf "${GREEN}[SUCCESS] %s${RESET}\n"'
44+
#LOG_ERROR: 'printf "${RED}[ERROR] %s${RESET}\n"'
4445

4546

4647
# Include task groups

0 commit comments

Comments
 (0)