Skip to content

Commit 1c0c1cf

Browse files
committed
merge from fastapi-minimum
2 parents c5d9ce1 + ab056ca commit 1c0c1cf

File tree

6 files changed

+382
-22
lines changed

6 files changed

+382
-22
lines changed

.github/workflows/test_template.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,41 @@ on: [push]
44

55
jobs:
66

7-
test_template:
8-
runs-on: [ubuntu-latest, windows-latest, macos-latest]
9-
steps:
10-
11-
- name: Check out repository
12-
uses: actions/checkout@v5
13-
14-
- name: Install uv
15-
uses: astral-sh/setup-uv@v6
16-
with:
17-
version: "0.9.8"
18-
enable-cache: true
19-
20-
- name: Set up python
21-
uses: actions/setup-python@v6
22-
with:
23-
python-version-file: "pyproject.toml"
24-
25-
- name: Test
26-
run: make test
7+
test_template:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
vcs: [hg, git]
12+
steps:
13+
14+
- name: Check out repository
15+
uses: actions/checkout@v5
16+
17+
- name: Set up python
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version-file: 'pyproject.toml'
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v6
24+
with:
25+
version: "0.9.8"
26+
enable-cache: true
27+
28+
- name: Install dependencies
29+
run: uv sync --locked --no-install-project
30+
31+
- name: Set authorship for git
32+
if: matrix.vcs == 'git'
33+
run: |
34+
git config --global init.defaultBranch main
35+
git config --global user.name "GitHub Actions"
36+
git config --global user.email "actions@github.com"
37+
38+
- name: Test template instantiation
39+
run: uv run make test
40+
env:
41+
VCS: ${{ matrix.vcs }}
42+
43+
- name: Minimize uv cache
44+
run: uv cache prune --ci

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
TARGET_NAME := "fastapi_htmx_minimum"
22
PYTHON_VERSION := $(shell python --version | sed -r -e 's/Python //' -e 's/\.[0-9]+$$//')
3+
VCS ?= hg
34

45
test:
56
@echo Target: /tmp/$(TARGET_NAME)
@@ -14,6 +15,7 @@ test:
1415
project_slug: \"$(TARGET_NAME)\"\n\
1516
python_version: \"$(PYTHON_VERSION)\"\n\
1617
line_length: 100\n\
18+
version_control: \"$(VCS)\"\n\
1719
" > /tmp/$(TARGET_NAME).yml
1820

1921
cookiecutter --no-input --config-file /tmp/$(TARGET_NAME).yml \

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "",
33
"email": "",
4-
"project_name": "HTMX_Minimum_FastAPI_Project",
4+
"project_name": "FastAPI HTMX Minimum",
55
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
66
"python_version": "3.14",
77
"line_length": 100,

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[project]
2+
name = "perfect-python-project"
3+
version = "0.1.0"
4+
description = "This project template creates the basic structure for a Python project."
5+
authors = [
6+
{name="André Miras", email="andre.miras@example.com"},
7+
]
8+
readme = "README.rst"
9+
requires-python = ">=3.14"
10+
dependencies = [
11+
"cookiecutter",
12+
"mercurial",
13+
]

0 commit comments

Comments
 (0)