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
from pathlib import Path
import logging
# Single Phenopacket Validation
path = "path/to/phenopacket.json"
logger = logging.getLogger("phenosentry")
phenopacket = read_phenopacket(
        directory=Path(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.4.tar.gz (8.3 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.4-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phenosentry-0.1.4.tar.gz
  • Upload date:
  • Size: 8.3 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.4.tar.gz
Algorithm Hash digest
SHA256 ec600fab724a6d57e4e3582918a9586243b847e7786e0b789ce0289e620bd101
MD5 b858e1b142d449559bcd24fca9b7cd9d
BLAKE2b-256 505fa2b0b49491407e3cd6fcffb12541a01fdb69ffcd8f7ec0b20ee68bd092ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phenosentry-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7219dbcebbf9813e9acf904077cbf87b5a78828f3a52e92ce079221f11fe7da3
MD5 69bf40633c9f1adbf8dc9d79a2e0e5d7
BLAKE2b-256 3c1cee31897db83259c5c50db606f78d3fec4f3945592693caab95b5e1a277fc

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