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
29 changes: 29 additions & 0 deletions .github/workflows/template-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Template repository CI: bake the Copier template and run the generated
# project's full quality gate (Ruff, Pyrefly, pytest at 100% coverage).
# The generated project ships its own workflow at template/.github/workflows/build.yml.

name: Template CI

on:
push:
branches: [ main ]
pull_request:
branches: [ '**' ]

permissions:
contents: read

jobs:
bake:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install authoring dependencies
run: uv sync
- name: Bake and test the template
run: uv run pytest -v
171 changes: 22 additions & 149 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,164 +1,37 @@
# Byte-compiled / optimized / DLL files
# Template-authoring project (Cosmic FastAPI Copier template).
# The generated project ships its own .gitignore under template/.

# Python
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.Python

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Virtual environments
.venv/
venv/

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# uv
# (uv.lock IS tracked for the authoring project)

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
# Test & coverage artifacts
.pytest_cache/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
htmlcov/
reports/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# SQLite databases (default DATABASE_URL writes ./cosmic-fastapi.db)
*.db

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
# Tooling caches
.ruff_cache/
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
.pyrefly_cache/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
# Baked output / scratch
baked/
*.db

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
# IDE / OS
.idea/
.vscode/
.DS_Store
22 changes: 6 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
# Pre-commit hooks for the template-authoring repository.
# The generated project ships its own (richer) config under template/.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: check-json
- id: check-case-conflict
- id: end-of-file-fixer
exclude: '\.jinja$|/docs/.*\.png$'
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.1
hooks:
# Run the linter.
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
exclude: '\.jinja$'
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

Loading
Loading