Skip to content

Commit

Permalink
Merge pull request #104 from iolanta-tech/from-rdf-manifest-tjs01
Browse files Browse the repository at this point in the history
`fromRdf-manifest#tjs01` is now 🟢
  • Loading branch information
anatoly-scherbakov committed Jun 16, 2024
2 parents a124a2a + e4ebed2 commit f737385
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions tests/test_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,7 @@ def test_expand(
def test_from_rdf(
test_case: TestCase,
):
input_dataset = _pyld_dataset_from_rdflib_graph(
rdflib.Graph().parse(test_case.input, format='nquads'),
)

if isinstance(input_dataset, list):
input_dataset = {'@default': input_dataset}

actual_ld = yaml_ld.from_rdf(input_dataset)
actual_ld = yaml_ld.from_rdf(test_case.raw_document)

expected_ld = json.loads(test_case.raw_expected_document)
assert actual_ld == expected_ld
Expand Down
2 changes: 1 addition & 1 deletion yaml_ld/from_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FromRDFOptions(BaseOptions):

@validate_call(config=dict(arbitrary_types_allowed=True))
def from_rdf(
dataset: Dataset,
dataset: str,
options: FromRDFOptions = FromRDFOptions(),
) -> Document:
"""Convert a RDF dataset to a YAML-LD document."""
Expand Down

0 comments on commit f737385

Please sign in to comment.