Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

DatasetSearchHit.num_pifs returns None #251

@enze-chen

Description

@enze-chen

When return DatasetSearchHits using the SearchClient, the attribute num_pifs is not working properly. Instead of giving the number of PIFs in a dataset (intended), it appears to give None, always. Below is code that should reproduce the issue.

import os
from citrination_client import *

sc = CitrinationClient(os.environ['CITRINATION_API_KEY'], 'https://citrination.com').search
query = DatasetReturningQuery(
    size=100,
    query=DataQuery(
        system=PifSystemQuery(
            chemical_formula=ChemicalFieldQuery(
                filter=ChemicalFilter(
                    equal='As2S3')))))
res = sc.dataset_search(query)
print("The first dataset has {} PIFs.".format(res.hits[0].num_pifs))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions