Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lode"
version = "0.3.8"
version = "0.3.9"
description = "New reengineered version of LODE, maintained by OpenCitations"
authors = [{name = "Valentina Pasqual, Silvio Peroni", email = "valentina.pasqual2@unibo.it"}]
readme = "README.md"
Expand Down
10 changes: 6 additions & 4 deletions tests/test_static_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
ONTOLOGIES_PATH = Path(__file__).parent / "ontologies_spar.json"
URIS = [e["uri"] for e in json.loads(ONTOLOGIES_PATH.read_text(encoding="utf-8"))["uris"]]

from lode.viewer.base_viewer import SERIALIZATION_FORMATS

_EXTS = [f["ext"] for f in SERIALIZATION_FORMATS]


def _load(uri):
r = Reader()
Expand All @@ -46,7 +50,7 @@ def built(request, tmp_path_factory):
def test_index_and_ontology_serializations(built):
out = built["out"]
assert (out / "index.html").exists()
for ext in ("ttl", "rdf", "n3"):
for ext in _EXTS:
assert (out / f"ontology.{ext}").exists(), f"missing ontology.{ext}"


Expand All @@ -66,14 +70,12 @@ def test_every_html_resource_has_all_formats(built):
res = built["out"] / "resources"
html_files = list(res.rglob("*.html"))
assert html_files, f"no resource pages generated for {built['uri']}"

missing = []
for html in html_files:
for ext in ("ttl", "rdf", "n3"):
for ext in _EXTS:
sibling = html.with_suffix(f".{ext}")
if not sibling.exists():
missing.append(str(sibling.relative_to(built["out"])))

assert not missing, "missing serializations:\n" + "\n".join(missing)


Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading