Skip to content

BiocPy/BiocSetup

Repository files navigation

PyPI-Server Unit tests Project generated with PyScaffold

BiocSetup

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.

Installation

pip install biocsetup

Usage

Command Line Interface

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)

Python API

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"
)

After setup

  • Add a secret variable, PYPI_API_TOKEN, to your repository containing the token for publishing the package to PyPI.
    • 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.

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.