-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates where old-style data file import was located
- Loading branch information
1 parent
b487a34
commit 7341436
Showing
2 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
# Copyright 2023 ACCESS-NRI and contributors. See the top-level COPYRIGHT file for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import os | ||
import importlib | ||
|
||
import intake | ||
|
||
## FIXME use correct package data handling | ||
_here = os.path.abspath(os.path.dirname(__file__)) | ||
data = intake.open_catalog(os.path.join(_here, "catalog.yaml")).access_nri | ||
data = intake.open_catalog( | ||
importlib.resources.files("access_nri_intake").joinpath("data/catalog.yaml") | ||
# os.path.join(_here, "catalog.yaml") | ||
).access_nri |