python-ci-setup

Configures Python packaging, linting, testing, and GitHub Actions CI for full-stack projects.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/DingJun1028/esggo-kv --skill python-ci-setup-dingjun1028
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-ci-setup
Source: https://github.com/DingJun1028/esggo-kv/tree/main/.agents/skills/python-ci-setup
Command: npx skills add https://github.com/DingJun1028/esggo-kv --skill python-ci-setup-dingjun1028

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, ruff, openpyxl, setuptools.

What problem does it solve? Python CI pipelines in Next.js or full-stack repositories often fail due to missing package structure, incorrect setuptools build-backends, or .gitignore rules blocking the package directory. This Skill bootstraps a working Python test and lint infrastructure from scratch. ## Core Features & Use Cases - Package Bootstrapping: Creates the esggo/ package with init.py and a shared config.py module exposing project paths. - pyproject.toml Configuration: Sets up setuptools build-backend, ruff lint rules, and pytest options compatible with Python 3.11+. - CI Workflow Setup: Provides GitHub Actions jobs for ruff linting and pytest runs, plus a troubleshooting table for common errors like build-backend import failures. - Use Case: Your repository's Python CI fails with "Cannot import 'setuptools.backends._legacy'" on Python 3.14. Use this Skill to fix the build-backend, create the package structure, and verify with ruff and pytest. ## Quick Start Set up the Python package structure, pyproject.toml, and CI workflow so that ruff and pytest pass in GitHub Actions.

Frequently Asked Questions about python-ci-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up pytest and ruff CI for a Python package?▼

Create a pyproject.toml with setuptools build-backend, define ruff lint rules and pytest testpaths, then add GitHub Actions jobs that install ruff and run pytest against the tests directory. Verify locally with ruff check and python -m pytest before pushing.

How to fix 'Cannot import setuptools.backends._legacy' error?▼

This error occurs when pyproject.toml uses setuptools.backends._legacy as the build-backend, which fails on Python 3.14 and newer. Replace it with setuptools.build_meta, which works across all supported Python versions.

Why does CI say my Python package directory is not found?▼

The package directory is likely matched by a rule in .gitignore, so it never gets committed. Run git check-ignore -v on the directory to identify the blocking rule, remove it from .gitignore, and commit the package files.

Does setuptools.build_meta work with Python 3.13 and 3.14?▼

Yes, setuptools.build_meta is the standard build-backend and works across Python 3.11, 3.13, and 3.14. The legacy setuptools.backends._legacy backend breaks on Python 3.14 and should be avoided.

Why do I get ModuleNotFoundError for my package in tests?▼

The package is not installed in the environment, so imports fail during pytest runs. Run pip install -e . to install it in editable mode, which makes the package importable both locally and in CI.