Skip to content

Commit

Permalink
REF: use pkgutil (#8)
Browse files Browse the repository at this point in the history
* REF: use pkgutil

* proper module name
  • Loading branch information
martinfleis authored Feb 18, 2023
1 parent 4d0d5f3 commit c12236a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions geodatasets/data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import importlib.resources
import pkgutil

from . import json
from .lib import _load_json

json = importlib.resources.read_text(json, "database.json")
json = pkgutil.get_data("geodatasets", "json/database.json")

data = _load_json(json)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include = [
]

[tool.setuptools.package-data]
myModule = ["json/providers.json"]
json = ["json/providers.json"]

[tool.coverage.run]
omit = ["geodatasets/tests/*"]
Expand Down

0 comments on commit c12236a

Please sign in to comment.