-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move rdf to fixtures, lint and typing updates
- Loading branch information
1 parent
ca2c791
commit fa3299a
Showing
7 changed files
with
76 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
# placing this in the root allows the tests in the 'tests' directory to import the packages in the root, e.g. 'dags' | ||
import pathlib | ||
|
||
import pytest | ||
import rdflib | ||
|
||
rdf_file = pathlib.Path(__file__).parent / "tests" / "fixtures" / "bf.ttl" | ||
|
||
|
||
@pytest.fixture | ||
def test_graph(): | ||
graph = rdflib.Graph() | ||
for ns in [ | ||
("bf", "http://id.loc.gov/ontologies/bibframe/"), | ||
("bflc", "http://id.loc.gov/ontologies/bflc/"), | ||
("sinopia", "http://sinopia.io/vocabulary/"), | ||
]: | ||
graph.namespace_manager.bind(ns[0], ns[1]) | ||
graph.parse(rdf_file, format="turtle") | ||
return graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters