Skip to main content

A local CI/CD simulation tool that runs quality checks, tests, and validations locally before publishing Python packages, ensuring higher build pass rates and faster feedback loops

Project description

QuickPub

Python 3.8+ License: MIT

Run quality checks, tests, and packaging locally before you publish a Python package.

QuickPub validates versions and project files, runs QA tools (mypy, pylint, pytest, unittest), builds the sdist, and uploads to PyPI/GitHub — so failures show up on your machine, not in CI.

Requirements

  • Python 3.8+
  • Tested on 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 (see CI)

Install

uv is the recommended workflow:

git clone https://github.com/danielnachumdev/quickpub.git
cd quickpub
uv sync

Runtime-only install:

uv sync --no-group dev --no-group test

Use as a CLI in another project:

uv add quickpub

Usage

Publish this repo

uv run python publish.py

Requires a valid .pypirc for PyPI upload. Set demo=True in publish.py to run checks without building or uploading.

Publish your own package

publish() runs enforcers, QA, file generation, build, and upload in one call:

from quickpub import (
    publish,
    MypyRunner,
    PylintRunner,
    PytestRunner,
    SetuptoolsBuildSchema,
    PypircUploadTarget,
    GithubUploadTarget,
    PypircEnforcer,
    ReadmeEnforcer,
    LicenseEnforcer,
    LocalVersionEnforcer,
    PypiRemoteVersionEnforcer,
)

publish(
    name="my-package",
    version="1.0.0",
    author="Your Name",
    author_email="you@example.com",
    description="My package",
    homepage="https://github.com/you/my-package",
    dependencies=["requests>=2.25.0"],
    min_python="3.8.0",
    enforcers=[
        PypircEnforcer(),
        ReadmeEnforcer(),
        LicenseEnforcer(),
        LocalVersionEnforcer(),
        PypiRemoteVersionEnforcer(),
    ],
    global_quality_assurance_runners=[
        MypyRunner(bound="<=20"),
        PylintRunner(bound=">=0.8"),
        PytestRunner(bound=">=0.95"),
    ],
    build_schemas=[SetuptoolsBuildSchema()],
    upload_targets=[PypircUploadTarget(), GithubUploadTarget()],
)

Omit python_interpreter_provider and package_manager to auto-detect the environment:

Project layout Package manager Python provider
uv.lock present UvPackageManager UvPythonProvider
otherwise PipPackageManager DefaultPythonProvider

Override for conda or mixed setups:

from quickpub import CondaPythonProvider, UnionProvider

publish(
    ...,
    python_interpreter_provider=UnionProvider([
        CondaPythonProvider(["base", "py39", "py38"]),
    ]),
)

Manual control: resolve_publish_environment() or explicit package_manager / python_interpreter_provider arguments.

What it does

Enforcers — README, LICENSE, .pypirc, local/PyPI version checks.

QA runners — mypy, pylint, pytest, unittest with configurable score bounds; runs in parallel across environments.

Build & upload — generates setup.py / pyproject.toml / MANIFEST.in, builds sdist, uploads via twine and/or git push.

Environment providersDefaultPythonProvider, UvPythonProvider, CondaPythonProvider, or UnionProvider to combine them.

Development

uv run pytest          # full test suite
uv run python publish.py  # publish quickpub itself

Tool config lives in pyproject.toml (pytest, mypy, pylint, coverage).

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quickpub-4.1.1.tar.gz (30.8 kB view details)

Uploaded Source

File details

Details for the file quickpub-4.1.1.tar.gz.

File metadata

  • Download URL: quickpub-4.1.1.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for quickpub-4.1.1.tar.gz
Algorithm Hash digest
SHA256 29556cf25749adec8826393774beff4a26b8bb1fe20493b0290ff210de4a2d37
MD5 64e15171f7526b22803d53d987756c38
BLAKE2b-256 b8045c731edace1155539a8624526aeec81a621b7d224c3c2a6d5e188d7594ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page