Skip to content

Commit 23a12d3

Browse files
committed
Update example package #290
1 parent 89ef56d commit 23a12d3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

oemetadata/v2/v21/example.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
# SPDX-License-Identifier: MIT
55

66
import json
7-
import os
7+
from pathlib import Path
88

9+
from frictionless import Package
910

10-
with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f:
11-
OEMETADATA_V21_EXAMPLE = json.loads(f.read())
11+
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

Comments
 (0)