Skip to content

feat: implement python-based repository bootstrapping and modernize documentation#6

Merged
markurtz merged 13 commits into
mainfrom
feature/usage-upgrades
May 14, 2026
Merged

feat: implement python-based repository bootstrapping and modernize documentation#6
markurtz merged 13 commits into
mainfrom
feature/usage-upgrades

Conversation

@markurtz
Copy link
Copy Markdown
Owner

Description

This PR introduces a comprehensive overhaul to the repository bootstrapping process and modernizes the project's documentation infrastructure. It replaces the previous shell-based bootstrap script with a robust, type-safe Python implementation (scripts/bootstrap.py) that includes conditional toggles for project features, such as defaulting PyPI publishing workflows to an inactive state. Additionally, this PR addresses multiple documentation formatting issues, integrates coverage reporting, and resolves issues with the MkDocs version switcher.

Key changes include:

  • Bootstrap Process Improvements: Replaced scripts/bootstrap.sh with a comprehensive, fully tested Python script (scripts/bootstrap.py). Encapsulated bootstrap logic within a BootstrapConfig class, adding conditional toggling for PyPI publishing and automated regex-based template placeholder replacement.
  • Documentation Overhaul: Fixed the mike version dropdown, modernized documentation layout by migrating to native MkDocs Material attributes, updated links to be absolute, and relocated gen_ref_pages.py to the docs/ directory. Successfully integrated coverage reports into the documentation pipeline.
  • Project Structure & CI: Renamed the default source directory from project_name to template_python to be functional out-of-the-box. Updated GitHub Action configurations and resolved pre-commit CI pipeline issues.
  • Comprehensive Testing: Added full end-to-end and unit test coverage for the new Python bootstrapping infrastructure.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update (changes to README.md, SUPPORT.md, docstrings, etc.)
  • 🛠️ Maintenance/Refactoring (non-breaking change that improves code structure or quality)

Test Plan

  • Verified uv run scripts/bootstrap.py locally to confirm all placeholder templates are appropriately populated.
  • Validated that optional features like PyPI GitHub Actions are accurately toggled/disabled by default.
  • Served the documentation locally via hatch run docs:serve to confirm proper rendering of grid card layouts, the version switcher, and code coverage integration.
  • Ran the full test suite using hatch run test:all to verify that all new bootstrapping logic unit and end-to-end tests successfully pass without environmental side-effects.

Related Issues

Screenshots / Visuals (if applicable)

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests

Checklist

Important

Please review and complete this checklist before submitting your PR. This helps our maintainers process your contribution faster and ensures it meets the quality standards of template-python.

  • "I certify that all code in this PR is my own, except as noted below."
  • I have read the CONTRIBUTING.md guide.
  • My code follows the established style guidelines of template-python.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings or errors.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

markurtz added 4 commits May 13, 2026 22:21
…ng included in docs, and misc incorrect docs and incorrect references for the org and project due to intended replacement
…ject to ensure it is easy and foolproof to do and generates a usable repo while also ensuring template-python is a usable repo on its own
@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Failed or was cancelled. Check logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the shell bootstrap flow with a Python-based bootstrapper, renames the default package to template_python / template-python, and refreshes documentation, tests, and CI/doc workflows around the template repository.

Changes:

  • Adds scripts/bootstrap.py plus unit and E2E tests for repository bootstrapping.
  • Updates package/module references from project_name to template_python / template-python.
  • Modernizes docs, MkDocs API generation, coverage docs integration, and workflow dependencies.

Reviewed changes

Copilot reviewed 57 out of 60 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
scripts/bootstrap.py Adds Python bootstrap implementation and feature toggles.
scripts/bootstrap.sh Removes old shell bootstrapper.
scripts/README.md Documents new bootstrap script usage.
pyproject.toml Renames package, updates deps, docs deps, scripts, tooling config.
uv.lock Updates lockfile for renamed package and new dependencies.
src/template_python/* Updates package docs/imports/env prefixes and CLI entrypoint.
tests/** Updates imports/expectations and adds bootstrap tests.
docs/** Updates documentation content and generated API reference setup.
.github/workflows/* Adjusts docs dependencies and disables PyPI publish steps by default.
.github/ISSUE_TEMPLATE/* Updates template repository references.
.github/PULL_REQUEST_TEMPLATE.md Updates PR template wording/references.
README.md Updates bootstrap guidance and project references.
AGENTS.md, CONTRIBUTING.md, DEVELOPING.md, SECURITY.md, SUPPORT.md, CODE_OF_CONDUCT.md, NOTICE, CITATION.cff Updates repository metadata and documentation references.
Dockerfile, docker-compose.yml Updates container/module references.
examples/** Updates example imports and docs.
.env.example, .editorconfig, .gitignore Updates default names and generated-file paths.
llms.txt, llms-full.txt Updates LLM-facing documentation references.
mkdocs.yml Adds generated API docs plugins and updated site metadata.
Comments suppressed due to low confidence (1)

src/template_python/logging.py:6

  • The updated module docstring is grammatically incomplete: “It handles dynamic OpenTelemetry formatting, across...” is missing the object that was removed from the sentence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/bootstrap.py Outdated
Comment thread scripts/bootstrap.py
Comment thread scripts/bootstrap.py
Comment thread scripts/bootstrap.py Outdated
Comment thread tests/e2e/test_bootstrap.py
Comment thread NOTICE
Comment thread examples/example_template/README.md Outdated
Comment thread llms-full.txt Outdated
Comment thread CODE_OF_CONDUCT.md
Comment thread scripts/bootstrap.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Failed or was cancelled. Check logs

@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Completed successfully. View Run Details

markurtz and others added 3 commits May 14, 2026 15:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Failed or was cancelled. Check logs

- Replace {{year}} placeholder instead of all "2026" literals to avoid corrupting unrelated content
- Add Path.cwd() support to E2E test MockPath class
- Add noqa: E402 to suppress import-after-sys.path.insert lint errors in test files

Agent-Logs-Url: https://github.com/markurtz/template-python/sessions/cffd9703-e40f-459e-9641-1018b1db6dd8

Co-authored-by: markurtz <12499095+markurtz@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Failed or was cancelled. Check logs

@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Completed successfully. View Run Details

markurtz and others added 2 commits May 14, 2026 16:05
- Fix example template README to use correct module name (template_python instead of template-python)
- Update llms-full.txt to reference bootstrap.py script instead of manual find-and-replace
- Fix BootstrapConfig.create() to include default global_blacklist for programmatic usage

Agent-Logs-Url: https://github.com/markurtz/template-python/sessions/cb6d7229-712f-41d2-bb7e-c18a17906cac

Co-authored-by: markurtz <12499095+markurtz@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

CI Development Pipeline Status

Pipeline: Completed successfully. View Run Details

@markurtz markurtz merged commit 4206e1a into main May 14, 2026
13 checks passed
@markurtz markurtz deleted the feature/usage-upgrades branch May 14, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants