pylode 2.13.2__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyLODE-3.0.0/LICENSE +29 -0
- pyLODE-3.0.0/PKG-INFO +319 -0
- pyLODE-3.0.0/README.rst +287 -0
- pyLODE-3.0.0/pyLODE.egg-info/PKG-INFO +319 -0
- pyLODE-3.0.0/pyLODE.egg-info/SOURCES.txt +19 -0
- pyLODE-3.0.0/pyLODE.egg-info/requires.txt +3 -0
- pyLODE-3.0.0/pylode/__init__.py +7 -0
- pyLODE-3.0.0/pylode/__main__.py +6 -0
- pyLODE-3.0.0/pylode/cli.py +67 -0
- pyLODE-3.0.0/pylode/extra.py +6 -0
- pyLODE-3.0.0/pylode/ontdoc.py +671 -0
- {pyLODE-2.13.2/pylode/style → pyLODE-3.0.0/pylode}/pylode.css +80 -6
- pyLODE-3.0.0/pylode/rdf_elements.py +137 -0
- pyLODE-3.0.0/pylode/utils.py +795 -0
- pyLODE-3.0.0/pylode/version.py +1 -0
- pyLODE-3.0.0/setup.py +60 -0
- pyLODE-2.13.2/LICENSE +0 -643
- pyLODE-2.13.2/PKG-INFO +0 -880
- pyLODE-2.13.2/README.rst +0 -848
- pyLODE-2.13.2/pyLODE.egg-info/PKG-INFO +0 -880
- pyLODE-2.13.2/pyLODE.egg-info/SOURCES.txt +0 -80
- pyLODE-2.13.2/pyLODE.egg-info/requires.txt +0 -4
- pyLODE-2.13.2/pylode/__init__.py +0 -15
- pyLODE-2.13.2/pylode/cli.py +0 -217
- pyLODE-2.13.2/pylode/common.py +0 -227
- pyLODE-2.13.2/pylode/curies.py +0 -2208
- pyLODE-2.13.2/pylode/profiles/__init__.py +0 -5
- pyLODE-2.13.2/pylode/profiles/base.py +0 -587
- pyLODE-2.13.2/pylode/profiles/nmpf.py +0 -1331
- pyLODE-2.13.2/pylode/profiles/ontdoc.py +0 -1442
- pyLODE-2.13.2/pylode/profiles/prof.py +0 -274
- pyLODE-2.13.2/pylode/profiles/profile.py +0 -158
- pyLODE-2.13.2/pylode/profiles/vocpub.py +0 -639
- pyLODE-2.13.2/pylode/server.py +0 -60
- pyLODE-2.13.2/pylode/templates/agent.html +0 -11
- pyLODE-2.13.2/pylode/templates/agent.md +0 -11
- pyLODE-2.13.2/pylode/templates/namespaces.html +0 -11
- pyLODE-2.13.2/pylode/templates/namespaces.md +0 -7
- pyLODE-2.13.2/pylode/templates/nmpf/class.html +0 -131
- pyLODE-2.13.2/pylode/templates/nmpf/class.md +0 -43
- pyLODE-2.13.2/pylode/templates/nmpf/classes.html +0 -11
- pyLODE-2.13.2/pylode/templates/nmpf/classes.md +0 -7
- pyLODE-2.13.2/pylode/templates/nmpf/document.html +0 -45
- pyLODE-2.13.2/pylode/templates/nmpf/document.md +0 -16
- pyLODE-2.13.2/pylode/templates/nmpf/metadata.html +0 -127
- pyLODE-2.13.2/pylode/templates/nmpf/metadata.md +0 -111
- pyLODE-2.13.2/pylode/templates/nmpf/named_individual.html +0 -97
- pyLODE-2.13.2/pylode/templates/nmpf/named_individual.md +0 -37
- pyLODE-2.13.2/pylode/templates/nmpf/named_individuals.html +0 -11
- pyLODE-2.13.2/pylode/templates/nmpf/named_individuals.md +0 -7
- pyLODE-2.13.2/pylode/templates/nmpf/properties.html +0 -65
- pyLODE-2.13.2/pylode/templates/nmpf/properties.md +0 -45
- pyLODE-2.13.2/pylode/templates/nmpf/property.html +0 -129
- pyLODE-2.13.2/pylode/templates/nmpf/property.md +0 -37
- pyLODE-2.13.2/pylode/templates/ontdoc/class.html +0 -134
- pyLODE-2.13.2/pylode/templates/ontdoc/class.md +0 -43
- pyLODE-2.13.2/pylode/templates/ontdoc/classes.html +0 -11
- pyLODE-2.13.2/pylode/templates/ontdoc/classes.md +0 -7
- pyLODE-2.13.2/pylode/templates/ontdoc/document.html +0 -43
- pyLODE-2.13.2/pylode/templates/ontdoc/document.md +0 -16
- pyLODE-2.13.2/pylode/templates/ontdoc/metadata.html +0 -127
- pyLODE-2.13.2/pylode/templates/ontdoc/metadata.md +0 -111
- pyLODE-2.13.2/pylode/templates/ontdoc/named_individual.html +0 -65
- pyLODE-2.13.2/pylode/templates/ontdoc/named_individual.md +0 -25
- pyLODE-2.13.2/pylode/templates/ontdoc/named_individuals.html +0 -13
- pyLODE-2.13.2/pylode/templates/ontdoc/named_individuals.md +0 -7
- pyLODE-2.13.2/pylode/templates/ontdoc/properties.html +0 -65
- pyLODE-2.13.2/pylode/templates/ontdoc/properties.md +0 -45
- pyLODE-2.13.2/pylode/templates/ontdoc/property.html +0 -143
- pyLODE-2.13.2/pylode/templates/ontdoc/property.md +0 -37
- pyLODE-2.13.2/pylode/templates/orcid.html +0 -21
- pyLODE-2.13.2/pylode/templates/orcid.md +0 -1
- pyLODE-2.13.2/pylode/templates/prof/prof.html +0 -41
- pyLODE-2.13.2/pylode/templates/prof/prof.md +0 -16
- pyLODE-2.13.2/pylode/templates/prof/profile.html +0 -90
- pyLODE-2.13.2/pylode/templates/prof/profile.md +0 -85
- pyLODE-2.13.2/pylode/templates/prof/resource_descriptor.html +0 -49
- pyLODE-2.13.2/pylode/templates/prof/resource_descriptor.md +0 -21
- pyLODE-2.13.2/pylode/templates/vocpub/collection.html +0 -51
- pyLODE-2.13.2/pylode/templates/vocpub/collection.md +0 -23
- pyLODE-2.13.2/pylode/templates/vocpub/collections.html +0 -11
- pyLODE-2.13.2/pylode/templates/vocpub/collections.md +0 -7
- pyLODE-2.13.2/pylode/templates/vocpub/concept.html +0 -115
- pyLODE-2.13.2/pylode/templates/vocpub/concept.md +0 -40
- pyLODE-2.13.2/pylode/templates/vocpub/concept_hierarchy.html +0 -80
- pyLODE-2.13.2/pylode/templates/vocpub/concept_scheme.html +0 -105
- pyLODE-2.13.2/pylode/templates/vocpub/concept_scheme.md +0 -102
- pyLODE-2.13.2/pylode/templates/vocpub/concepts.html +0 -9
- pyLODE-2.13.2/pylode/templates/vocpub/concepts.md +0 -7
- pyLODE-2.13.2/pylode/templates/vocpub/taxonomy.html +0 -45
- pyLODE-2.13.2/pylode/templates/vocpub/taxonomy.md +0 -17
- pyLODE-2.13.2/setup.py +0 -68
- {pyLODE-2.13.2 → pyLODE-3.0.0}/pyLODE.egg-info/dependency_links.txt +0 -0
- {pyLODE-2.13.2 → pyLODE-3.0.0}/pyLODE.egg-info/entry_points.txt +0 -0
- {pyLODE-2.13.2 → pyLODE-3.0.0}/pyLODE.egg-info/top_level.txt +0 -0
- {pyLODE-2.13.2 → pyLODE-3.0.0}/setup.cfg +0 -0
pyLODE-3.0.0/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2002-2021, RDFLib Team
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
pyLODE-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pyLODE
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: An OWL ontology documentation tool using Python and templating, based on LODE.
|
|
5
|
+
Home-page: https://github.com/rdflib/pyLODE
|
|
6
|
+
Author: Nicholas J. Car
|
|
7
|
+
Author-email: nicholas.car@surroundaustralia.com
|
|
8
|
+
License: LICENSE
|
|
9
|
+
Download-URL: https://github.com/RDFLib/pyLODE/releases/tag/3.0.0
|
|
10
|
+
Project-URL: Bug Reports, https://github.com/rdflib/pyLODE/issues
|
|
11
|
+
Project-URL: Source, https://github.com/rdflib/pyLODE/
|
|
12
|
+
Keywords: Semantic Web,OWL,ontology,template,HTML,documentation
|
|
13
|
+
Platform: UNKNOWN
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Topic :: Utilities
|
|
16
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Description-Content-Type: text/x-rst
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
|
|
31
|
+
.. image:: https://rawcdn.githack.com/RDFLib/pyLODE/b1ff1b1e19262cdc21ee28c7362b1690ca18e30b/img/pyLODE-250.png
|
|
32
|
+
|
|
33
|
+
.. image:: https://badge.fury.io/py/pyLODE.svg
|
|
34
|
+
:target: https://badge.fury.io/py/pyLODE
|
|
35
|
+
|
|
36
|
+
pyLODE
|
|
37
|
+
******
|
|
38
|
+
An OWL ontology documentation tool using Python, based on LODE.
|
|
39
|
+
|
|
40
|
+
In addition to making web page, human-readable forms of ontologies, pyLODE encourages ontology annotation *best
|
|
41
|
+
practice* by only producing good results for well documented inputs! pyLODE defines what it considers 'well documented'
|
|
42
|
+
in sections below, e.g. `What pyLODE understands`_.
|
|
43
|
+
|
|
44
|
+
.. note::
|
|
45
|
+
|
|
46
|
+
This is pyLODE version 3.0.0 and it's vastly different from pyLODE < 3.0.0. It doesn't yet handle all the various "profiles" that pyLODE 2.13.2 does, such as SKOS _vocabularies_ & Profiles Vocabulary _profiles, it only handles OWL _ontologies_ nor all the special data types, such as JSON literals, BUT, it generates HTML in a much more straightforward manner and the code is both more efficient and much more maintainable, which is why it's been made. v 3.x will eventually catch up to all of v 2.13.2's features.
|
|
47
|
+
|
|
48
|
+
To access v 2.13.2 of pyLODE, either `download it from PyPI <https://pypi.org/project/pyLODE/2.13.2/>`_, `check it out from GitHub <https://github.com/RDFLib/pyLODE/releases/tag/2.13.2>`_ or access it via the `online service <http://pylode.surroundaustralia.com/>`_.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Contents
|
|
52
|
+
========
|
|
53
|
+
1. `Quick Intro`_
|
|
54
|
+
2. Use_
|
|
55
|
+
3. `What pyLODE understands`_
|
|
56
|
+
4. Examples_
|
|
57
|
+
5. Installation_
|
|
58
|
+
6. `Differences from LODE`_
|
|
59
|
+
7. `Releases`_
|
|
60
|
+
8. License_
|
|
61
|
+
9. Citation_
|
|
62
|
+
10. Collaboration_
|
|
63
|
+
11. Contacts_
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Quick Intro
|
|
67
|
+
===========
|
|
68
|
+
The Live OWL Documentation Environment tool
|
|
69
|
+
(`LODE <https://github.com/essepuntato/LODE>`__) is a well-known (in
|
|
70
|
+
Semantic Web circles) Java & XSLT-based tool used to generate
|
|
71
|
+
human-readable HTML documents for OWL and RDF ontologies. That tool is
|
|
72
|
+
now a bit dated (old-style HTML, use of older technologies like XSLT)
|
|
73
|
+
and it's (`online version <https://www.essepuntato.it/lode>`__) is not always
|
|
74
|
+
online.
|
|
75
|
+
|
|
76
|
+
This tool is a complete re-implementation of LODE's functionality using
|
|
77
|
+
Python and Python's RDF manipulation module,
|
|
78
|
+
`rdflib <https://pypi.org/project/rdflib/>`__. An ontology to be
|
|
79
|
+
documented is parsed and inspected using rdflib and HTML is generated
|
|
80
|
+
directly, using Python's `dominate <https://pypi.org/project/dominate/>`__
|
|
81
|
+
package.
|
|
82
|
+
|
|
83
|
+
Use
|
|
84
|
+
===
|
|
85
|
+
|
|
86
|
+
The tool can be used in multiple ways:
|
|
87
|
+
|
|
88
|
+
- BASH command line script
|
|
89
|
+
- pyLODE.sh in bin/
|
|
90
|
+
- Windows EXE
|
|
91
|
+
- pyLODE.exe in bin/
|
|
92
|
+
- Mac executable
|
|
93
|
+
- pyLODE in bin/
|
|
94
|
+
- Python Script
|
|
95
|
+
- cli.py or module
|
|
96
|
+
- as-a-service locally
|
|
97
|
+
- via the popular `Falcon framework <https://falconframework.org/>`__.
|
|
98
|
+
- see server.py in the main folder
|
|
99
|
+
- as-a-service online
|
|
100
|
+
- hosted at https://pylode.surroundaustralia.com
|
|
101
|
+
|
|
102
|
+
Command line arguments
|
|
103
|
+
----------------------
|
|
104
|
+
|
|
105
|
+
The BASH, Windows EXE and Python Script methods all use the same command line
|
|
106
|
+
arguments:
|
|
107
|
+
|
|
108
|
+
::
|
|
109
|
+
|
|
110
|
+
usage: cli.py [-h] [-v] [-o OUTPUTFILE] [-c {true,false}] input
|
|
111
|
+
|
|
112
|
+
positional arguments:
|
|
113
|
+
input Input file location or URL
|
|
114
|
+
|
|
115
|
+
optional arguments:
|
|
116
|
+
-h, --help show this help message and exit
|
|
117
|
+
-v, --version show program's version number and exit
|
|
118
|
+
-o OUTPUTFILE,
|
|
119
|
+
--outputfile OUTPUTFILE
|
|
120
|
+
A name you wish to assign to the output file. Will be
|
|
121
|
+
postfixed with .html if not already added. If no
|
|
122
|
+
output file is given, output will be printed to screen
|
|
123
|
+
-c {true,false},
|
|
124
|
+
--css {true,false}
|
|
125
|
+
Whether (true) or not (false) to include CSS within an
|
|
126
|
+
output HTML file.
|
|
127
|
+
|
|
128
|
+
Basic Use
|
|
129
|
+
^^^^^^^^^
|
|
130
|
+
|
|
131
|
+
* as a Python script
|
|
132
|
+
* executed in this directory
|
|
133
|
+
|
|
134
|
+
::
|
|
135
|
+
|
|
136
|
+
python pylode examples/minimal.ttl -o minimal.html
|
|
137
|
+
|
|
138
|
+
This will produce the file ``minimal.html`` in this directory which should
|
|
139
|
+
match exactly the file ``examples/minimal.html``.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
Examples
|
|
143
|
+
========
|
|
144
|
+
|
|
145
|
+
The `examples/ directory <https://github.com/RDFLib/pyLODE/tree/master/examples>`_
|
|
146
|
+
contains multiple pairs of RDF & HTML files generated from them using this
|
|
147
|
+
version of pyLODE.
|
|
148
|
+
|
|
149
|
+
You can also see rendered versions of these example files online too:
|
|
150
|
+
|
|
151
|
+
* `minimal.html <http://rdflib.dev/pyLODE/examples/ontdoc/minimal.html>`_
|
|
152
|
+
* `agift.html <http://rdflib.dev/pyLODE/examples/ontdoc/agift.html>`_
|
|
153
|
+
* `alternates.html <http://rdflib.dev/pyLODE/examples/ontdoc/alternates.html>`_
|
|
154
|
+
* `asgs.html <http://rdflib.dev/pyLODE/examples/ontdoc/asgs.html>`_
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
What pyLODE understands
|
|
158
|
+
=======================
|
|
159
|
+
|
|
160
|
+
pyLODE knows about definitional ontologies (``owl:Ontology``) and the major
|
|
161
|
+
elements usually fount in them, such as classes (``owl:Class`` or ``rdf:Class)
|
|
162
|
+
and properties (``rdf:Property`` & ``owl:ObjectProperty`` etc.).
|
|
163
|
+
|
|
164
|
+
To see what properties for ontology, class and RDF property documentation
|
|
165
|
+
pyLODE currently supports, just look in the ``rdf_elements.py`` file. All
|
|
166
|
+
elements' properties supported are given in property lists there.
|
|
167
|
+
|
|
168
|
+
pyLODES won't just translate everything that you can describe in RDF into
|
|
169
|
+
HTML! This is a conscious design choice to ensure that a certain conventional
|
|
170
|
+
style of documented ontology is produced. However, surrport for new
|
|
171
|
+
properties and ontology patterns can be made - just create an Issue on
|
|
172
|
+
`this project's Issue tracker <https://github.com/RDFLib/pyLODE/issues>`__.
|
|
173
|
+
|
|
174
|
+
While it *does* know about instance data, such as Named Individuals, it's
|
|
175
|
+
not really designed to document large ontologies containing class instances.
|
|
176
|
+
|
|
177
|
+
Notes on Agents
|
|
178
|
+
---------------
|
|
179
|
+
pyLODE can understand both simple and complex Agent objects. You can use
|
|
180
|
+
simple string properties like ``dc:contributor "Nicholas J. Car"`` too if
|
|
181
|
+
you really must but better would be to take advantage of real Linked Data
|
|
182
|
+
representation, e.g. complex Agent objects with web addresses, emails,
|
|
183
|
+
affiliations, ORCIDs and so on, e.g.:
|
|
184
|
+
|
|
185
|
+
::
|
|
186
|
+
|
|
187
|
+
<ontology_x>
|
|
188
|
+
dct:creator [
|
|
189
|
+
sdo:name "Nicholas J. Car" ;
|
|
190
|
+
sdo:identifier <http://orcid.org/0000-0002-8742-7730> ;
|
|
191
|
+
sdo:affiliation [
|
|
192
|
+
sdo:name "SURROUND Australia Pty Ldt." ;
|
|
193
|
+
sdo:url "https://surroundaustralia.com"^^xsd:anyURI ;
|
|
194
|
+
] ;
|
|
195
|
+
] ;
|
|
196
|
+
|
|
197
|
+
See all the properties in ``rdf_elements.py:AGENT_PROPS`` for a list of
|
|
198
|
+
all the Agent properties pyLODE can handle.
|
|
199
|
+
|
|
200
|
+
Installation
|
|
201
|
+
============
|
|
202
|
+
|
|
203
|
+
pyLODE is `on PyPI <https://pypi.org/project/pyLODE/>`_, so you can install
|
|
204
|
+
it using `pip <https://pypi.org/project/pip/>`_ as normal:
|
|
205
|
+
|
|
206
|
+
::
|
|
207
|
+
|
|
208
|
+
pip install pylode
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
Differences from LODE
|
|
212
|
+
=====================
|
|
213
|
+
- command line access
|
|
214
|
+
|
|
215
|
+
- you can use this on your own desktop so you don't need me to
|
|
216
|
+
maintain a live service for use
|
|
217
|
+
|
|
218
|
+
- use of modern simple HTML
|
|
219
|
+
|
|
220
|
+
- no JavaScript: pyLODE generates static HTML pages
|
|
221
|
+
|
|
222
|
+
- catering for a wider range of ontology options such as:
|
|
223
|
+
|
|
224
|
+
- schema.org ``domainIncludes`` & ``rangeIncludes`` for properties
|
|
225
|
+
|
|
226
|
+
- better Agent representation
|
|
227
|
+
|
|
228
|
+
- see the `Notes on Agents`_ section above
|
|
229
|
+
|
|
230
|
+
- smarter CURIES
|
|
231
|
+
|
|
232
|
+
- pyLODE caches and looks up well-known prefixes to make more/better
|
|
233
|
+
CURIES
|
|
234
|
+
- it tries to be smart with CURIE presentation by CURIE-ising all
|
|
235
|
+
URIs it finds, rather than printing them
|
|
236
|
+
|
|
237
|
+
- reference ontologies property labels
|
|
238
|
+
|
|
239
|
+
- pyLODE caches ~ 10 well-known ontologies (RDFS, SKOS etc), properties from which people often use for their ontology documentation. Where these properties are used, the background ontology's labels are use
|
|
240
|
+
|
|
241
|
+
- **active development**
|
|
242
|
+
|
|
243
|
+
- pyLODE has been under active development since mid-2019 and is
|
|
244
|
+
still very much actively developed - it's not just staying still
|
|
245
|
+
- it will be improved in foreseeable to cater for more and more things
|
|
246
|
+
- recent ontology documentation initiatives such as the `MOD
|
|
247
|
+
Ontology <https://github.com/sifrproject/MOD-Ontology>`__ will be
|
|
248
|
+
handled, if requested
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
Releases
|
|
252
|
+
========
|
|
253
|
+
pyLODE is under continual and constant development. The current developers have a roadmap for enhancements in mind,
|
|
254
|
+
which is given here, however, since this is an open source project, new developers may join the pyLODE dev community
|
|
255
|
+
and change/add development priorities.
|
|
256
|
+
|
|
257
|
+
Current Release
|
|
258
|
+
---------------
|
|
259
|
+
|
|
260
|
+
The current release, as of December, 2021, is **2.13.2**.
|
|
261
|
+
|
|
262
|
+
Release Schedule
|
|
263
|
+
----------------
|
|
264
|
+
|
|
265
|
+
.. csv-table:: **pyLODE Release Schedule**
|
|
266
|
+
:header: "Version", "Date", "Description"
|
|
267
|
+
:widths: 15, 10, 30
|
|
268
|
+
|
|
269
|
+
**3.0.0**, **6 Jan 2022**, "Direct HTML generation using dominate; easier to maintain and extend"
|
|
270
|
+
2.13.2, 21 December 2021, "Updated RDFlib to 6.1.1, improved test to properly use pytest"
|
|
271
|
+
2.10.0, 24 May 2021, "Update Windows EXE build process, simplified versioning"
|
|
272
|
+
2.9.1, 28 Apr 2021, "Support for ASCIIDOC format (OntDoc profile only)"
|
|
273
|
+
2.8.11, 28 Apr 2021, "Further changes for PyPI only"
|
|
274
|
+
2.8.10, 27 Apr 2021, "Further changes for PyPI only"
|
|
275
|
+
2.8.9, 27 Apr 2021, "PyPI enhancements only"
|
|
276
|
+
2.8.8, 27 Apr 2021, "Several small bugs fixed, auto-generation of version no. from Git tag"
|
|
277
|
+
2.8.6, 23 Feb 20201, "Fixing char encoding issues, updated examples, new test files style - per issue"
|
|
278
|
+
2.8.5, 5 Jan 20201, "Small enhancements to the Falcon server deployment option"
|
|
279
|
+
2.8.3, 3 July 2020, "Packaging bugfixes only"
|
|
280
|
+
2.7, 1 July 2020, "Much refactoring for new profile creation ease"
|
|
281
|
+
2.6, June 2020, "Supports PROF profiles as well as taxonomies & ontologies"
|
|
282
|
+
2.4, 27 May 2020, "Small improvements over 2.0"
|
|
283
|
+
2.0, 18 Apr 2020, "Includes multiple profiles - OWP & vocpub"
|
|
284
|
+
1.0, 15 Dec 2019, "Initial working release"
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
License
|
|
288
|
+
=======
|
|
289
|
+
This code is licensed using the BSD 3-Clause licence. See the `LICENSE
|
|
290
|
+
file <LICENSE>`_ for the deed. Note *Citation* below though for
|
|
291
|
+
attribution.
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
Citation
|
|
295
|
+
========
|
|
296
|
+
If you use pyLODE, please leave the pyLODE logo with a hyperlink back
|
|
297
|
+
here in the top left of published HTML pages.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
Collaboration
|
|
301
|
+
=============
|
|
302
|
+
The maintainers welcome any collaboration.
|
|
303
|
+
|
|
304
|
+
If you have suggestions, please email the contacts below or leave Issues
|
|
305
|
+
in this repository's `Issue tracker <https://github.com/rdflib/pyLODE/issues>`_.
|
|
306
|
+
|
|
307
|
+
But the very best thing you could do is create a Pull Request for us to
|
|
308
|
+
action!
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
Contacts
|
|
312
|
+
========
|
|
313
|
+
| *Author*:
|
|
314
|
+
| **Nicholas Car**
|
|
315
|
+
| *Data System Architect*
|
|
316
|
+
| `SURROUND Australia Pty Ltd <https://surroundaustralia.com>`_
|
|
317
|
+
| nicholas.car@surroundaustralia.com
|
|
318
|
+
|
|
319
|
+
|
pyLODE-3.0.0/README.rst
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
.. image:: https://rawcdn.githack.com/RDFLib/pyLODE/b1ff1b1e19262cdc21ee28c7362b1690ca18e30b/img/pyLODE-250.png
|
|
2
|
+
|
|
3
|
+
.. image:: https://badge.fury.io/py/pyLODE.svg
|
|
4
|
+
:target: https://badge.fury.io/py/pyLODE
|
|
5
|
+
|
|
6
|
+
pyLODE
|
|
7
|
+
******
|
|
8
|
+
An OWL ontology documentation tool using Python, based on LODE.
|
|
9
|
+
|
|
10
|
+
In addition to making web page, human-readable forms of ontologies, pyLODE encourages ontology annotation *best
|
|
11
|
+
practice* by only producing good results for well documented inputs! pyLODE defines what it considers 'well documented'
|
|
12
|
+
in sections below, e.g. `What pyLODE understands`_.
|
|
13
|
+
|
|
14
|
+
.. note::
|
|
15
|
+
|
|
16
|
+
This is pyLODE version 3.0.0 and it's vastly different from pyLODE < 3.0.0. It doesn't yet handle all the various "profiles" that pyLODE 2.13.2 does, such as SKOS _vocabularies_ & Profiles Vocabulary _profiles, it only handles OWL _ontologies_ nor all the special data types, such as JSON literals, BUT, it generates HTML in a much more straightforward manner and the code is both more efficient and much more maintainable, which is why it's been made. v 3.x will eventually catch up to all of v 2.13.2's features.
|
|
17
|
+
|
|
18
|
+
To access v 2.13.2 of pyLODE, either `download it from PyPI <https://pypi.org/project/pyLODE/2.13.2/>`_, `check it out from GitHub <https://github.com/RDFLib/pyLODE/releases/tag/2.13.2>`_ or access it via the `online service <http://pylode.surroundaustralia.com/>`_.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Contents
|
|
22
|
+
========
|
|
23
|
+
1. `Quick Intro`_
|
|
24
|
+
2. Use_
|
|
25
|
+
3. `What pyLODE understands`_
|
|
26
|
+
4. Examples_
|
|
27
|
+
5. Installation_
|
|
28
|
+
6. `Differences from LODE`_
|
|
29
|
+
7. `Releases`_
|
|
30
|
+
8. License_
|
|
31
|
+
9. Citation_
|
|
32
|
+
10. Collaboration_
|
|
33
|
+
11. Contacts_
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Quick Intro
|
|
37
|
+
===========
|
|
38
|
+
The Live OWL Documentation Environment tool
|
|
39
|
+
(`LODE <https://github.com/essepuntato/LODE>`__) is a well-known (in
|
|
40
|
+
Semantic Web circles) Java & XSLT-based tool used to generate
|
|
41
|
+
human-readable HTML documents for OWL and RDF ontologies. That tool is
|
|
42
|
+
now a bit dated (old-style HTML, use of older technologies like XSLT)
|
|
43
|
+
and it's (`online version <https://www.essepuntato.it/lode>`__) is not always
|
|
44
|
+
online.
|
|
45
|
+
|
|
46
|
+
This tool is a complete re-implementation of LODE's functionality using
|
|
47
|
+
Python and Python's RDF manipulation module,
|
|
48
|
+
`rdflib <https://pypi.org/project/rdflib/>`__. An ontology to be
|
|
49
|
+
documented is parsed and inspected using rdflib and HTML is generated
|
|
50
|
+
directly, using Python's `dominate <https://pypi.org/project/dominate/>`__
|
|
51
|
+
package.
|
|
52
|
+
|
|
53
|
+
Use
|
|
54
|
+
===
|
|
55
|
+
|
|
56
|
+
The tool can be used in multiple ways:
|
|
57
|
+
|
|
58
|
+
- BASH command line script
|
|
59
|
+
- pyLODE.sh in bin/
|
|
60
|
+
- Windows EXE
|
|
61
|
+
- pyLODE.exe in bin/
|
|
62
|
+
- Mac executable
|
|
63
|
+
- pyLODE in bin/
|
|
64
|
+
- Python Script
|
|
65
|
+
- cli.py or module
|
|
66
|
+
- as-a-service locally
|
|
67
|
+
- via the popular `Falcon framework <https://falconframework.org/>`__.
|
|
68
|
+
- see server.py in the main folder
|
|
69
|
+
- as-a-service online
|
|
70
|
+
- hosted at https://pylode.surroundaustralia.com
|
|
71
|
+
|
|
72
|
+
Command line arguments
|
|
73
|
+
----------------------
|
|
74
|
+
|
|
75
|
+
The BASH, Windows EXE and Python Script methods all use the same command line
|
|
76
|
+
arguments:
|
|
77
|
+
|
|
78
|
+
::
|
|
79
|
+
|
|
80
|
+
usage: cli.py [-h] [-v] [-o OUTPUTFILE] [-c {true,false}] input
|
|
81
|
+
|
|
82
|
+
positional arguments:
|
|
83
|
+
input Input file location or URL
|
|
84
|
+
|
|
85
|
+
optional arguments:
|
|
86
|
+
-h, --help show this help message and exit
|
|
87
|
+
-v, --version show program's version number and exit
|
|
88
|
+
-o OUTPUTFILE,
|
|
89
|
+
--outputfile OUTPUTFILE
|
|
90
|
+
A name you wish to assign to the output file. Will be
|
|
91
|
+
postfixed with .html if not already added. If no
|
|
92
|
+
output file is given, output will be printed to screen
|
|
93
|
+
-c {true,false},
|
|
94
|
+
--css {true,false}
|
|
95
|
+
Whether (true) or not (false) to include CSS within an
|
|
96
|
+
output HTML file.
|
|
97
|
+
|
|
98
|
+
Basic Use
|
|
99
|
+
^^^^^^^^^
|
|
100
|
+
|
|
101
|
+
* as a Python script
|
|
102
|
+
* executed in this directory
|
|
103
|
+
|
|
104
|
+
::
|
|
105
|
+
|
|
106
|
+
python pylode examples/minimal.ttl -o minimal.html
|
|
107
|
+
|
|
108
|
+
This will produce the file ``minimal.html`` in this directory which should
|
|
109
|
+
match exactly the file ``examples/minimal.html``.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Examples
|
|
113
|
+
========
|
|
114
|
+
|
|
115
|
+
The `examples/ directory <https://github.com/RDFLib/pyLODE/tree/master/examples>`_
|
|
116
|
+
contains multiple pairs of RDF & HTML files generated from them using this
|
|
117
|
+
version of pyLODE.
|
|
118
|
+
|
|
119
|
+
You can also see rendered versions of these example files online too:
|
|
120
|
+
|
|
121
|
+
* `minimal.html <http://rdflib.dev/pyLODE/examples/ontdoc/minimal.html>`_
|
|
122
|
+
* `agift.html <http://rdflib.dev/pyLODE/examples/ontdoc/agift.html>`_
|
|
123
|
+
* `alternates.html <http://rdflib.dev/pyLODE/examples/ontdoc/alternates.html>`_
|
|
124
|
+
* `asgs.html <http://rdflib.dev/pyLODE/examples/ontdoc/asgs.html>`_
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
What pyLODE understands
|
|
128
|
+
=======================
|
|
129
|
+
|
|
130
|
+
pyLODE knows about definitional ontologies (``owl:Ontology``) and the major
|
|
131
|
+
elements usually fount in them, such as classes (``owl:Class`` or ``rdf:Class)
|
|
132
|
+
and properties (``rdf:Property`` & ``owl:ObjectProperty`` etc.).
|
|
133
|
+
|
|
134
|
+
To see what properties for ontology, class and RDF property documentation
|
|
135
|
+
pyLODE currently supports, just look in the ``rdf_elements.py`` file. All
|
|
136
|
+
elements' properties supported are given in property lists there.
|
|
137
|
+
|
|
138
|
+
pyLODES won't just translate everything that you can describe in RDF into
|
|
139
|
+
HTML! This is a conscious design choice to ensure that a certain conventional
|
|
140
|
+
style of documented ontology is produced. However, surrport for new
|
|
141
|
+
properties and ontology patterns can be made - just create an Issue on
|
|
142
|
+
`this project's Issue tracker <https://github.com/RDFLib/pyLODE/issues>`__.
|
|
143
|
+
|
|
144
|
+
While it *does* know about instance data, such as Named Individuals, it's
|
|
145
|
+
not really designed to document large ontologies containing class instances.
|
|
146
|
+
|
|
147
|
+
Notes on Agents
|
|
148
|
+
---------------
|
|
149
|
+
pyLODE can understand both simple and complex Agent objects. You can use
|
|
150
|
+
simple string properties like ``dc:contributor "Nicholas J. Car"`` too if
|
|
151
|
+
you really must but better would be to take advantage of real Linked Data
|
|
152
|
+
representation, e.g. complex Agent objects with web addresses, emails,
|
|
153
|
+
affiliations, ORCIDs and so on, e.g.:
|
|
154
|
+
|
|
155
|
+
::
|
|
156
|
+
|
|
157
|
+
<ontology_x>
|
|
158
|
+
dct:creator [
|
|
159
|
+
sdo:name "Nicholas J. Car" ;
|
|
160
|
+
sdo:identifier <http://orcid.org/0000-0002-8742-7730> ;
|
|
161
|
+
sdo:affiliation [
|
|
162
|
+
sdo:name "SURROUND Australia Pty Ldt." ;
|
|
163
|
+
sdo:url "https://surroundaustralia.com"^^xsd:anyURI ;
|
|
164
|
+
] ;
|
|
165
|
+
] ;
|
|
166
|
+
|
|
167
|
+
See all the properties in ``rdf_elements.py:AGENT_PROPS`` for a list of
|
|
168
|
+
all the Agent properties pyLODE can handle.
|
|
169
|
+
|
|
170
|
+
Installation
|
|
171
|
+
============
|
|
172
|
+
|
|
173
|
+
pyLODE is `on PyPI <https://pypi.org/project/pyLODE/>`_, so you can install
|
|
174
|
+
it using `pip <https://pypi.org/project/pip/>`_ as normal:
|
|
175
|
+
|
|
176
|
+
::
|
|
177
|
+
|
|
178
|
+
pip install pylode
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
Differences from LODE
|
|
182
|
+
=====================
|
|
183
|
+
- command line access
|
|
184
|
+
|
|
185
|
+
- you can use this on your own desktop so you don't need me to
|
|
186
|
+
maintain a live service for use
|
|
187
|
+
|
|
188
|
+
- use of modern simple HTML
|
|
189
|
+
|
|
190
|
+
- no JavaScript: pyLODE generates static HTML pages
|
|
191
|
+
|
|
192
|
+
- catering for a wider range of ontology options such as:
|
|
193
|
+
|
|
194
|
+
- schema.org ``domainIncludes`` & ``rangeIncludes`` for properties
|
|
195
|
+
|
|
196
|
+
- better Agent representation
|
|
197
|
+
|
|
198
|
+
- see the `Notes on Agents`_ section above
|
|
199
|
+
|
|
200
|
+
- smarter CURIES
|
|
201
|
+
|
|
202
|
+
- pyLODE caches and looks up well-known prefixes to make more/better
|
|
203
|
+
CURIES
|
|
204
|
+
- it tries to be smart with CURIE presentation by CURIE-ising all
|
|
205
|
+
URIs it finds, rather than printing them
|
|
206
|
+
|
|
207
|
+
- reference ontologies property labels
|
|
208
|
+
|
|
209
|
+
- pyLODE caches ~ 10 well-known ontologies (RDFS, SKOS etc), properties from which people often use for their ontology documentation. Where these properties are used, the background ontology's labels are use
|
|
210
|
+
|
|
211
|
+
- **active development**
|
|
212
|
+
|
|
213
|
+
- pyLODE has been under active development since mid-2019 and is
|
|
214
|
+
still very much actively developed - it's not just staying still
|
|
215
|
+
- it will be improved in foreseeable to cater for more and more things
|
|
216
|
+
- recent ontology documentation initiatives such as the `MOD
|
|
217
|
+
Ontology <https://github.com/sifrproject/MOD-Ontology>`__ will be
|
|
218
|
+
handled, if requested
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
Releases
|
|
222
|
+
========
|
|
223
|
+
pyLODE is under continual and constant development. The current developers have a roadmap for enhancements in mind,
|
|
224
|
+
which is given here, however, since this is an open source project, new developers may join the pyLODE dev community
|
|
225
|
+
and change/add development priorities.
|
|
226
|
+
|
|
227
|
+
Current Release
|
|
228
|
+
---------------
|
|
229
|
+
|
|
230
|
+
The current release, as of December, 2021, is **2.13.2**.
|
|
231
|
+
|
|
232
|
+
Release Schedule
|
|
233
|
+
----------------
|
|
234
|
+
|
|
235
|
+
.. csv-table:: **pyLODE Release Schedule**
|
|
236
|
+
:header: "Version", "Date", "Description"
|
|
237
|
+
:widths: 15, 10, 30
|
|
238
|
+
|
|
239
|
+
**3.0.0**, **6 Jan 2022**, "Direct HTML generation using dominate; easier to maintain and extend"
|
|
240
|
+
2.13.2, 21 December 2021, "Updated RDFlib to 6.1.1, improved test to properly use pytest"
|
|
241
|
+
2.10.0, 24 May 2021, "Update Windows EXE build process, simplified versioning"
|
|
242
|
+
2.9.1, 28 Apr 2021, "Support for ASCIIDOC format (OntDoc profile only)"
|
|
243
|
+
2.8.11, 28 Apr 2021, "Further changes for PyPI only"
|
|
244
|
+
2.8.10, 27 Apr 2021, "Further changes for PyPI only"
|
|
245
|
+
2.8.9, 27 Apr 2021, "PyPI enhancements only"
|
|
246
|
+
2.8.8, 27 Apr 2021, "Several small bugs fixed, auto-generation of version no. from Git tag"
|
|
247
|
+
2.8.6, 23 Feb 20201, "Fixing char encoding issues, updated examples, new test files style - per issue"
|
|
248
|
+
2.8.5, 5 Jan 20201, "Small enhancements to the Falcon server deployment option"
|
|
249
|
+
2.8.3, 3 July 2020, "Packaging bugfixes only"
|
|
250
|
+
2.7, 1 July 2020, "Much refactoring for new profile creation ease"
|
|
251
|
+
2.6, June 2020, "Supports PROF profiles as well as taxonomies & ontologies"
|
|
252
|
+
2.4, 27 May 2020, "Small improvements over 2.0"
|
|
253
|
+
2.0, 18 Apr 2020, "Includes multiple profiles - OWP & vocpub"
|
|
254
|
+
1.0, 15 Dec 2019, "Initial working release"
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
License
|
|
258
|
+
=======
|
|
259
|
+
This code is licensed using the BSD 3-Clause licence. See the `LICENSE
|
|
260
|
+
file <LICENSE>`_ for the deed. Note *Citation* below though for
|
|
261
|
+
attribution.
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
Citation
|
|
265
|
+
========
|
|
266
|
+
If you use pyLODE, please leave the pyLODE logo with a hyperlink back
|
|
267
|
+
here in the top left of published HTML pages.
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
Collaboration
|
|
271
|
+
=============
|
|
272
|
+
The maintainers welcome any collaboration.
|
|
273
|
+
|
|
274
|
+
If you have suggestions, please email the contacts below or leave Issues
|
|
275
|
+
in this repository's `Issue tracker <https://github.com/rdflib/pyLODE/issues>`_.
|
|
276
|
+
|
|
277
|
+
But the very best thing you could do is create a Pull Request for us to
|
|
278
|
+
action!
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
Contacts
|
|
282
|
+
========
|
|
283
|
+
| *Author*:
|
|
284
|
+
| **Nicholas Car**
|
|
285
|
+
| *Data System Architect*
|
|
286
|
+
| `SURROUND Australia Pty Ltd <https://surroundaustralia.com>`_
|
|
287
|
+
| nicholas.car@surroundaustralia.com
|