Skip to content

Loading json schema via pkgutil #995

@alexander-held

Description

@alexander-held

Question

This is a small suggestion, feel free to close without comment since the current implementation works perfectly fine as far as I can tell. I came across this stackoverflow comment when investigating how to validate against a json schema (which I need to obtain from my package), and had a look at how pyhf does it in parallel. The comment suggests using pkgutil instead of pkg_resources (which pyhf uses) or importlib.resources. See also the discussion below the comment, it seems like pkgutil might eventually be replaced by something else but seems fine for now.

Relevant Issues and Pull Requests

none I'm aware of

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions