diff --git a/setup.cfg b/setup.cfg index c0f61da..2f3da0e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,8 +40,6 @@ collect_ignore = ['setup.py'] [options] packages = find: -package_dir = - = stac_ipyleaflet include_package_data=True zip_safe=False tests_require=[pytest>=3] diff --git a/stac_ipyleaflet/core.py b/stac_ipyleaflet/core.py index a6d6648..eaa7c54 100644 --- a/stac_ipyleaflet/core.py +++ b/stac_ipyleaflet/core.py @@ -6,7 +6,7 @@ import requests from ipyleaflet import Map, DrawControl, WidgetControl, TileLayer, Popup -from stac_discovery.stac_widget import StacDiscoveryWidget +from stac_ipyleaflet.stac_discovery.stac_widget import StacDiscoveryWidget from importlib.resources import files from IPython.display import display import ipywidgets diff --git a/stac_ipyleaflet/stac_discovery/stac_widget.py b/stac_ipyleaflet/stac_discovery/stac_widget.py index c2c9306..d232c89 100644 --- a/stac_ipyleaflet/stac_discovery/stac_widget.py +++ b/stac_ipyleaflet/stac_discovery/stac_widget.py @@ -1,6 +1,6 @@ from ipywidgets import VBox, Output, Layout, Text, ToggleButtons, Dropdown, DatePicker, HBox, Textarea, Checkbox import pandas as pd -import ipyevents +from importlib.resources import files from datetime import datetime from pathlib import Path from typing import Any @@ -21,7 +21,7 @@ def template(self) -> VBox(): padding = "0px 0px 0px 5px" style = {"description_width": "initial"} - nasa_cmr_path = Path("stac_ipyleaflet/stac_discovery/catalogs/nasa_maap_stac.tsv") + nasa_cmr_path = files("stac_ipyleaflet") / "stac_discovery" / "catalogs" / "nasa_maap_stac.tsv" stac_info = { "MAAP STAC": { "filename": nasa_cmr_path,