Skip to content

Bootstrap testdown as a typed Python library with uv, strict ruff, mypy, pytest, and CI/CD workflows#1

Merged
sernst merged 1 commit intomainfrom
copilot/setup-python-repo-workflows
Feb 28, 2026
Merged

Bootstrap testdown as a typed Python library with uv, strict ruff, mypy, pytest, and CI/CD workflows#1
sernst merged 1 commit intomainfrom
copilot/setup-python-repo-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Initializes the testdown repository as a properly structured Python library with tooling, type safety, and automated quality gates via GitHub Actions.

Project Structure

  • testdown/__init__.py — package entry point
  • tests/ — pytest test suite with initial smoke test

Tooling (pyproject.toml)

  • Build: hatchling backend, managed via uv
  • Lint/Format: ruff with 30+ rule sets (annotations, bugbear, security, naming, complexity, etc.) — strict enough to serve as an agentic acceptance criterion
  • Types: mypy in strict mode
  • Tests: pytest + pytest-cov, 80% branch coverage required
  • Optional dep: dftxt>=1.0 available as testdown[dftxt]

GitHub Actions

  • pull_request.yml: runs uvx ruff check, uvx ruff format --check, mypy, and pytest on PRs to main; scoped to permissions: contents: read
  • release.yml: triggers on v*.*.* tags, stamps version from tag via uv version, builds wheel + sdist, publishes to PyPI via OIDC trusted publishing (pypa/gh-action-pypi-publish)

Misc

  • uv.lock excluded from version control (library convention)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This will be a python repository using uv as the package manager, uvx ruff with a very strict configuration for formatting and linting (should be very strict to allow uvx ruff check to be a solid acceptance criteria for agentic development). It will optionally depend on the dftxt package. It will use mypy to ensure it is fully-typed and pytest with coverage for testing. It should have two github actions workflows, pull_request and release. The pull request should ensure quality and test validation. The release workflow is responsible for building wheels and publishing new versions based on the tag triggering the release (format will be a semantic version with a leading v like v0.0.0) to pypi.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Setup Python repository with uv and GitHub actions Bootstrap testdown as a typed Python library with uv, strict ruff, mypy, pytest, and CI/CD workflows Feb 28, 2026
@sernst sernst force-pushed the copilot/setup-python-repo-workflows branch 3 times, most recently from ad45545 to 8988c80 Compare February 28, 2026 13:21
Populate the repository with its initial implementation.
@sernst sernst force-pushed the copilot/setup-python-repo-workflows branch from 8988c80 to 678f608 Compare February 28, 2026 13:27
@sernst sernst merged commit 678f608 into main Feb 28, 2026
1 check passed
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.

2 participants