Skip to main content

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

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.

Release files for OceanCrow-AutoPublish 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for OceanCrow-AutoPublish 0.6.0
File Interpreter ABI Platform
oceancrow_autopublish-0.6.0-py3-none-any.whl Python 3 none any Details

Release files / oceancrow_autopublish-0.6.0-py3-none-any.whl

Download URL oceancrow_autopublish-0.6.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
def22a26d7141847345aca9b19990b801c5e6e74e6ccb45268efa7919961c710
BLAKE2b-256 checksum
How to use checksums
4bd538f21813d4b9ff14a44219deb3625ee245b688b008ea33dd73d9fa3def72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.6.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page