Skip to content

Commit ab056ca

Browse files
committed
merge from master
2 parents 61b67d0 + 26e48e9 commit ab056ca

File tree

6 files changed

+375
-9
lines changed

6 files changed

+375
-9
lines changed

.github/workflows/test_template.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,40 @@ on: [push]
55
jobs:
66

77
test_template:
8-
runs-on: [ubuntu-latest, windows-latest, macos-latest]
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
vcs: [hg, git]
912
steps:
1013

14+
- name: Check out repository
15+
uses: actions/checkout@v5
16+
1117
- name: Set up python
12-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v6
1319
with:
14-
python-version: '3.12'
20+
python-version-file: 'pyproject.toml'
1521

16-
- name: Check out repository
17-
uses: actions/checkout@v3
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 "[email protected]"
37+
38+
- name: Test template instantiation
39+
run: uv run make test
40+
env:
41+
VCS: ${{ matrix.vcs }}
1842

19-
- name: Test
20-
run: make test
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_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": "Perfect_Minimum_FastAPI_Project",
4+
"project_name": "FastAPI Minimum Project",
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="[email protected]"},
7+
]
8+
readme = "README.rst"
9+
requires-python = ">=3.14"
10+
dependencies = [
11+
"cookiecutter",
12+
"mercurial",
13+
]

0 commit comments

Comments
 (0)