pytemplate-uv 3.3.0__tar.gz → 3.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/CHANGELOG.md +10 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/PKG-INFO +37 -17
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/README.md +36 -16
- pytemplate_uv-3.4.0/docs/assets/logo.svg +10 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pyproject.toml +1 -1
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pyproject.toml.orig +1 -1
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/api.py +3 -1
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/packs.py +74 -4
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/schema.py +10 -0
- pytemplate_uv-3.4.0/tests/test_pack_manifest.py +90 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/LICENSE +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/docs/compatibility.md +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/agent_skill.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/cli_options.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/api.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/auth-api-key.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/auth-oidc.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/auth.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/cli.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/container.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/database.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/devcontainer.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/mcp.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/release.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/components/worker.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/configuration.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/errors.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/main.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/picker.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/post_create.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/profiles.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/py.typed +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/rendering.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/resolution.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/skills/pytemplate/SKILL.md +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/status.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/suggestions.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/copier.yml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/profile.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.devcontainer/devcontainer.json.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.dockerignore +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.env.example.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.github/dependabot.yml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.github/workflows/ci.yml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.gitignore.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.pre-commit-config.yaml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/AGENTS.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/CLAUDE.md +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/Dockerfile.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/README.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/SECURITY.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/alembic.ini.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/migrations/env.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/migrations/script.py.mako +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/migrations/versions/0001_create_examples.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/pyproject.toml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/conftest.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_api.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_api_key_auth.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_cli.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_database.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_jobs.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/integration/test_oidc_auth.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/test_examples.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/test_logging.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/test_principal.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/test_settings.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/unit/test_tasks.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ _copier_conf.answers_file }}.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/dependencies.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/errors.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/health.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/middleware.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/routers/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/routers/examples.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/routers/jobs.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/routers/me.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/api/schemas.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/application/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/application/examples.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/application/tasks.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/bootstrap/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/bootstrap/app.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/bootstrap/container.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/bootstrap/logging.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/bootstrap/settings.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/cli.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/domain/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/domain/errors.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/domain/examples.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/domain/ports.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/database/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/database/engine.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/database/models.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/database/repository.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/database/unit_of_work.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/memory.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/infrastructure/tasks.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/main.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/py.typed +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/api_key.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/audit.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/dependencies.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/oidc.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/principal.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/{{ package_name }}/security/rate_limit.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/profile.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.devcontainer/devcontainer.json.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.github/dependabot.yml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.github/workflows/ci.yml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.github/workflows/release.yml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.gitignore.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.mcp.json.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/.pre-commit-config.yaml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/AGENTS.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/CLAUDE.md +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/README.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/pyproject.toml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/tests/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/tests/test_core.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/tests/test_mcp_server.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/{{ _copier_conf.answers_file }}.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/{{ package_name }}/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/{{ package_name }}/core.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/{{ package_name }}/mcp_server.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/library/template/{{ package_name }}/py.typed +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/profile.toml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.devcontainer/devcontainer.json.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.dockerignore +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.github/dependabot.yml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.github/workflows/ci.yml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.github/workflows/release.yml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.gitignore.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.mcp.json.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/.pre-commit-config.yaml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/AGENTS.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/CLAUDE.md +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/Dockerfile.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/README.md.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/pyproject.toml.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/tests/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/tests/test_cli.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/tests/test_core.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/tests/test_mcp_server.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ _copier_conf.answers_file }}.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ package_name }}/__init__.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ package_name }}/cli.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ package_name }}/core.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ package_name }}/mcp_server.py.jinja +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/python/template/{{ package_name }}/py.typed +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/questions.yml +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/cli_runner.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/conftest.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_cli.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_composition.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_configuration.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_generated_projects.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_packs.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_picker.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_post_create.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_profiles.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_rendering.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_resolution.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_schema.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_skill.py +0 -0
- {pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/tests/test_status.py +0 -0
|
@@ -6,6 +6,16 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [3.4.0] — 2026-11-25
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `pytemplate-pack.toml` accepts two optional keys: `categories`, a list of lowercase slugs, and
|
|
14
|
+
`keywords`, at most 12 lowercase strings of up to 30 characters. Only their shape is checked; the
|
|
15
|
+
template hub owns the vocabulary. A wrong shape is refused with an error naming the key.
|
|
16
|
+
- `pytemplate.api` exports `PackManifest` and `read_pack_manifest()`, which read a pack's manifest
|
|
17
|
+
including the two keys. The published `pack` JSON Schema lists them.
|
|
18
|
+
|
|
9
19
|
## [3.3.0] — 2026-11-24
|
|
10
20
|
|
|
11
21
|
3.3.0 connects pytemplate-uv to pytemplate-hub, the index of template packs: the skill can find a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytemplate-uv
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: A deterministic application factory: uv-native Python and FastAPI projects from profiles, composable components, and template packs.
|
|
5
5
|
Keywords: uv,copier,template,project-generator,scaffold,fastapi,cli,sqlalchemy,alembic,oidc
|
|
6
6
|
Author: Leo Liu
|
|
@@ -35,29 +35,46 @@ Description-Content-Type: text/markdown
|
|
|
35
35
|
|
|
36
36
|
# pytemplate-uv
|
|
37
37
|
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="docs/assets/logo.svg" alt="pytemplate-uv logo" width="160">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center"><strong>Generate once. Own your code.</strong></p>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
|
|
38
46
|
[](https://pypi.org/project/pytemplate-uv/)
|
|
39
47
|
[](https://pypi.org/project/pytemplate-uv/)
|
|
40
48
|
[](https://github.com/yuxuzi/pytemplate-uv/actions/workflows/ci.yml)
|
|
41
49
|
[](LICENSE)
|
|
42
50
|
|
|
43
|
-
>
|
|
44
|
-
> with profiles, composable components, and template packs.
|
|
51
|
+
</p>
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
pytemplate-uv is a deterministic application factory that generates **uv-native** Python
|
|
54
|
+
projects: choose a profile (a typed CLI package or a FastAPI service), add components (database,
|
|
55
|
+
authentication, background jobs), and get a project that passes linting, formatting,
|
|
56
|
+
type-checking, and tests from its first commit.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uvx pytemplate-uv@latest create my-tool -y
|
|
60
|
+
cd my-tool
|
|
61
|
+
uv run pytest
|
|
62
|
+
```
|
|
51
63
|
|
|
52
64
|
- ✅ **Deterministic:** identical requests produce byte-identical projects
|
|
53
|
-
- ✅ **Checked:** every bundled component combination
|
|
65
|
+
- ✅ **Checked:** every bundled component combination is generated and checked in CI
|
|
54
66
|
- ✅ **uv-native:** generated projects need only `uv` and `uvx` (no pip, virtualenv activation, or make)
|
|
55
|
-
- ✅ **Extensible:** use template packs to customize without forking
|
|
56
67
|
- ✅ **Type-safe:** strict mypy on generated code; requests are validated before anything is written
|
|
68
|
+
- ✅ **Extensible:** use template packs to customize without forking
|
|
69
|
+
|
|
70
|
+
## Find templates
|
|
57
71
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
- **Browse** template packs on [pytemplate-hub](https://github.com/yuxuzi/pytemplate-hub), the
|
|
73
|
+
official index. Each listing is checked, and the hub stores references rather than files.
|
|
74
|
+
- **Copy a pinned command.** Each listed version gives a command pinned to the tag, commit, and
|
|
75
|
+
digest that were checked, so you render exactly what the hub reviewed.
|
|
76
|
+
See [Find templates on the hub](#find-templates-on-the-hub) for the walk-through.
|
|
77
|
+
- **Read** posts and the tutorial on the pytemplate website: <!-- TODO: site URL -->
|
|
61
78
|
|
|
62
79
|
## What you get
|
|
63
80
|
|
|
@@ -89,7 +106,7 @@ Every project generated from the bundled templates passes:
|
|
|
89
106
|
- ✅ Strict `mypy` (type safety)
|
|
90
107
|
- ✅ `pytest` (tests included)
|
|
91
108
|
|
|
92
|
-
This is verified across
|
|
109
|
+
This is verified across every bundled component combination on every commit. Projects from
|
|
93
110
|
your own template packs are not covered by these checks; test your pack the same way.
|
|
94
111
|
|
|
95
112
|
### Built for teams
|
|
@@ -109,8 +126,7 @@ your own template packs are not covered by these checks; test your pack the same
|
|
|
109
126
|
**The solution:**
|
|
110
127
|
- Start from reviewed patterns: layered architecture, health checks, structured logs, auth
|
|
111
128
|
behind a principal and scopes
|
|
112
|
-
- Every bundled component combination is generated and checked in CI
|
|
113
|
-
Linux and Windows)
|
|
129
|
+
- Every bundled component combination is generated and checked in CI, on Linux and Windows
|
|
114
130
|
- Script it: the same request always produces the same project
|
|
115
131
|
|
|
116
132
|
**Good fit for:**
|
|
@@ -302,7 +318,7 @@ the same layout as the bundled templates:
|
|
|
302
318
|
|
|
303
319
|
```
|
|
304
320
|
my-pack/
|
|
305
|
-
pytemplate-pack.toml # contract = 1, id, name, description, version
|
|
321
|
+
pytemplate-pack.toml # contract = 1, id, name, description, version; optional categories, keywords
|
|
306
322
|
copier.yml # _subdirectory: "{{ profile }}/template"; --- !include questions.yml
|
|
307
323
|
questions.yml # profile, project_name, package_name, components, ...
|
|
308
324
|
<profile>/profile.toml # the profile manifest (pytemplate schema profile)
|
|
@@ -321,6 +337,10 @@ pytemplate create my-tool -p tool --template gh:org/my-pack --template-ref v1.2.
|
|
|
321
337
|
- `_tasks`, `_migrations`, `_jinja_extensions`, `_external_data`, and symlinks are rejected,
|
|
322
338
|
including in files a pack's `copier.yml` includes.
|
|
323
339
|
- Pack-generated projects record the pack's source and tag.
|
|
340
|
+
- `pytemplate-pack.toml` may also list `categories` (lowercase slugs: letters, digits, and
|
|
341
|
+
hyphens, starting with a letter) and `keywords` (at most 12 lowercase strings of 1 to 30
|
|
342
|
+
characters, with no spaces at either end). Both are optional and checked for shape only; the
|
|
343
|
+
template hub decides their vocabulary. Wrong shapes are refused with the key named.
|
|
324
344
|
- Projects from a git pack also record the commit and digest they were rendered from. To refuse a
|
|
325
345
|
pack that changed, pin them:
|
|
326
346
|
```bash
|
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
# pytemplate-uv
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/assets/logo.svg" alt="pytemplate-uv logo" width="160">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center"><strong>Generate once. Own your code.</strong></p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
|
|
3
11
|
[](https://pypi.org/project/pytemplate-uv/)
|
|
4
12
|
[](https://pypi.org/project/pytemplate-uv/)
|
|
5
13
|
[](https://github.com/yuxuzi/pytemplate-uv/actions/workflows/ci.yml)
|
|
6
14
|
[](LICENSE)
|
|
7
15
|
|
|
8
|
-
>
|
|
9
|
-
> with profiles, composable components, and template packs.
|
|
16
|
+
</p>
|
|
10
17
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
pytemplate-uv is a deterministic application factory that generates **uv-native** Python
|
|
19
|
+
projects: choose a profile (a typed CLI package or a FastAPI service), add components (database,
|
|
20
|
+
authentication, background jobs), and get a project that passes linting, formatting,
|
|
21
|
+
type-checking, and tests from its first commit.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uvx pytemplate-uv@latest create my-tool -y
|
|
25
|
+
cd my-tool
|
|
26
|
+
uv run pytest
|
|
27
|
+
```
|
|
16
28
|
|
|
17
29
|
- ✅ **Deterministic:** identical requests produce byte-identical projects
|
|
18
|
-
- ✅ **Checked:** every bundled component combination
|
|
30
|
+
- ✅ **Checked:** every bundled component combination is generated and checked in CI
|
|
19
31
|
- ✅ **uv-native:** generated projects need only `uv` and `uvx` (no pip, virtualenv activation, or make)
|
|
20
|
-
- ✅ **Extensible:** use template packs to customize without forking
|
|
21
32
|
- ✅ **Type-safe:** strict mypy on generated code; requests are validated before anything is written
|
|
33
|
+
- ✅ **Extensible:** use template packs to customize without forking
|
|
34
|
+
|
|
35
|
+
## Find templates
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
- **Browse** template packs on [pytemplate-hub](https://github.com/yuxuzi/pytemplate-hub), the
|
|
38
|
+
official index. Each listing is checked, and the hub stores references rather than files.
|
|
39
|
+
- **Copy a pinned command.** Each listed version gives a command pinned to the tag, commit, and
|
|
40
|
+
digest that were checked, so you render exactly what the hub reviewed.
|
|
41
|
+
See [Find templates on the hub](#find-templates-on-the-hub) for the walk-through.
|
|
42
|
+
- **Read** posts and the tutorial on the pytemplate website: <!-- TODO: site URL -->
|
|
26
43
|
|
|
27
44
|
## What you get
|
|
28
45
|
|
|
@@ -54,7 +71,7 @@ Every project generated from the bundled templates passes:
|
|
|
54
71
|
- ✅ Strict `mypy` (type safety)
|
|
55
72
|
- ✅ `pytest` (tests included)
|
|
56
73
|
|
|
57
|
-
This is verified across
|
|
74
|
+
This is verified across every bundled component combination on every commit. Projects from
|
|
58
75
|
your own template packs are not covered by these checks; test your pack the same way.
|
|
59
76
|
|
|
60
77
|
### Built for teams
|
|
@@ -74,8 +91,7 @@ your own template packs are not covered by these checks; test your pack the same
|
|
|
74
91
|
**The solution:**
|
|
75
92
|
- Start from reviewed patterns: layered architecture, health checks, structured logs, auth
|
|
76
93
|
behind a principal and scopes
|
|
77
|
-
- Every bundled component combination is generated and checked in CI
|
|
78
|
-
Linux and Windows)
|
|
94
|
+
- Every bundled component combination is generated and checked in CI, on Linux and Windows
|
|
79
95
|
- Script it: the same request always produces the same project
|
|
80
96
|
|
|
81
97
|
**Good fit for:**
|
|
@@ -267,7 +283,7 @@ the same layout as the bundled templates:
|
|
|
267
283
|
|
|
268
284
|
```
|
|
269
285
|
my-pack/
|
|
270
|
-
pytemplate-pack.toml # contract = 1, id, name, description, version
|
|
286
|
+
pytemplate-pack.toml # contract = 1, id, name, description, version; optional categories, keywords
|
|
271
287
|
copier.yml # _subdirectory: "{{ profile }}/template"; --- !include questions.yml
|
|
272
288
|
questions.yml # profile, project_name, package_name, components, ...
|
|
273
289
|
<profile>/profile.toml # the profile manifest (pytemplate schema profile)
|
|
@@ -286,6 +302,10 @@ pytemplate create my-tool -p tool --template gh:org/my-pack --template-ref v1.2.
|
|
|
286
302
|
- `_tasks`, `_migrations`, `_jinja_extensions`, `_external_data`, and symlinks are rejected,
|
|
287
303
|
including in files a pack's `copier.yml` includes.
|
|
288
304
|
- Pack-generated projects record the pack's source and tag.
|
|
305
|
+
- `pytemplate-pack.toml` may also list `categories` (lowercase slugs: letters, digits, and
|
|
306
|
+
hyphens, starting with a letter) and `keywords` (at most 12 lowercase strings of 1 to 30
|
|
307
|
+
characters, with no spaces at either end). Both are optional and checked for shape only; the
|
|
308
|
+
template hub decides their vocabulary. Wrong shapes are refused with the key named.
|
|
289
309
|
- Projects from a git pack also record the commit and digest they were rendered from. To refuse a
|
|
290
310
|
pack that changed, pin them:
|
|
291
311
|
```bash
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 244 64" role="img" aria-label="pytemplate">
|
|
2
|
+
<!-- A snake wraps the wordmark: under the descenders, up around the end, head over "te". Outline the text before release. -->
|
|
3
|
+
<path d="M5 51C38 61 88 45 128 51S196 60 220 45C236 35 237 15 222 10C212 7 204 11 199 16" fill="none" stroke="#e8a317" stroke-width="6.5" stroke-linecap="round"/>
|
|
4
|
+
<path d="M5 51C38 61 88 45 128 51S196 60 220 45C236 35 237 15 222 10C212 7 204 11 199 16" fill="none" stroke="#7a4f00" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="1.5 7" opacity=".45"/>
|
|
5
|
+
<text x="12" y="41" font-family="Martian Mono, ui-monospace, monospace" font-weight="700" font-size="31" letter-spacing="-2.2" fill="#13201a"><tspan fill="#e8a317">py</tspan>template</text>
|
|
6
|
+
<path d="M5 51C38 61 88 45 128 51S196 60 220 45" fill="none" stroke="#e8a317" stroke-width="6.5" stroke-linecap="round" stroke-dasharray="0 22 40 400"/>
|
|
7
|
+
<ellipse cx="195" cy="18.5" rx="7.5" ry="5.2" transform="rotate(-32 195 18.5)" fill="#e8a317"/>
|
|
8
|
+
<circle cx="193" cy="16.2" r="1.3" fill="#13201a"/>
|
|
9
|
+
<path d="M188.5 22.5l-4 3.2m4-3.2l-4.6.4" stroke="#b42318" stroke-width="1.3" stroke-linecap="round"/>
|
|
10
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytemplate-uv"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.4.0"
|
|
4
4
|
description = "A deterministic application factory: uv-native Python and FastAPI projects from profiles, composable components, and template packs."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytemplate-uv"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.4.0"
|
|
4
4
|
description = "A deterministic application factory: uv-native Python and FastAPI projects from profiles, composable components, and template packs."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -19,7 +19,7 @@ from __future__ import annotations
|
|
|
19
19
|
from pytemplate.configuration import ConfigurationError
|
|
20
20
|
from pytemplate.configuration import load_render_request as load_request
|
|
21
21
|
from pytemplate.errors import PackError, RenderError, RequestError
|
|
22
|
-
from pytemplate.packs import TemplateSource, open_catalog
|
|
22
|
+
from pytemplate.packs import PackManifest, TemplateSource, open_catalog, read_pack_manifest
|
|
23
23
|
from pytemplate.profiles import (
|
|
24
24
|
Catalog,
|
|
25
25
|
Component,
|
|
@@ -45,6 +45,7 @@ __all__ = [
|
|
|
45
45
|
"ConfigurationError",
|
|
46
46
|
"ManifestError",
|
|
47
47
|
"PackError",
|
|
48
|
+
"PackManifest",
|
|
48
49
|
"Profile",
|
|
49
50
|
"ProfileNotFoundError",
|
|
50
51
|
"RenderError",
|
|
@@ -58,6 +59,7 @@ __all__ = [
|
|
|
58
59
|
"bundled_catalog",
|
|
59
60
|
"load_request",
|
|
60
61
|
"open_catalog",
|
|
62
|
+
"read_pack_manifest",
|
|
61
63
|
"plan",
|
|
62
64
|
"render",
|
|
63
65
|
"resolve",
|
|
@@ -32,11 +32,32 @@ BUNDLED = "bundled"
|
|
|
32
32
|
# Copier settings that run code, load extensions, or fetch data; packs must never declare them.
|
|
33
33
|
_UNSAFE_SETTINGS = ("_tasks", "_migrations", "_jinja_extensions", "_external_data")
|
|
34
34
|
_GIT_PREFIXES = ("gh:", "gl:", "git+", "https://", "http://", "ssh://", "git@", "file://")
|
|
35
|
-
_PACK_KEYS = frozenset(
|
|
35
|
+
_PACK_KEYS = frozenset(
|
|
36
|
+
{"contract", "id", "name", "description", "version", "categories", "keywords"}
|
|
37
|
+
)
|
|
38
|
+
MAX_KEYWORDS = 12
|
|
39
|
+
MAX_KEYWORD_LENGTH = 30
|
|
40
|
+
_CATEGORY = re.compile(r"[a-z][a-z0-9-]*")
|
|
36
41
|
_COMMIT = re.compile(r"^(?:[0-9a-f]{40}|[0-9a-f]{64})$")
|
|
37
42
|
_DIGEST = re.compile(r"^[0-9a-f]{64}$")
|
|
38
43
|
|
|
39
44
|
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class PackManifest:
|
|
47
|
+
"""The contents of a pack's ``pytemplate-pack.toml``.
|
|
48
|
+
|
|
49
|
+
``categories`` and ``keywords`` are optional and only checked for shape; the template hub
|
|
50
|
+
owns their vocabulary.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
id: str
|
|
54
|
+
name: str
|
|
55
|
+
description: str
|
|
56
|
+
version: str
|
|
57
|
+
categories: tuple[str, ...] = ()
|
|
58
|
+
keywords: tuple[str, ...] = ()
|
|
59
|
+
|
|
60
|
+
|
|
40
61
|
@dataclass(frozen=True)
|
|
41
62
|
class TemplateSource:
|
|
42
63
|
"""Where a project's templates came from, as recorded in its manifest."""
|
|
@@ -286,7 +307,48 @@ def _check_safe(root: Path) -> None:
|
|
|
286
307
|
_check_settings(root)
|
|
287
308
|
|
|
288
309
|
|
|
289
|
-
def
|
|
310
|
+
def _categories(data: dict[str, Any]) -> tuple[str, ...]:
|
|
311
|
+
value = data.get("categories", [])
|
|
312
|
+
if not isinstance(value, list) or not all(isinstance(item, str) for item in value):
|
|
313
|
+
raise PackError(
|
|
314
|
+
f"{PACK_FILE}: 'categories' must be a list of lowercase slugs, got {value!r}."
|
|
315
|
+
)
|
|
316
|
+
for item in value:
|
|
317
|
+
if not _CATEGORY.fullmatch(item):
|
|
318
|
+
raise PackError(
|
|
319
|
+
f"{PACK_FILE}: category {item!r} must be a lowercase slug: letters, digits, and "
|
|
320
|
+
"hyphens, starting with a letter."
|
|
321
|
+
)
|
|
322
|
+
return tuple(value)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
def _keywords(data: dict[str, Any]) -> tuple[str, ...]:
|
|
326
|
+
value = data.get("keywords", [])
|
|
327
|
+
if not isinstance(value, list) or not all(isinstance(item, str) for item in value):
|
|
328
|
+
raise PackError(f"{PACK_FILE}: 'keywords' must be a list of strings, got {value!r}.")
|
|
329
|
+
if len(value) > MAX_KEYWORDS:
|
|
330
|
+
raise PackError(
|
|
331
|
+
f"{PACK_FILE}: 'keywords' has {len(value)} entries; at most {MAX_KEYWORDS} are allowed."
|
|
332
|
+
)
|
|
333
|
+
for item in value:
|
|
334
|
+
if not item or item != item.strip() or item != item.lower():
|
|
335
|
+
raise PackError(
|
|
336
|
+
f"{PACK_FILE}: keyword {item!r} must be lowercase, with no spaces at either end."
|
|
337
|
+
)
|
|
338
|
+
if len(item) > MAX_KEYWORD_LENGTH:
|
|
339
|
+
raise PackError(
|
|
340
|
+
f"{PACK_FILE}: keyword {item!r} is {len(item)} characters; at most "
|
|
341
|
+
f"{MAX_KEYWORD_LENGTH} are allowed."
|
|
342
|
+
)
|
|
343
|
+
return tuple(value)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
def read_pack_manifest(root: Path) -> PackManifest:
|
|
347
|
+
"""Read and check the ``pytemplate-pack.toml`` of the pack at ``root``.
|
|
348
|
+
|
|
349
|
+
Raises ``PackError`` naming the file and key when the manifest is missing, malformed, or has
|
|
350
|
+
a key of the wrong shape.
|
|
351
|
+
"""
|
|
290
352
|
manifest = root / PACK_FILE
|
|
291
353
|
if not manifest.is_file():
|
|
292
354
|
raise PackError(f"{root} is not a template pack: {PACK_FILE} is missing.")
|
|
@@ -306,7 +368,14 @@ def _read_pack(root: Path) -> tuple[str, str]:
|
|
|
306
368
|
raise PackError(f"{PACK_FILE}: key '{key}' must be a non-empty string.")
|
|
307
369
|
if not (root / "copier.yml").is_file():
|
|
308
370
|
raise PackError(f"{root} is not a template pack: copier.yml is missing.")
|
|
309
|
-
return
|
|
371
|
+
return PackManifest(
|
|
372
|
+
id=str(data["id"]),
|
|
373
|
+
name=str(data["name"]),
|
|
374
|
+
description=str(data["description"]),
|
|
375
|
+
version=str(data["version"]),
|
|
376
|
+
categories=_categories(data),
|
|
377
|
+
keywords=_keywords(data),
|
|
378
|
+
)
|
|
310
379
|
|
|
311
380
|
|
|
312
381
|
def cache_dir() -> Path:
|
|
@@ -442,7 +511,8 @@ def open_catalog(
|
|
|
442
511
|
f"Template pack '{template}' at {ref} has digest {contents}, not the pinned "
|
|
443
512
|
f"{digest}. Nothing was rendered."
|
|
444
513
|
)
|
|
445
|
-
|
|
514
|
+
manifest = read_pack_manifest(root)
|
|
515
|
+
pack_id, pack_version = manifest.id, manifest.version
|
|
446
516
|
try:
|
|
447
517
|
catalog = load_catalog(root, root / "components")
|
|
448
518
|
except ManifestError as error:
|
|
@@ -24,6 +24,14 @@ _NAMES: dict[str, Any] = {"type": "array", "items": _TEXT, "uniqueItems": True}
|
|
|
24
24
|
_GROUPS: dict[str, Any] = {"type": "object", "additionalProperties": _NAMES}
|
|
25
25
|
_CONTRACT: dict[str, Any] = {"const": CONTRACT_VERSION}
|
|
26
26
|
_IDENTIFIER: dict[str, Any] = {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"}
|
|
27
|
+
_CATEGORY: dict[str, Any] = {"type": "string", "pattern": "^[a-z][a-z0-9-]*$"}
|
|
28
|
+
# The loader also refuses non-ASCII uppercase letters, which this ASCII pattern cannot express.
|
|
29
|
+
_KEYWORD: dict[str, Any] = {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 30,
|
|
33
|
+
"pattern": "^[^A-Z]*$",
|
|
34
|
+
}
|
|
27
35
|
|
|
28
36
|
|
|
29
37
|
def _object(properties: dict[str, Any], required: list[str], **extra: Any) -> dict[str, Any]:
|
|
@@ -126,6 +134,8 @@ PACK = _document(
|
|
|
126
134
|
"name": _TEXT,
|
|
127
135
|
"description": _TEXT,
|
|
128
136
|
"version": _TEXT,
|
|
137
|
+
"categories": {"type": "array", "items": _CATEGORY},
|
|
138
|
+
"keywords": {"type": "array", "maxItems": 12, "items": _KEYWORD},
|
|
129
139
|
},
|
|
130
140
|
["contract", "id", "name", "description", "version"],
|
|
131
141
|
),
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Optional ``categories`` and ``keywords`` in ``pytemplate-pack.toml``."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from conftest import write_pack
|
|
7
|
+
|
|
8
|
+
from pytemplate.errors import PackError
|
|
9
|
+
from pytemplate.packs import PACK_FILE, open_catalog, read_pack_manifest
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _with_keys(root: Path, extra: str) -> Path:
|
|
13
|
+
manifest = root / PACK_FILE
|
|
14
|
+
manifest.write_text(manifest.read_text(encoding="utf-8") + extra, encoding="utf-8")
|
|
15
|
+
return root
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_valid_categories_and_keywords_load(tmp_path: Path) -> None:
|
|
19
|
+
root = _with_keys(
|
|
20
|
+
write_pack(tmp_path / "pack"),
|
|
21
|
+
'categories = ["data", "risk-tools"]\nkeywords = ["backtest", "factor"]\n',
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
manifest = read_pack_manifest(root)
|
|
25
|
+
|
|
26
|
+
assert manifest.categories == ("data", "risk-tools")
|
|
27
|
+
assert manifest.keywords == ("backtest", "factor")
|
|
28
|
+
assert manifest.id == "demo-pack"
|
|
29
|
+
assert manifest.name == "Demo pack"
|
|
30
|
+
assert manifest.description == "A pack used by the tests."
|
|
31
|
+
assert manifest.version
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_boundary_values_are_accepted(tmp_path: Path) -> None:
|
|
35
|
+
twelve = ", ".join(f'"k{index}"' for index in range(12))
|
|
36
|
+
root = _with_keys(
|
|
37
|
+
write_pack(tmp_path / "pack"),
|
|
38
|
+
f'keywords = [{twelve}, "{"a" * 30}"]\n',
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
with pytest.raises(PackError, match="has 13 entries"):
|
|
42
|
+
read_pack_manifest(root)
|
|
43
|
+
|
|
44
|
+
root = _with_keys(write_pack(tmp_path / "other"), f"keywords = [{twelve}]\n")
|
|
45
|
+
assert len(read_pack_manifest(root).keywords) == 12
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_manifest_without_the_keys_still_loads(tmp_path: Path) -> None:
|
|
49
|
+
manifest = read_pack_manifest(write_pack(tmp_path / "pack"))
|
|
50
|
+
|
|
51
|
+
assert manifest.categories == ()
|
|
52
|
+
assert manifest.keywords == ()
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_pack_with_the_keys_still_opens_as_a_catalog(tmp_path: Path) -> None:
|
|
56
|
+
root = _with_keys(write_pack(tmp_path / "pack"), 'keywords = ["factor"]\n')
|
|
57
|
+
|
|
58
|
+
with open_catalog(str(root)) as (catalog, source, _):
|
|
59
|
+
assert source.pack_id == "demo-pack"
|
|
60
|
+
assert [profile.identifier for profile in catalog.profiles] == ["tool"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@pytest.mark.parametrize(
|
|
64
|
+
("extra", "message"),
|
|
65
|
+
[
|
|
66
|
+
('categories = "data"', r"'categories' must be a list of lowercase slugs, got 'data'"),
|
|
67
|
+
("categories = [3]", r"'categories' must be a list of lowercase slugs, got \[3\]"),
|
|
68
|
+
('categories = ["Data"]', r"category 'Data' must be a lowercase slug"),
|
|
69
|
+
('categories = ["risk tools"]', r"category 'risk tools' must be a lowercase slug"),
|
|
70
|
+
('categories = ["9lives"]', r"category '9lives' must be a lowercase slug"),
|
|
71
|
+
('keywords = "factor"', r"'keywords' must be a list of strings, got 'factor'"),
|
|
72
|
+
("keywords = [1]", r"'keywords' must be a list of strings, got \[1\]"),
|
|
73
|
+
(
|
|
74
|
+
"keywords = [" + ", ".join(f'"k{i}"' for i in range(13)) + "]",
|
|
75
|
+
r"'keywords' has 13 entries; at most 12 are allowed",
|
|
76
|
+
),
|
|
77
|
+
('keywords = ["Factor"]', r"keyword 'Factor' must be lowercase"),
|
|
78
|
+
('keywords = [" factor"]', r"keyword ' factor' must be lowercase"),
|
|
79
|
+
('keywords = [""]', r"keyword '' must be lowercase"),
|
|
80
|
+
(
|
|
81
|
+
'keywords = ["' + "a" * 31 + '"]',
|
|
82
|
+
r"keyword '" + "a" * 31 + r"' is 31 characters; at most 30 are allowed",
|
|
83
|
+
),
|
|
84
|
+
],
|
|
85
|
+
)
|
|
86
|
+
def test_invalid_shapes_name_the_file_and_key(tmp_path: Path, extra: str, message: str) -> None:
|
|
87
|
+
root = _with_keys(write_pack(tmp_path / "pack"), extra + "\n")
|
|
88
|
+
|
|
89
|
+
with pytest.raises(PackError, match=PACK_FILE + ": " + message):
|
|
90
|
+
read_pack_manifest(root)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.dockerignore
RENAMED
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.env.example.jinja
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/.gitignore.jinja
RENAMED
|
File without changes
|
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/AGENTS.md.jinja
RENAMED
|
File without changes
|
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/Dockerfile.jinja
RENAMED
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/README.md.jinja
RENAMED
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/SECURITY.md.jinja
RENAMED
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/alembic.ini.jinja
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytemplate_uv-3.3.0 → pytemplate_uv-3.4.0}/pytemplate/templates/fastapi/template/tests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|