Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ contact_links:
- name: pytest-cookies Information
url: https://pytest-cookies.readthedocs.io/en/latest/
about: pytest-cookie Website
- name: UV Information
url: https://docs.astral.sh/uv/
about: UV By Astral Website
1 change: 1 addition & 0 deletions .github/workflows/test-bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os:
- ubuntu-latest
- windows-latest
Expand Down
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
# Makefile for project needs
# Author: Ben Trachtenberg
# Version: 1.0.0
# Version: 1.0.1
#

.PHONY: all info coverage pytest black security
.PHONY: all info coverage pytest black security pip-export

info:
@echo "make options"
@echo " black To format code with black"
@echo " coverage To run coverage and display ASCII and output to htmlcov"
@echo " pytest To run pytest with verbose option"

all: black pylint coverage security vulnerabilities
all: black pylint coverage security pip-export vulnerabilities

coverage:
@pytest --cov --cov-report=html -vvv
@uv run pytest --cov --cov-report=html -vvv

pytest:
@pytest --cov -vvv
@uv run pytest --cov -vvv

pylint:
@pylint hooks/
@uv run pylint hooks/

black:
@black hooks/
@black tests/
@uv run black hooks/
@uv run black tests/

security:
@bandit -c pyproject.toml -r .
@uv run bandit -c pyproject.toml -r .

vulnerabilities:
@pip-audit -r requirements.txt
@uv run pip-audit -r requirements.txt

pip-export:
@uv export --no-dev --no-emit-project --no-editable > requirements.txt
@uv export --no-emit-project --no-editable > requirements-dev.txt
8 changes: 5 additions & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"3.10",
"3.11",
"3.12",
"3.13"
"3.13",
"3.14"
],
"package_manager": [
"uv",
Expand All @@ -47,7 +48,7 @@
"https"
],
"__template_repo": "https://github.com/btr1975/cookiecutter-python-fastapi-openapi",
"__template_version": "2.0.2",
"__template_version": "2.0.3",
"_new_lines": "\n",
"_copy_without_render": [
"{{cookiecutter.__app_name}}/templates",
Expand Down Expand Up @@ -77,7 +78,8 @@
"3.10": "3.10",
"3.11": "3.11",
"3.12": "3.12",
"3.13": "3.13"
"3.13": "3.13",
"3.14": "3.14"
},
"package_manager": {
"__prompt__": "Which pacakge manager for Python will be supported",
Expand Down
1 change: 1 addition & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'{% if cookiecutter.package_manager == "uv" %}requirements-dev.txt{% endif %}',
'{% if cookiecutter.package_manager == "uv" %}.github/workflows/publish-to-pypi.yml{% endif %}',
'{% if cookiecutter.package_manager == "uv" %}.github/workflows/test-coverage-lint.yml{% endif %}',
'{% if cookiecutter.package_manager == "uv" %}{{cookiecutter.__app_name}}/version.py{% endif %}',
]

REMOVE_PATHS_PIP = [
Expand Down
36 changes: 22 additions & 14 deletions make.bat
Original file line number Diff line number Diff line change
@@ -1,47 +1,55 @@
@ECHO OFF
REM Makefile for project needs
REM Author: Ben Trachtenberg
REM Version: 1.0.0
REM Version: 1.0.1
REM

IF "%1" == "all" (
black hooks\
black tests\
pylint hooks\
pytest --cov --cov-report=html -vvv
bandit -c pyproject.toml -r .
pip-audit -r requirements.txt
uv run black hooks\
uv run black tests\
uv run pylint hooks\
uv run pytest --cov --cov-report=html -vvv
uv run bandit -c pyproject.toml -r .
uv export --no-dev --no-emit-project --no-editable > requirements.txt
uv export --no-emit-project --no-editable > requirements-dev.txt
uv run pip-audit -r requirements.txt
GOTO END
)

IF "%1" == "coverage" (
pytest --cov --cov-report=html -vvv
uv run pytest --cov --cov-report=html -vvv
GOTO END
)

IF "%1" == "pylint" (
pylint hooks\
uv run pylint hooks\
GOTO END
)

IF "%1" == "pytest" (
pytest --cov -vvv
uv run pytest --cov -vvv
GOTO END
)

IF "%1" == "black" (
black hooks\
black tests\
uv run black hooks\
uv run black tests\
GOTO END
)

IF "%1" == "security" (
bandit -c pyproject.toml -r .
uv run bandit -c pyproject.toml -r .
GOTO END
)

IF "%1" == "vulnerabilities" (
pip-audit -r requirements.txt
uv run pip-audit -r requirements.txt
GOTO END
)

IF "%1" == "pip-export" (
uv export --no-dev --no-emit-project --no-editable > requirements.txt
uv export --no-emit-project --no-editable > requirements-dev.txt
GOTO END
)

Expand Down
65 changes: 65 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
[build-system]
requires = [
"setuptools>=67.6.0",
"wheel>=0.40.0"
]
build-backend = "setuptools.build_meta"

[project]
name = "cookiecutter-python-fastapi-openapi"
version = "2.0.3"
dynamic = ["readme"]
requires-python = ">=3.9"
description = "A cookiecutter for a python FastAPI Application"
keywords = [
]
authors = [
{ name="Benjamin P. Trachtenberg", email="e_ben_75-python@yahoo.com" },
]
maintainers = [
{name = "Benjamin P. Trachtenberg", email = "e_ben_75-python@yahoo.com"},
]
license = "MIT"
license-files = [
"LICENSE"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

dependencies = [
"cookiecutter~=2.6.0",
]

[dependency-groups]
dev = [
"pytest-cov~=4.1.0",
"pytest-cookies~=0.7.0",
"pylint~=3.0.2",
"pip-audit~=2.7.3",
"black~=24.10.0",
"bandit~=1.8.3",
]

[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}

[tool.pytest.ini_options]
addopts = "--strict-markers"
markers = [
Expand Down Expand Up @@ -35,3 +96,7 @@ exclude_dirs = [
"docs",
"{{cookiecutter.git_repo_name}}",
]

[tool.uv]
keyring-provider = "subprocess"
native-tls = true
Loading