We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89ef56d commit 23a12d3Copy full SHA for 23a12d3
1 file changed
oemetadata/v2/v21/example.py
@@ -4,8 +4,14 @@
4
# SPDX-License-Identifier: MIT
5
6
import json
7
-import os
+from pathlib import Path
8
9
+from frictionless import Package
10
-with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f:
11
- OEMETADATA_V21_EXAMPLE = json.loads(f.read())
+
12
+BASE_PATH = Path(__file__).parent
13
14
+with open(BASE_PATH / "example.json", encoding="utf-8") as f:
15
+ descriptor = json.load(f)
16
17
+OEMETADATA_V21_EXAMPLE = Package(descriptor, basepath=str(BASE_PATH))
0 commit comments