Metadata-Version: 2.4
Name: pyci-check
Version: 0.1.2
Summary: Fast Python syntax and import checker for CI/CD and Git hooks
Project-URL: Homepage, https://github.com/coseto6125/pyci-check
Project-URL: Documentation, https://github.com/coseto6125/pyci-check/blob/main/docs/en/USAGE.md
Project-URL: Source Code, https://github.com/coseto6125/pyci-check
Project-URL: Bug Tracker, https://github.com/coseto6125/pyci-check/issues
Project-URL: Changelog, https://github.com/coseto6125/pyci-check/releases
Author-email: coseto6125 <enorenor@gmail.com>
License: MIT
License-File: LICENSE
Keywords: ci-cd,git-hooks,import-checker,linter,quality-assurance,syntax-checker
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff==0.14.6; extra == 'dev'
Description-Content-Type: text/markdown

# pyci-check

Fast Python syntax and import checker designed for CI/CD and Git hooks.

## Features

- ⚡ **High-performance parallel processing** - Uses ThreadPoolExecutor
- 🔍 **Dual-layer checking** - Syntax (AST) + Import (static/dynamic)
- 🎯 **Flexible scope** - Check entire project, directories, or specific files
- 🔧 **Auto-integrates ruff config** - Reads from `pyproject.toml`
- 🪝 **Git hooks support** - Append mode, preserves existing hooks
- 📦 **Zero external dependencies** - Uses only Python standard library
- 🌐 **Multi-language** - English, Traditional Chinese, Simplified Chinese

## Installation

```bash
pip install pyci-check
```

Or with uv (recommended):

```bash
# Preferred (adds to pyproject.toml)
uv add pyci-check

# Or direct install
uv pip install pyci-check
```

## Quick Start

```bash
# Check entire project (syntax + import static analysis)
pyci-check check .

# Check syntax only
pyci-check syntax

# Check imports (static, safe)
pyci-check imports

# Install Git pre-commit hook
pyci-check install-hooks
```

## Main Commands

- `check [paths...]` - Run all checks (syntax + import)
- `syntax [paths...]` - Check Python syntax only
- `imports [paths...]` - Check import dependencies only
- `install-hooks` - Install Git hooks (append mode)
- `uninstall-hooks` - Remove pyci-check's Git hooks

## Common Options

- `--quiet` - Reduce output
- `--fail-fast` - Stop on first error
- `--venv PATH` - Specify virtual environment
- `--i-understand-this-will-execute-code` - Enable dynamic import checking

## Configuration

Configure in `pyproject.toml`:

```toml
[tool.pyci-check]
language = "en"  # or "zh_TW", "zh_CN"
import-timeout = 30

# Auto-reads ruff config
[tool.ruff]
src = ["src", "tests"]
exclude = [".venv", "build", "dist"]
```

## Documentation

Full documentation available on GitHub:

- **[Full README](https://github.com/coseto6125/pyci-check#readme)** - Complete guide with examples
- **[Usage Guide](https://github.com/coseto6125/pyci-check/blob/main/docs/en/USAGE.md)** - Detailed usage and configuration
- **[Validation Docs](https://github.com/coseto6125/pyci-check/blob/main/docs/en/VALIDATION.md)** - Check documentation with examples
- **[中文文档](https://github.com/coseto6125/pyci-check/blob/main/README.zh-TW.md)** - Traditional Chinese
- **[简体中文](https://github.com/coseto6125/pyci-check/blob/main/README.zh-CN.md)** - Simplified Chinese

## CI/CD Integration

### GitHub Actions

```yaml
- name: Check Python syntax and imports
  run: |
    pip install pyci-check
    pyci-check check .
```

### With ruff

```bash
pyci-check check .      # Syntax + import checking
ruff check --fix        # Lint + auto-fix
ruff format             # Format
```

## License

MIT License

## Links

- **Homepage**: https://github.com/coseto6125/pyci-check
- **Documentation**: https://github.com/coseto6125/pyci-check/blob/main/docs/en/USAGE.md
- **Bug Reports**: https://github.com/coseto6125/pyci-check/issues
- **Changelog**: https://github.com/coseto6125/pyci-check/releases
