Skip to content

packagecontrol/st_package_reviewer

Repository files navigation

st_package_reviewer

Build Status Coverage Status PyPI Python Versions

A tool to review packages for Sublime Text (and its package manager Package Control). Supports passing local file paths or URLs to GitHub repositories.

This README focuses on installation and usage of the tool. For how to resolve failures or warnings reported by the tool, refer to the wiki.

Installation

Requires Python 3.13.

$ pip install st-package-reviewer

Usage

usage: st_package_reviewer [-h] [--version] [--clip] [--repo-only] [-w] [-v]
                           [--debug]
                           [path_or_URL [path_or_URL ...]]

Check a Sublime Text package for common errors.

positional arguments:
  path_or_URL           URL to the repository or path to the package to be checked. If not provided, runs in interactive mode.

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --clip                Copy report to clipboard.
  --repo-only           Do not check the package itself and only its repository.
  -w, --fail-on-warnings
                        Return a non-zero exit code for warnings as well.
  -v, --verbose         Increase verbosity.
  --debug               Enter pdb on exceptions. Implies --verbose.

Return values:
    0: No errors
    -1: Invalid command line arguments

Additional return values in non-interactive mode (a combination of bit flags):
    1: Package check finished with failures
    2: Repository check finished with failures
    4: Unable to download repository

Interactive mode:
    Enter package paths or repository URLS continuously.
    Type `c` to copy the last report to your clipboard.

Development (uv, Python 3.13)

This repo uses uv and targets Python 3.13.

  • Setup environment: uv sync --group dev
  • Run the CLI: uv run st_package_reviewer --version
  • Run tests: uv run pytest
  • Lint: uv run flake8 .
  • Optional watch mode (loop on fail): uv run pytest -f
  • Optional parallel runs: uv run pytest -n auto

Development Workflow

  • Tests

    • Quick run: uv run pytest -q
    • With coverage: uv run pytest --cov st_package_reviewer --cov tests --cov-report term-missing
    • Watch mode (loop on fail): uv run pytest -f
    • Parallel runs: uv run pytest -n auto
  • Run the CLI during development

    • Are we there?: uv run st_package_reviewer --version
    • Interactive: uv run st_package_reviewer
    • Local path: uv run st_package_reviewer /path/to/package
    • GitHub repo URL: uv run st_package_reviewer https://github.com/owner/repo

Publishing

  • Just create a tag named vX.Y.Z (e.g., v0.4.0)
  • On tag push, .github/workflows/release.yml builds and uploads to PyPI

About

A tool to review packages for Sublime Text

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages