Skip to content

Utils Paths

Module: spectralbridge.utils.paths.

Path utilities for locating package data files.

API glossary ยท Workflow / scientific context

Signatures and documentation below are collected from the current source. Advanced objects are not newly declared stable by inclusion here.

Audience: public. Also exported as spectralbridge.utils.get_package_data_path.

get_package_data_path

get_package_data_path(filename: str) -> Path

Return the absolute path to a bundled data file.

Parameters:

Name Type Description Default
filename str

Package-relative resource name beneath spectralbridge/data; missing resources raise FileNotFoundError.

required

Returns:

Type Description
Path

Absolute existing bundled resource path.

Raises:

Type Description
FileNotFoundError

If a required source or completed artifact is absent.

See Also

spectralbridge.pipelines.pipeline.process_one_flightline : Related source-derived API contract.

Examples:

>>> from spectralbridge.utils import get_package_data_path
>>> assert get_package_data_path("landsat_band_parameters.json").is_file()