Skip to main content

No project description provided

Project description

phenosentry

A Python package for ensuring data quality in phenopackets and collections of phenopackets.

Features

  • Load phenopacket stores from the phenopacket-store or ZIP archives
  • Load any phenopacket or phenopackets from a folder into a phenopacket store
  • Validate phenopacket stores with quality checks

Installation

Install with Poetry:

poetry add phenosentry

or with pip:

pip install phenosentry

Usage

command line interface (CLI):

phenosentry validate

or in Python code:

from phenosentry.model import AuditorLevel
from phenosentry.validation import get_phenopacket_auditor
from phenosentry.io import read_phenopacket
import logging
# Single Phenopacket Validation
path = "path/to/phenopacket.json"
logger = logging.getLogger("phenosentry")
phenopacket = read_phenopacket(
        directory=str(path),
        logger=logger,
)
# Strict Validation
auditor = get_phenopacket_auditor(AuditorLevel.STRICT)
notepad = auditor.prepare_notepad(auditor.id())
auditor.audit(
    item=phenopacket,
    notepad=notepad,
)
if notepad.has_errors_or_warnings(include_subsections=True):
    return "Not Valid Phenopacket"
else:
    return "Valid Phenopacket"

Development

Run tests with:

poetry run pytest

Run lint with:

poetry run ruff check phenosentry

License

MIT License

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

phenosentry-0.1.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phenosentry-0.1.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file phenosentry-0.1.3.tar.gz.

File metadata

  • Download URL: phenosentry-0.1.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.5.0

File hashes

Hashes for phenosentry-0.1.3.tar.gz
Algorithm Hash digest
SHA256 acb45dba1b075f09b8f86ddbb095ac447fa3775e1d71f093054339bf934cdf34
MD5 7bd8af3ba498b248bbb283a18e596163
BLAKE2b-256 17266c62f6665d08160d2dc9c9c3959f181a46c86bf291c320303ce2b07fd71f

See more details on using hashes here.

File details

Details for the file phenosentry-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: phenosentry-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/24.5.0

File hashes

Hashes for phenosentry-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c525e0d96e2876af9df51f67f03c464dc8243e016bde894295fb6df998430ef1
MD5 57c84e5439736dbe78488eec27df6c5a
BLAKE2b-256 e544fbb5b10177e2bded665dacfa3a513942b094fc2abf050121d5d5a076f7ce

See more details on using hashes here.

Supported by

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