Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: don't use kroki #2284

Merged
merged 1 commit into from
Mar 17, 2023
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
13 changes: 13 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,19 @@ tasks:
{{.DOCKER}} image push {{.OCI_REFERENCE}}:latest
{{.DOCKER}} image push {{.OCI_REFERENCE}}:${_latest_rdflib_version}
fi

docs:build-diagrams:
desc: Build documentation diagrams
cmds:
- cmd: |
shopt -s globstar;
for plantuml_file in ./**/*.plantuml
do
cat "${plantuml_file}" \
| docker run --rm -i plantuml/plantuml -tsvg -pipe \
> "${plantuml_file%.*}.svg"
done

_rimraf:
# This task is a utility task for recursively removing directories, it is
# similar to rm -rf but not identical and it should work wherever there is
Expand Down
58 changes: 58 additions & 0 deletions docs/_static/term_class_hierarchy.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@startuml
skinparam shadowing false
skinparam monochrome true
skinparam packageStyle rectangle
skinparam backgroundColor FFFFFE

class Node

class Identifier {
eq(other) -> bool
neq(other) -> bool
startswith(prefix: str, start, end) -> bool
}
Identifier -up-|> Node

class IdentifiedNode {
toPython() -> str
}
IdentifiedNode -up-|> Identifier

class URIRef {
n3(namespace_manager) -> str
defrag() -> URIRef
de_skolemize() -> BNode
}
URIRef -up-|> IdentifiedNode


class Genid
Genid -up-|> URIRef

class RDFLibGenid
RDFLibGenid -up-|> Genid

class BNode {
n3(namespace_manager) -> str
skolemize(authority, basepath) -> RDFLibGenid
}
BNode -up-|> IdentifiedNode

class Literal {
datatype: Optional[str]
lang: Optional[str]
value: Any

normalize() -> Literal
n3(namespace_manager) -> str
toPython() -> str
}
Literal -up-|> Identifier

class Variable {
n3(namespace_manager) -> str
toPython() -> str
}
Variable -up-|> Identifier

@enduml
1 change: 1 addition & 0 deletions docs/_static/term_class_hierarchy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"myst_parser",
"sphinxcontrib.kroki",
"sphinx.ext.autosectionlabel",
]

Expand Down
67 changes: 5 additions & 62 deletions docs/rdf_terms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,68 +17,11 @@ Class hierarchy
All terms in RDFLib are sub-classes of the :class:`rdflib.term.Identifier` class. A class diagram of the various terms is:

.. _term_class_hierarchy:
.. kroki::
:caption: Term Class Hierarchy
:type: plantuml

@startuml
skinparam shadowing false
skinparam monochrome true
skinparam packageStyle rectangle
skinparam backgroundColor FFFFFE

class Node

class Identifier {
eq(other) -> bool
neq(other) -> bool
startswith(prefix: str, start, end) -> bool
}
Identifier -up-|> Node

class IdentifiedNode {
toPython() -> str
}
IdentifiedNode -up-|> Identifier

class URIRef {
n3(namespace_manager) -> str
defrag() -> URIRef
de_skolemize() -> BNode
}
URIRef -up-|> IdentifiedNode


class Genid
Genid -up-|> URIRef

class RDFLibGenid
RDFLibGenid -up-|> Genid

class BNode {
n3(namespace_manager) -> str
skolemize(authority, basepath) -> RDFLibGenid
}
BNode -up-|> IdentifiedNode

class Literal {
datatype: Optional[str]
lang: Optional[str]
value: Any

normalize() -> Literal
n3(namespace_manager) -> str
toPython() -> str
}
Literal -up-|> Identifier

class Variable {
n3(namespace_manager) -> str
toPython() -> str
}
Variable -up-|> Identifier

@enduml
.. figure:: /_static/term_class_hierarchy.svg
:alt: Term Class Hierarchy

Term Class Hierarchy


Nodes are a subset of the Terms that underlying stores actually persist.

Expand Down
Loading