BiocSetup helps scaffold new Python packages in BiocPy with consistent configuration for package management.
It automates the setup process by using PyScaffold with additional configurations specific to BiocPy projects, including documentation setup, GitHub Actions for testing and publishing, and code quality tools.
For more details, see our developer guide.
pip install biocsetup
Create a new package using the command line:
biocsetup my-new-package --description "Description of my package" --license MIT
Options:
--description
,-d
: Project description--license
,-l
: License to use (default: MIT)--rst
: To use reStructuredText, otherwise uses Markdown by default.
You can also create packages programmatically:
from biocsetup import create_repository
create_repository(
project_path="my-new-package",
description="Description of my package",
license="MIT",
rst=False,
)
- The GitHub workflows use "trusted publisher workflow" to publish packages to PyPI. Read more instructions here.
- Tagging the repository will trigger an action to test, generate documentation, and publish the package to PyPI.
- Install tox to handle package tasks. GitHub Actions relies on the tox configuration to test, generate documentation, and publish packages.
- (Optional) Enable the pre-commit.ci bot for your repository.
- (Optional) Install ruff for code formatting.
- (Optional) Setup codecov for coverage reports.
This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.