No description
  • Python 70.7%
  • Jinja 29.3%
Find a file
Hao Liu 179e3dd8a3
fix: add pre-commit to template dev dependencies (#27)
The pre-commit config exists but the dependency was missing from the
templated project's pyproject.toml.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:07:20 -05:00
.github/workflows feat: test to run all checks after project init (#25) 2026-01-07 16:54:25 +01:00
src/platform_service_framework feat: add --core flag to update command (#14) 2025-12-12 10:55:13 -05:00
templates fix: add pre-commit to template dev dependencies (#27) 2026-01-23 10:07:20 -05:00
tests feat: test to run all checks after project init (#25) 2026-01-07 16:54:25 +01:00
.containerignore chore: ignore sqlite database files in containerignore 2025-12-19 11:48:06 -05:00
.gitignore chore: ignore sqlite database files 2025-12-19 11:47:19 -05:00
.python-version Fix TypeError: _eval_type() got an unexpected keyword argument 'prefer_fwd_module' in test 2025-11-19 14:29:54 -05:00
copier.yml feat: add core app template with User, Team, Organization models 2025-12-08 15:44:04 -05:00
pyproject.toml Configure linting and add workflow to run unit tests 2025-12-10 15:08:33 +00:00
README.md 📝 Update readme 2025-11-17 15:33:39 +00:00
uv.lock Add automatic template source detection for init and update commands 2025-11-21 22:13:26 +00:00

Platform Service Framework

Platform Service Framework initializes Django projects based on templates and keep project updated to follow the defined standards.

Features

  • Bootstrap new projects with init.
  • Bootstrap new apps for the project with init --apps.
  • Keep project updated with latest changes.
  • Leave apps/* untouched so developers can edit it.
  • Consolidates meta files such as pyproject, sonar, pre-commit, github actions, settings based on template standards + apps customizations.
  • Validate the whole project structure.

Requirements

  • git
  • uv

usage

Start a new project named my-project with a single app named api

$ uvx git+https://github.com/ansible/platform-service-framework init my-project
...
…………………………………………………………………………………………………………
Framework init finished
Created project at my-project/my_project
Created apps at my-project/apps/[api]
my-project
# Editable by developers
├── apps
│   ├── metadata/{pyproject,README,sonar,docs, AGENTS}
│   └── api/{viewsets,serializers,urls,permissions,settings...}.py

# Everything from here is not editable, will be overwritten by framework updates.
├── my_project
│   ├── asgi.py
│   ├── __init__.py
│   ├── settings.py
│   ├── tests
│   ├── urls.py
│   └── wsgi.py
├── docs
│   └── templates
├── LICENSE
├── manage.py
├── AGENTS.md
├── pyproject.toml
├── README.md
└── sonar-project.properties

Developers now can edit any file inside apps folder, this is the only folder unmanaged by subsequent framework updates, framework will consolidate the content of apps/metadata into the respective root folder file.

What is included?

  • UV based project
  • Django > 5
  • Django Ansible Base (dynamic)
  • pytest
  • ruff
  • ty
  • pdoc
  • poethepoet

How to manage the local project?

Dependencies

UV replaces PIP

uv sync
uv pip list

Repo Tasks

Poe replaces the makefile.

# list included tasks
$ uv run poe
Configured tasks:
  lint                  
  type_check            
  format                
  test                  
  check                 
  render-docs           
  serve-docs            
  clean

Unit tests

UV + Poe replaces tox.

uv run --isolated --python 3.12 pytest tests

Docs

Pdoc replaces sphinx

It is really simple, and develper focused, THIS IS NOT SUPPOSED TO BE CUSTOMER DOCS.

Pdoc generates docs from README files and python docstrings, doc is maintained together with the code.

uv run poe serve-docs

Format

Ruff replaces linters and black.

uv run poe format 

Type Checking

Ty Replaces Mypy

uv run poe type_check