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 .orpip install -e .). - Runs tests (
pytest,nose,unittest, or custom commands). - Builds the package (
build,poetry,flit, orhatch). - Uploads to PyPI or TestPyPI with
twine. - Increments version (major, minor, or patch) in
pyproject.tomlorsetup.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.
Metadata
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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oceancrow_autopublish-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for oceancrow_autopublish-0.6.0-py3-none-any.whl |
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
|
Security for OceanCrow-AutoPublish 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.