Skip to main content

biocommons.example Test Package

codecov

This repo provides a template for biocommons Python packages. Here's how to use it:

  1. Click the Use this template button. Name the new repo like "biocommons.something".
  2. Clone your repo locally.
  3. In the repo, type make rename. The new name will be chosen based on the repo name.
  4. Remove this header.
  5. Commit and push.

Installation

To install from pypi: pip install biocommons.example

Developer Setup

Developers must install zsh, which is required by the Makefile. zsh is included by default in MacOS, and is readily available on all modern Linux distributions.

Setup like this:

make devready
source venv/bin/activate

Code reformatting:

make reformat

Install pre-commit hook:

# included in `make devready`, not necessary for new installations
pre-commit install

Test:

make test   # for current environment
make tox    # for all supported versions

Build:

git tag 0.0.0
make build

Try it:

$ python3 -m biocommons.example
Marvin says:
There's only one life-form as intelligent as me within thirty parsecs...

$ marvin-quote
Marvin says:
You think you've got problems? What are you supposed to do if you...

$ ipython
>>> from biocommons.example import __version__, get_quote_from_marvin
>>> __version__
'0.1.dev8+gd5519a8.d20211123'
>>> get_quote()
"The first ten million years were the worst, ...

Features

Code structure and features

  • Modern pyproject.toml with setuptools
  • Versioning based on git tag (only)
  • Easy development setup
  • Support for namespaces
  • Testing with coverage using pytest; tests may be in tests/, embedded in the package, and in doc strings
  • Examples for logging and package data
  • Command-line with argument parsing with argparse

DevOps

  • Quality tools: Code linting and reformatting with Ruff
  • GitHub Actions for testing and packaging

ToDo

  • Add devcontainer support

Release files for biocommons-example 0.0.5

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

Source distribution (sdist)

Source distribution for biocommons-example 0.0.5
File Size Uploaded
biocommons_example-0.0.5.tar.gz 21.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biocommons-example 0.0.5
File Interpreter ABI Platform
biocommons.example-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 36.3 kB

Release files / biocommons_example-0.0.5.tar.gz

Download URL biocommons_example-0.0.5.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1b98e8c78426174032afe1f51196d39a3bf9cac8cf1cc51c96d9d1c1697961b7
BLAKE2b-256 checksum
How to use checksums
30f60f4fd2d653253437bcef711a5a85eef51676254fc04f91b302eee0478f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / biocommons.example-0.0.5-py3-none-any.whl

Download URL biocommons.example-0.0.5-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95fdee77b3775e241d1a1a2d2e9ea60f9f23f397fc53c0e7dba685805532fe87
BLAKE2b-256 checksum
How to use checksums
9fcfb921abbc5b3ecb190dfce76d3d068d75d902fc8af2ab040245dcc075ee69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5
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