Skip to content

Code Fails on Import if Internet Connection is Disrupted #171

@Mjvolk3

Description

@Mjvolk3

Describe the bug
If there is a a break in internet connection programs fail on import of HyperNetX

To Reproduce
Steps to reproduce the behavior:

  1. Disconnect from internet
  2. Try to import

Expected behavior
Program fails because attempted schema download

schema_url = "https://raw.githubusercontent.com/pszufe/HIF_validators/main/schemas/hif_schema_v0.1.0.json"

https://github.com/pnnl/HyperNetX/blob/c1812a9211040fee4186df23669b05dcfe90d020/hypernetx/hif.py#L12C1-L12C107

Environment (please complete the following information):

  • OS independent

Additional context
I have fixed this locally by commenting out the import of of hif.py locally... But this will likely disturb other files. I would think that you could put the schema in the package via Manifest.

https://github.com/Mjvolk3/HyperNetX/blob/c1812a9211040fee4186df23669b05dcfe90d020/hypernetx/__init__.py#L6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions