File size: 715 Bytes
d25e02b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""Backfill 3D shape features into the existing AromaRegistry SQLite database."""
from __future__ import annotations

import logging
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent.parent / "src"))

from pino.registry import AromaRegistry

logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
logger = logging.getLogger("backfill_shape_features")


def main() -> None:
    registry = AromaRegistry()
    registry.backfill_shape_features()
    record = registry.get("5989-27-5")  # Limonene
    if record:
        logger.info("Sample shape features for %s: %s", record["cas"], record.get("shape_features"))


if __name__ == "__main__":
    main()