Metadata-Version: 2.4
Name: OceanCrow_AutoPublish
Version: 0.6.0
Summary: A universal tool to automate Python project installation, testing, building, PyPI upload, version incrementing, and Git push with dependency conflict detection.
Author-email: Sheldon Kenny Salmon <oceancrowtt@gmail.com>
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: toml>=0.10.2
Requires-Dist: gitpython>=3.1.43
Requires-Dist: tqdm>=4.66.5
Requires-Dist: keyring>=25.3.0
Requires-Dist: prompt_toolkit>=3.0.47
Requires-Dist: pipdeptree>=2.23.4
Requires-Dist: build>=1.2.2
Requires-Dist: twine>=5.1.1
Requires-Dist: pytest>=8.3.3
Provides-Extra: poetry
Requires-Dist: poetry>=1.8.3; extra == "poetry"
Provides-Extra: flit
Requires-Dist: flit>=3.9.0; extra == "flit"
Provides-Extra: nose
Requires-Dist: nose>=1.3.7; extra == "nose"
Provides-Extra: hatch
Requires-Dist: hatch>=1.12.0; extra == "hatch"
Dynamic: license-file

# OceanCrow_AutoPublish

A universal Python tool to automate installing, testing, building, uploading to PyPI, version incrementing, and pushing to a Git repository, with dependency conflict detection.

## Features
- Installs your project (`pip install .` or `pip install -e .`).
- Runs tests (`pytest`, `nose`, `unittest`, or custom commands).
- Builds the package (`build`, `poetry`, `flit`, or `hatch`).
- Uploads to PyPI or TestPyPI with `twine`.
- Increments version (major, minor, or patch) in `pyproject.toml` or `setup.py`.
- Commits and pushes to a Git repository.
- Cleans `dist/`, `build/`, and `*.egg-info/` directories.
- Securely manages PyPI credentials with `keyring`.
- Supports interactive mode for guided configuration.
- Verbose logging for detailed debugging.
- Detects dependency conflicts using `pipdeptree`.
- Configuration via `.autopublish.toml`.

## Installation
```bash
pip install OceanCrow_AutoPublish
Prerequisites
A Python project with pyproject.toml or setup.py.
Required dependencies: toml, gitpython, tqdm, keyring, prompt_toolkit, pipdeptree.
Optional dependencies: build, twine, pytest, poetry, flit, nose, hatch.
PyPI credentials (stored in keyring, ~/.pypirc, or environment variables).
A Git repository with a remote (origin).
Usage
cd your-python-project
OceanCrow_AutoPublish
Options:
--skip-tests: Skip running tests.
--dry-run: Simulate the process without executing commands.
--pypi-repo <repo>: Specify PyPI repository (e.g., pypi, testpypi).
--clean: Remove dist/, build/, and *.egg-info/ directories.
--version-type <type>: Version increment type (major, minor, patch).
--verbose: Enable detailed logging.
--interactive: Run in interactive mode with guided prompts.
Configuration
Create a .autopublish.toml in your project directory:
[autopublish]
install_type = "editable" # or "regular"
commit_message = "Release v1.0.0"
max_retries = 3
build_tool = "hatch" # or "build", "poetry", "flit"
test_tool = "pytest" # or "nose", "unittest"
test_command = "tox -e py39" # optional
version_type = "minor" # or "major", "patch"
check_dependencies = true # enable/disable dependency conflict check
Interactive Mode
OceanCrow_AutoPublish --interactive
Guides you through configuration with autocompletion and defaults, including dependency conflict checking.
Example
OceanCrow_AutoPublish --interactive --clean --pypi-repo testpypi --version-type minor --verbose
Dependency Conflict Detection
Checks for dependency conflicts using pipdeptree.
Warns if conflicts are detected, with an option to continue or abort.
Recommends running in a fresh virtual environment if conflicts are found.
Use --verbose to see the full dependency tree.
Credential Management
PyPI credentials are stored securely in keyring. On first use, you’ll be prompted to enter and optionally store your username and token.
Logs
Check OceanCrow_AutoPublish.log for detailed output. Use --verbose for more details.
CI/CD
See CONTRIBUTING.md for a GitHub Actions workflow to automate testing and PyPI publishing.
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License. See LICENSE for details.
