Metadata-Version: 2.1
Name: phenosentry
Version: 0.1.4
Summary: 
Author: Michael Gargano
Author-email: Michael.Gargano@jax.org
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: certifi (>=2025.4.26,<2026.0.0)
Requires-Dist: click (>=8.2.1,<9.0.0)
Requires-Dist: hpo-toolkit (>=0.5.5,<0.6.0)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: phenopackets (>=2.0.2.post4,<3.0.0)
Requires-Dist: stairval (>=0.2.0,<0.3.0)
Description-Content-Type: text/markdown

# 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](https://python-poetry.org/):

```bash
poetry add phenosentry
```
or with pip:

```bash
pip install phenosentry
```

# Usage
command line interface (CLI):
```bash
phenosentry validate
```

or in Python code:

```python
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:

```bash
poetry run pytest
```

Run lint with:
```bash
poetry run ruff check phenosentry
```

# License 
MIT License
