Skip to main content

Example Package

Project description

biocommons.example Test Package

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

Setup like this:

make devready
source venv/bin/activate

Code reformatting:

make reformat

Test:

make test   # for current environment
make tox    # for Python 3.9 and Python 3.10

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 reformatting with black and isort
  • GitHub Actions for testing and packaging

To Do

  • Docs (mkdocs w/mkdocstrings or sphinx)
  • Dockerfile
  • test only certain tags
  • fixture example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biocommons.example-0.0.3.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

biocommons.example-0.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file biocommons.example-0.0.3.tar.gz.

File metadata

  • Download URL: biocommons.example-0.0.3.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for biocommons.example-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3aff5a6552887da0c367da2cd4eb5a420d43f4ddc17c1512637b08a3fe784a6a
MD5 a7acb7b9290fba9b9839733b48fde705
BLAKE2b-256 9e731a8c374029571646bccbabb517532c52becc714b8a4ef7cdba49428bc4d9

See more details on using hashes here.

File details

Details for the file biocommons.example-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for biocommons.example-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b499b9187f51011375276d22efa2067988d5928842751d058585177cfa9218
MD5 939c655af7d90568e98742f3766d2e17
BLAKE2b-256 a292f0843a211983fd71c258468586282658180b689153d2c4160b9b084505eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page