Skip to content

Commit

Permalink
expose load_registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Dec 19, 2023
1 parent 2f8f25c commit db805da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xhydro/testing/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"DATA_URL",
"DEVEREAUX",
"generate_registry",
"load_registry",
"populate_testing_data",
]

Expand Down Expand Up @@ -97,11 +98,13 @@ def generate_registry(


def load_registry() -> dict[str, str]:
"""Load the registry file for the test data."""
# Get registry file from package_data
registry_file = ilr.files("xhydro").joinpath("testing/registry.txt")
if registry_file.is_file():
logging.info("Registry file found in package_data: %s", registry_file)

# Load the registry file
registry = dict()
with registry_file.open() as buffer:
for entry in buffer.readlines():
Expand Down

0 comments on commit db805da

Please sign in to comment.