Example Package
Project description
biocommons.example Test Package
This repo provides a template for biocommons Python packages. Here's how to use it:
- Click the Use this template button.
- Clone your repo locally.
- In the repo, type
make rename
. The new name will be chosen based on the repo name. - Remove this header.
- Commit and push.
Code Quality Status
Workflow | Description | Status |
---|---|---|
Pylint | static code analysis | |
Flake8 | style guide enforcement | |
Bandit | security checks | |
Pytest | unit testing |
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
Release history Release notifications | RSS feed
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.2.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file biocommons.example-0.0.2.tar.gz
.
File metadata
- Download URL: biocommons.example-0.0.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2fe5ae835d6ef61864d9495a0a754a371988ede222dbc1d1cfe3b4a73e18794 |
|
MD5 | 68ef92b01308b77b9c44c05a33477016 |
|
BLAKE2b-256 | 3b04d6f75ccf677b86a430214731cb6fc4e5c5a68d6fbc6472a1d73f2af78b57 |
File details
Details for the file biocommons.example-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: biocommons.example-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f748d76c8d6a9c2c161b540010a49614ae075888de576ac73cf47f57b44455f |
|
MD5 | 4a6b9edecd302f1d67983e8945c46405 |
|
BLAKE2b-256 | cd3e5789576a1ce66d0f94fd379cc7635b0de39fe97f36187b0ca5ddf036d0fc |