summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Car <nicholas.car@surroundaustralia.com>2021-10-17 21:23:14 +1000
committerGitHub <noreply@github.com>2021-10-17 21:23:14 +1000
commit735ecb99b6def1f0dd7aa480e3a81334ae740a0f (patch)
treece1a92c82c735479ce89ba3258a866d998e286c9
parent9a9ca7c37d936d7ae00134226a8d249d6a97fed7 (diff)
parent49462fddad2bd2ff148134b49241e1c9d5a8e09f (diff)
downloadrdflib-ttl2.tar.gz
Merge branch 'master' into ttl2ttl2
-rw-r--r--CHANGELOG.md51
-rw-r--r--CONTRIBUTORS1
-rw-r--r--admin/README.md21
-rw-r--r--black.toml2
-rw-r--r--docs/developers.rst2
-rw-r--r--rdflib/__init__.py11
-rw-r--r--rdflib/compare.py2
-rw-r--r--rdflib/namespace/_BRICK.py25
-rw-r--r--rdflib/namespace/_DCAT.py2
-rw-r--r--rdflib/namespace/_FOAF.py2
-rw-r--r--rdflib/namespace/_ODRL2.py4
-rw-r--r--rdflib/namespace/_ORG.py2
-rw-r--r--rdflib/namespace/_OWL.py6
-rw-r--r--rdflib/namespace/_PROV.py4
-rw-r--r--rdflib/namespace/_QB.py2
-rw-r--r--rdflib/namespace/_RDFS.py2
-rw-r--r--rdflib/namespace/_SDO.py30
-rw-r--r--rdflib/namespace/_VOID.py2
-rw-r--r--rdflib/namespace/__init__.py6
-rw-r--r--rdflib/parser.py11
-rw-r--r--rdflib/paths.py2
-rwxr-xr-xrdflib/plugins/parsers/notation3.py22
-rw-r--r--rdflib/plugins/parsers/ntriples.py2
-rw-r--r--rdflib/plugins/sparql/aggregates.py4
-rw-r--r--rdflib/plugins/sparql/parser.py8
-rw-r--r--rdflib/plugins/sparql/parserutils.py4
-rw-r--r--rdflib/plugins/stores/auditable.py2
-rw-r--r--rdflib/plugins/stores/sparqlstore.py2
-rw-r--r--rdflib/store.py9
-rw-r--r--rdflib/term.py2
-rw-r--r--rdflib/tools/csv2rdf.py2
-rw-r--r--rdflib/tools/rdfpipe.py4
-rw-r--r--requirements.dev.txt2
-rw-r--r--setup.py2
-rw-r--r--test/test_graph.py19
-rw-r--r--test/test_graph_http.py25
-rw-r--r--test/test_namespace.py9
-rw-r--r--test/test_rules.py2
-rw-r--r--test/test_store.py25
-rw-r--r--tox.ini2
40 files changed, 231 insertions, 106 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 072681de..b560db17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+2021/09/17 RELEASE 6.0.2
+========================
+Minor release to add OWL.rational & OWL.real which are needed to allow the OWL-RL package to use only rdflib namespaces, not it's own versions.
+
+* Add owl:rational and owl:real to match standard.
+ [PR #1428](https://github.com/RDFLib/rdflib/pull/1428)
+
+A few other small things have been added, see the following merged PRs list:
+
+* rename arg LOVE to ns in rdfpipe
+ [PR #1426](https://github.com/RDFLib/rdflib/pull/1426)
+* Remove Tox reference to Python 3.6
+ [PR #1422](https://github.com/RDFLib/rdflib/pull/1422)
+* Add Brick DefinedNamespace
+ [PR #1419](https://github.com/RDFLib/rdflib/pull/1419)
+* Use setName on TokenConverter to set the name property
+ [PR #1409](https://github.com/RDFLib/rdflib/pull/1409)
+* Add test for adding JSON-LD to guess_format()
+ [PR #1408](https://github.com/RDFLib/rdflib/pull/1408)
+* Fix mypy type errors and add mypy to .drone.yml
+ [PR #1407](https://github.com/RDFLib/rdflib/pull/1407)
+
+
2021/09/17 RELEASE 6.0.1
========================
Minor release to fix a few small errors, in particular with JSON-LD parsing & serializing integration from rdflib-jsonld. Also, a few other niceties, such as allowing graph `add()`, `remove()` etc. to be chainable.
@@ -170,7 +193,7 @@ _**All PRs merged since 5.0.0:**_
[PR #1220](https://github.com/RDFLib/rdflib/pull/1220)
* add GeoSPARQL ClosedNamespace
[PR #1221](https://github.com/RDFLib/rdflib/pull/1221)
-* docs: fix simple typo, yeild -> yield
+* docs: fix simple typo, -> yield
[PR #1223](https://github.com/RDFLib/rdflib/pull/1223)
* do not use current time in sparql TIMEZONE
[PR #1193](https://github.com/RDFLib/rdflib/pull/1193)
@@ -743,7 +766,7 @@ Doc improvements:
[#584](https://github.com/RDFLib/rdflib/pull/584)
* docs: clarify the use of an identifier when persisting a triplestore
[#654](https://github.com/RDFLib/rdflib/pull/654)
-* DOC: unamed -> unnamed, typos
+* DOC: fix simple typo, -> unnamed
[#562](https://github.com/RDFLib/rdflib/pull/562)
@@ -1005,7 +1028,7 @@ Following RDFLib tradition, some bugs snuck into the 4.0 release.
This is a bug-fixing release:
* the new URI validation caused lots of problems, but is
- nescessary to avoid ''RDF injection'' vulnerabilities. In the
+ necessary to avoid ''RDF injection'' vulnerabilities. In the
spirit of ''be liberal in what you accept, but conservative in
what you produce", we moved validation to serialisation time.
@@ -1056,9 +1079,9 @@ This release includes several major changes:
* Handled of Literal equality was split into lexical comparison
(for normal ```==``` operator) and value space (using new ```Node.eq```
- methods). This introduces some slight backwards incomaptible
+ methods). This introduces some slight backwards incompatible
changes, but was necessary, as the old version had
- inconsisten hash and equality methods that could lead the
+ inconsistent hash and equality methods that could lead the
literals not working correctly in dicts/sets.
The new way is more in line with how SPARQL 1.1 works.
For the full details, see:
@@ -1121,7 +1144,7 @@ This release includes a lot of admin maintentance - correct
dependencies for different python versions, etc. Several py3 bugs
were also fixed.
-This release drops python 2.4 compatability - it was just getting
+This release drops python 2.4 compatibility - it was just getting
too expensive for us to maintain. It should however be compatible
with any cpython from 2.5 through 3.3.
@@ -1202,7 +1225,7 @@ Major changes:
Fixed many minor issues:
* http://code.google.com/p/rdflib/issues/detail?id=177
http://code.google.com/p/rdflib/issues/detail?id=129
- Restored compatability with Python 2.4
+ Restored compatibility with Python 2.4
* http://code.google.com/p/rdflib/issues/detail?id=158
Reworking of Query result handling
* http://code.google.com/p/rdflib/issues/detail?id=193
@@ -1314,7 +1337,7 @@ they are stable.
Fixed datatype for Literal(True).
-Fixed Literal to enforce contraint of having either a language
+Fixed Literal to enforce constraint of having either a language
or datatype but not both.
Fixed Literal's repr.
@@ -1327,7 +1350,7 @@ Upgraded N3 parser to the one from CWM.
Fixed unicode encoding issue involving N3Parser.
-N3 serializer improvments.
+N3 serializer improvements.
Fixed HTTP content-negotiation
@@ -1369,7 +1392,7 @@ as first class objects in the SPARQL evaluation engine.
Added support for session bnodes re: sparql
Fixed prolog reduce/reduce conflict. Added Py_None IncRefs
-where they were being passed into Python method invokations
+where they were being passed into Python method invocations
(per drewp's patch)
Fixed sparql queries involving empty namespace prefix.
@@ -1585,7 +1608,7 @@ Fixed literal quoting in N3 serializer.
Fixed RDF/XML serializer to skip over N3 bits.
-Changed Literal and URIRef instanciation to catch
+Changed Literal and URIRef instantiation to catch
UnicodeDecodeErrors - which were being thrown when the default
decoding method (ascii) was hitting certain characters.
@@ -1664,7 +1687,7 @@ to the store) and whittles out results that don't match the
given REGEX term expression(s).
Store-agnostic 'fallback' implementation of transactional
-rollbacks (also inefficient but provides the capablity to
+rollbacks (also inefficient but provides the capability to
stores that don't support it natively). Implemented as a
wrapper that tracks a 'thread-safe' list of reversal
operations (for every add, track the remove call that reverts
@@ -1873,7 +1896,7 @@ needed to run on Python2.2.
Added alternative to shlib.move() if it isn't present.
-Fixed bug that occured when specifying a backend to
+Fixed bug that occurred when specifying a backend to
InformationStore's constructor.
Fixed bug recently introduced into InformationStore's remove
@@ -2019,7 +2042,7 @@ BNode prefix is now composed of ascii_letters instead of letters.
Added a bsddb backed InformationStore.
-Added an asyncronous load method, methods for scheduling context
+Added an asynchronous load method, methods for scheduling context
updates, and a run method.
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 399a3010..acd2ccb0 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -20,6 +20,7 @@ Drew Perttula
Edmond Chuc
Elias Torres
Florian Ludwig
+Gabe Fierro
Gerhard Weis
Graham Higgins
Graham Klyne
diff --git a/admin/README.md b/admin/README.md
index f9c0749c..23152dd8 100644
--- a/admin/README.md
+++ b/admin/README.md
@@ -7,15 +7,17 @@ Tools to assist with RDFlib releases, like extracting all merged PRs from GitHub
1. merge all PRs for the release
2. pass all tests
+ * `python run_tests.py`
3. black everything
- * use the config, e.g. `black --config black.toml .` in main dir
+ * use the config, e.g. `black --config black.toml .` in main dir
4. build docs - check for errors/warnings there
+ * `python setup.py build_sphinx`
5. alter version & date in rdflib/__init__.py
6. update:
* CHANGELOG.md
* CONTRIBUTORS
- * use scripts here to generate "PRs since last release"
- * LICENSE (the date)
+ * use scripts here to generate "PRs since last release"
+ * LICENSE (the date)
* setup.py (the long description)
7. update admin steps (here)
8. push to PyPI
@@ -23,10 +25,13 @@ Tools to assist with RDFlib releases, like extracting all merged PRs from GitHub
* `python3 setup.py bdist_wheel sdist`
* `twine upload ./dist/*`
9. Make GitHub release
+ * `git tag <new-version>`
+ * `git push --tags`
* go to the tagged version, e.g. https://github.com/RDFLib/rdflib/releases/tag/6.0.0
* edit the release' notes there (likely copy from CHANGELOG)
-10. Build readthedocs docco
- * `latest` and `stable` need to be built at least
- * best to make sure the previous (outgoing) release has a number-pegged version, e.g. 5.0.0
-11. update the rdflib.dev website page
-12. update the master version to this version + 1
+11. Build readthedocs docco
+ * `latest` and `stable` need to be built at least
+ * best to make sure the previous (outgoing) release has a number-pegged version, e.g. 5.0.0
+12. update the rdflib.dev website page
+14. Update the GitHub master version
+ * e.g. for release 6.0.2, change version to 6.0.3a and push to GitHub
diff --git a/black.toml b/black.toml
index abdef9fa..e1a6cfaa 100644
--- a/black.toml
+++ b/black.toml
@@ -1,5 +1,5 @@
[tool.black]
-required-version = "21.6b0"
+required-version = "21.9b0"
line-length = "88"
skip-string-normalization = true
target-version = ['py37']
diff --git a/docs/developers.rst b/docs/developers.rst
index fed80505..27dcb1ff 100644
--- a/docs/developers.rst
+++ b/docs/developers.rst
@@ -13,7 +13,7 @@ Please be as Pythonic as possible (:pep:`8`).
Code should be formatted using `black <https://github.com/psf/black>`_.
While not yet mandatory, it will be required in the future (6.0.0+).1
-Use Black v21.6b1, with the black.toml config file provided.
+Use Black v21.9b0, with the black.toml config file provided.
Code should also pass `flake8 <https://github.com/psf/black>`_ linting
and `mypy <http://mypy-lang.org/>`_ type checking.
diff --git a/rdflib/__init__.py b/rdflib/__init__.py
index 69e71f3b..9b8daeb0 100644
--- a/rdflib/__init__.py
+++ b/rdflib/__init__.py
@@ -45,8 +45,8 @@ A tiny example:
__docformat__ = "restructuredtext en"
# The format of the __version__ line is matched by a regex in setup.py
-__version__ = "6.0.2a0"
-__date__ = "2021-09-17"
+__version__ = "6.03a"
+__date__ = "2021-10-10"
__all__ = [
"URIRef",
@@ -57,9 +57,11 @@ __all__ = [
"Dataset",
"Graph",
"ConjunctiveGraph",
+ "BRICK",
"CSVW",
"DC",
"DCAT",
+ "DCMITYPE",
"DCTERMS",
"DOAP",
"FOAF",
@@ -77,8 +79,8 @@ __all__ = [
"SOSA",
"SSN",
"TIME",
+ "VANN",
"VOID",
- "XMLNS",
"XSD",
"util",
]
@@ -161,9 +163,11 @@ from rdflib import plugin
from rdflib import query
from rdflib.namespace import (
+ BRICK,
CSVW,
DC,
DCAT,
+ DCMITYPE,
DCTERMS,
DOAP,
FOAF,
@@ -181,6 +185,7 @@ from rdflib.namespace import (
SOSA,
SSN,
TIME,
+ VANN,
VOID,
XMLNS,
XSD,
diff --git a/rdflib/compare.py b/rdflib/compare.py
index 1349db8e..16994fa7 100644
--- a/rdflib/compare.py
+++ b/rdflib/compare.py
@@ -306,7 +306,7 @@ class _TripleCanonicalizer(object):
def _initial_color(self) -> List[Color]:
"""Finds an initial color for the graph.
- Finds an initial color fo the graph by finding all blank nodes and
+ Finds an initial color of the graph by finding all blank nodes and
non-blank nodes that are adjacent. Nodes that are not adjacent to blank
nodes are not included, as they are a) already colored (by URI or literal)
and b) do not factor into the color of any blank node.
diff --git a/rdflib/namespace/_BRICK.py b/rdflib/namespace/_BRICK.py
index a6e97cc1..09dd6cea 100644
--- a/rdflib/namespace/_BRICK.py
+++ b/rdflib/namespace/_BRICK.py
@@ -1,6 +1,7 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
+
class BRICK(DefinedNamespace):
"""
Brick Ontology classes, properties and entity properties. See https://brickschema.org/
@@ -231,7 +232,7 @@ class BRICK(DefinedNamespace):
Detention_Room: URIRef # A space for the temporary involuntary confinement of people
Dew_Point_Setpoint: URIRef # Sets dew point
Dewpoint_Sensor: URIRef # Senses the dewpoint temperature . Dew point is the temperature to which air must be cooled to become saturated with water vapor
- Differential_Air_Temperature_Setpoint: URIRef # Sets temperature of diffrential air
+ Differential_Air_Temperature_Setpoint: URIRef # Sets temperature of differential air
Differential_Pressure_Bypass_Valve: URIRef # A 2-way, self contained proportional valve with an integral differential pressure adjustment setting.
Differential_Pressure_Deadband_Setpoint: URIRef # Sets the size of a deadband of differential pressure
Differential_Pressure_Integral_Time_Parameter: URIRef
@@ -248,7 +249,7 @@ class BRICK(DefinedNamespace):
Direct_Expansion_Cooling_Coil: URIRef
Direct_Expansion_Heating_Coil: URIRef
Direction_Command: URIRef # Commands that affect the direction of some phenomenon
- Direction_Sensor: URIRef # Measures the direction in degrees in which a phenomenon is occuring
+ Direction_Sensor: URIRef # Measures the direction in degrees in which a phenomenon is occurring
Direction_Status: URIRef # Indicates which direction a device is operating in
Disable_Command: URIRef # Commands that disable functionality
Disable_Differential_Enthalpy_Command: URIRef # Disables the use of differential enthalpy control
@@ -337,7 +338,7 @@ class BRICK(DefinedNamespace):
Electrical_System: URIRef # Devices that serve or are part of the electrical subsystem in the building
Elevator: URIRef # A device that provides vertical transportation between floors, levels or decks of a building, vessel or other structure
Elevator_Shaft: URIRef # The vertical space in which an elevator ascends and descends
- Elevator_Space: URIRef # The vertical space in whcih an elevator ascends and descends
+ Elevator_Space: URIRef # The vertical space in which an elevator ascends and descends
Embedded_Surface_System_Panel: URIRef # Radiant panel heating and cooling system where the energy heat source or sink is embedded in a radiant layer which is thermally insulated from the building structure.
Embedded_Temperature_Sensor: URIRef # Measures the internal temperature of the radiant layer of the radiant heating and cooling HVAC system.
Embedded_Temperature_Setpoint: URIRef # Sets temperature for the internal material, e.g. concrete slab, of the radiant panel.
@@ -353,7 +354,7 @@ class BRICK(DefinedNamespace):
Emergency_Power_Off_System_Status: URIRef
Emergency_Push_Button_Status: URIRef # Indicates if an emergency button has been pushed
Emergency_Wash_Station: URIRef
- Employee_Entrance_Lobby: URIRef # An open space near an entrance that is typicaly only used for employees
+ Employee_Entrance_Lobby: URIRef # An open space near an entrance that is typically only used for employees
Enable_Command: URIRef # Commands that enable functionality
Enable_Differential_Enthalpy_Command: URIRef # Enables the use of differential enthalpy control
Enable_Differential_Temperature_Command: URIRef # Enables the use of differential temperature control
@@ -549,7 +550,7 @@ class BRICK(DefinedNamespace):
Humidity_Sensor: URIRef # Measures the concentration of water vapor in air
Humidity_Setpoint: URIRef # Sets humidity
Humidity_Tolerance_Parameter: URIRef # A parameter determining the difference between upper and lower limits of humidity.
- IDF: URIRef # An room for an intermediate distribution frame, where cables carrying signals from the main distrubtion frame terminate and then feed out to endpoints
+ IDF: URIRef # An room for an intermediate distribution frame, where cables carrying signals from the main distribution frame terminate and then feed out to endpoints
Ice: URIRef # Water in its solid form
Ice_Tank_Leaving_Water_Temperature_Sensor: URIRef # Measures the temperature of water leaving an ice tank
Illuminance_Sensor: URIRef # Measures the total luminous flux incident on a surface, per unit area
@@ -575,7 +576,7 @@ class BRICK(DefinedNamespace):
Lead_Lag_Command: URIRef # Enables lead/lag operation
Lead_Lag_Status: URIRef # Indicates if lead/lag operation is enabled
Lead_On_Off_Command: URIRef # Controls the active/inactive status of the "lead" part of a lead/lag system
- Leak_Alarm: URIRef # An alarm that indicates leaks occured in systems containing fluids
+ Leak_Alarm: URIRef # An alarm that indicates leaks occurred in systems containing fluids
Leaving_Water: URIRef # Water that is leaving a piece of equipment or system
Leaving_Water_Flow_Sensor: URIRef # Measures the rate of flow of water that is leaving a piece of equipment or system
Leaving_Water_Flow_Setpoint: URIRef # Sets the target flow rate of leaving water
@@ -625,10 +626,10 @@ class BRICK(DefinedNamespace):
Luminance_Setpoint: URIRef # Sets luminance
MAU: URIRef # See Makeup_Air_Unit
MDF: URIRef # A room for the Main Distribution Frame, the central place of a building where cables carrying signals meet and connect to the outside world
- Mail_Room: URIRef # A room where mail is recieved and sorted for distribution to the rest of the building
+ Mail_Room: URIRef # A room where mail is received and sorted for distribution to the rest of the building
Maintenance_Mode_Command: URIRef # Controls whether or not a device or controller is operating in "Maintenance" mode
Maintenance_Required_Alarm: URIRef # An alarm that indicates that repair/maintenance is required on an associated device or equipment
- Majlis: URIRef # In Arab countries, an Majlis is a private lounge where visitors are recieved and entertained
+ Majlis: URIRef # In Arab countries, an Majlis is a private lounge where visitors are received and entertained
Makeup_Air_Unit: URIRef # A device designed to condition ventilation air introduced into a space or to replace air exhausted from a process or general area exhaust. The device may be used to prevent negative pressure within buildings or to reduce airborne contaminants in a space.
Makeup_Water: URIRef # Water used used to makeup water loss through leaks, evaporation, or blowdown
Makeup_Water_Valve: URIRef # A valve regulating the flow of makeup water into a water holding tank, e.g. a cooling tower, hot water tank
@@ -757,7 +758,7 @@ class BRICK(DefinedNamespace):
Off_Command: URIRef # An Off Command controls or reports the binary 'off' status of a control loop, relay or equipment activity. It can only be used to stop/deactivate an associated equipment or process, or determine that the related entity is 'off'
Off_Status: URIRef # Indicates if a control loop, relay or equipment is off
Office: URIRef # A class of rooms dedicated for work or study
- Office_Kitchen: URIRef # A common space, usually near or in a breakroom, where minor food preperation occurs
+ Office_Kitchen: URIRef # A common space, usually near or in a breakroom, where minor food preparation occurs
Oil: URIRef # a viscous liquid derived from petroleum, especially for use as a fuel or lubricant.
On_Command: URIRef # An On Command controls or reports the binary 'on' status of a control loop, relay or equipment activity. It can only be used to start/activate an associated equipment or process, or determine that the related entity is 'on'
On_Off_Command: URIRef # An On/Off Command controls or reports the binary status of a control loop, relay or equipment activity
@@ -766,7 +767,7 @@ class BRICK(DefinedNamespace):
On_Timer_Sensor: URIRef # Measures the duration for which a device was in an active or "on" state
Open_Close_Status: URIRef # Indicates the open/close status of a device such as a damper or valve
Open_Heating_Valve_Outside_Air_Temperature_Setpoint: URIRef
- Open_Office: URIRef # An open space used for work or study by mulitple people. Usuaully subdivided into cubicles or desks
+ Open_Office: URIRef # An open space used for work or study by multiple people. Usuaully subdivided into cubicles or desks
Operating_Mode_Status: URIRef # Indicates the current operating mode of a system, device or control loop
Outdoor_Area: URIRef # A class of spaces that exist outside of a building
Output_Frequency_Sensor: URIRef
@@ -802,7 +803,7 @@ class BRICK(DefinedNamespace):
Ozone_Level_Sensor: URIRef # Measures the concentration of ozone in air
PAU: URIRef # A type of AHU, use to pre-treat the outdoor air before feed to AHU
PID_Parameter: URIRef
- PIR_Sensor: URIRef # Detects the presense of motion in some area using the differential change in infrared intensity between two or more receptors
+ PIR_Sensor: URIRef # Detects the presence of motion in some area using the differential change in infrared intensity between two or more receptors
PM10_Level_Sensor: URIRef # Detects level of particulates of size 10 microns
PM10_Sensor: URIRef # Detects matter of size 10 microns
PM1_Level_Sensor: URIRef # Detects level of particulates of size 1 microns
@@ -870,7 +871,7 @@ class BRICK(DefinedNamespace):
Rated_Speed_Setpoint: URIRef # Sets rated speed
Reactive_Power_Sensor: URIRef # Measures the portion of power that, averaged over a complete cycle of the AC waveform, is due to stored energy which returns to the source in each cycle
Reception: URIRef # A space, usually in a lobby, where visitors to a building or space can go to after arriving at a building and inform building staff that they have arrived
- Region: URIRef # A unit of geographic space, usually contigious or somehow related to a geopolitical feature
+ Region: URIRef # A unit of geographic space, usually contiguous or somehow related to a geopolitical feature
Reheat_Hot_Water_System: URIRef
Reheat_Valve: URIRef # A valve that controls air temperature by modulating the amount of hot water flowing through a reheat coil
Relative_Humidity_Sensor: URIRef # Measures the present state of absolute humidity relative to a maximum humidity given the same temperature
diff --git a/rdflib/namespace/_DCAT.py b/rdflib/namespace/_DCAT.py
index 0c587abd..94d60188 100644
--- a/rdflib/namespace/_DCAT.py
+++ b/rdflib/namespace/_DCAT.py
@@ -41,7 +41,7 @@ class DCAT(DefinedNamespace):
# http://www.w3.org/2000/01/rdf-schema#Class
Catalog: URIRef # A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog).
CatalogRecord: URIRef # A record in a data catalog, describing the registration of a single dataset or data service.
- Dataset: URIRef # A collection of data, published or curated by a single source, and available for access or download in one or more represenations.
+ Dataset: URIRef # A collection of data, published or curated by a single source, and available for access or download in one or more representations.
Distribution: URIRef # A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways, including natural language, media-type or format, schematic organization, temporal and spatial resolution, level of detail or profiles (which might specify any or all of the above).
# http://www.w3.org/2002/07/owl#Class
diff --git a/rdflib/namespace/_FOAF.py b/rdflib/namespace/_FOAF.py
index 2e8fb022..727187c9 100644
--- a/rdflib/namespace/_FOAF.py
+++ b/rdflib/namespace/_FOAF.py
@@ -72,7 +72,7 @@ class FOAF(DefinedNamespace):
Document: URIRef # A document.
Group: URIRef # A class of Agents.
Image: URIRef # An image.
- LabelProperty: URIRef # A foaf:LabelProperty is any RDF property with texual values that serve as labels.
+ LabelProperty: URIRef # A foaf:LabelProperty is any RDF property with textual values that serve as labels.
OnlineAccount: URIRef # An online account.
OnlineChatAccount: URIRef # An online chat account.
OnlineEcommerceAccount: URIRef # An online e-commerce account.
diff --git a/rdflib/namespace/_ODRL2.py b/rdflib/namespace/_ODRL2.py
index c2ef3b36..11da70fd 100644
--- a/rdflib/namespace/_ODRL2.py
+++ b/rdflib/namespace/_ODRL2.py
@@ -46,7 +46,7 @@ class ODRL2(DefinedNamespace):
informingParty: URIRef # The Party who provides the inform use data.
inheritAllowed: URIRef # Indicates if the Policy entity can be inherited.
inheritFrom: URIRef # Relates a (child) policy to another (parent) policy from which terms are inherited.
- inheritRelation: URIRef # Indentifies the type of inheritance.
+ inheritRelation: URIRef # Identifies the type of inheritance.
leftOperand: URIRef # The left operand in a constraint expression.
obligation: URIRef # Relates an individual Duty to a Policy.
operand: URIRef # Operand is an abstract property for a logical relationship.
@@ -73,7 +73,7 @@ class ODRL2(DefinedNamespace):
uid: URIRef # An unambiguous identifier
undefined: URIRef # Relates the strategy used for handling undefined actions to a Policy.
unit: URIRef # The unit of measurement of the value of the rightOperand or rightOperandReference of a Constraint.
- xone: URIRef # The relation is satisfied when only one, and not more, of the Constaints is satisfied
+ xone: URIRef # The relation is satisfied when only one, and not more, of the Constraints is satisfied
# http://www.w3.org/2002/07/owl#NamedIndividual
All: URIRef # Specifies that the scope of the relationship is all of the collective individuals within a context.
diff --git a/rdflib/namespace/_ORG.py b/rdflib/namespace/_ORG.py
index bb6d417e..f1580462 100644
--- a/rdflib/namespace/_ORG.py
+++ b/rdflib/namespace/_ORG.py
@@ -36,7 +36,7 @@ class ORG(DefinedNamespace):
location: URIRef # Gives a location description for a person within the organization, for example a _Mail Stop_ for internal posting purposes.
member: URIRef # Indicates the Person (or other Agent including Organization) involved in the Membership relationship. Inverse of `org:hasMembership`
memberDuring: URIRef # Optional property to indicate the interval for which the membership is/was valid.
- memberOf: URIRef # Indicates that a person is a member of the Organization with no indication of the nature of that membership or the role played. Note that the choice of property name is not meant to limit the property to only formal membership arrangements, it is also indended to cover related concepts such as affilliation or other involvement in the organization. Extensions can specialize this relationship to indicate particular roles within the organization or more nuanced relationships to the organization. Has an optional inverse, `org:hasmember`.
+ memberOf: URIRef # Indicates that a person is a member of the Organization with no indication of the nature of that membership or the role played. Note that the choice of property name is not meant to limit the property to only formal membership arrangements, it is also intended to cover related concepts such as affilliation or other involvement in the organization. Extensions can specialize this relationship to indicate particular roles within the organization or more nuanced relationships to the organization. Has an optional inverse, `org:hasmember`.
organization: URIRef # Indicates Organization in which the Agent is a member.
originalOrganization: URIRef # Indicates one or more organizations that existed before the change event. Depending on the event they may or may not have continued to exist after the event. Inverse of `org:changedBy`.
postIn: URIRef # Indicates the Organization in which the Post exists.
diff --git a/rdflib/namespace/_OWL.py b/rdflib/namespace/_OWL.py
index df3327e8..3decd093 100644
--- a/rdflib/namespace/_OWL.py
+++ b/rdflib/namespace/_OWL.py
@@ -115,4 +115,10 @@ class OWL(DefinedNamespace):
imports: URIRef # The property that is used for importing other ontologies into a given ontology.
versionIRI: URIRef # The property that identifies the version IRI of an ontology.
+ # http://www.w3.org/2000/01/rdf-schema#Datatype
+ # NOTE: the following two elements don't appear in the OWL RDF documents but are defined in the OWL2 Recommentation
+ # at https://www.w3.org/TR/owl2-syntax/#Datatype_Maps
+ rational: URIRef # The value space is the set of all rational numbers. The lexical form is numerator '/' denominator, where both are integers.
+ real: URIRef # The value space is the set of all real numbers. Does not directly provide any lexical forms.
+
_NS = Namespace("http://www.w3.org/2002/07/owl#")
diff --git a/rdflib/namespace/_PROV.py b/rdflib/namespace/_PROV.py
index 8ffaa176..66925504 100644
--- a/rdflib/namespace/_PROV.py
+++ b/rdflib/namespace/_PROV.py
@@ -117,7 +117,7 @@ class PROV(DefinedNamespace):
ActivityInfluence: URIRef # ActivityInfluence provides additional descriptions of an Activity's binary influence upon any other kind of resource. Instances of ActivityInfluence use the prov:activity property to cite the influencing Activity.
Agent: URIRef # Agent
AgentInfluence: URIRef # AgentInfluence provides additional descriptions of an Agent's binary influence upon any other kind of resource. Instances of AgentInfluence use the prov:agent property to cite the influencing Agent.
- Association: URIRef # An instance of prov:Association provides additional descriptions about the binary prov:wasAssociatedWith relation from an prov:Activity to some prov:Agent that had some responsiblity for it. For example, :baking prov:wasAssociatedWith :baker; prov:qualifiedAssociation [ a prov:Association; prov:agent :baker; :foo :bar ].
+ Association: URIRef # An instance of prov:Association provides additional descriptions about the binary prov:wasAssociatedWith relation from an prov:Activity to some prov:Agent that had some responsibility for it. For example, :baking prov:wasAssociatedWith :baker; prov:qualifiedAssociation [ a prov:Association; prov:agent :baker; :foo :bar ].
Attribution: URIRef # An instance of prov:Attribution provides additional descriptions about the binary prov:wasAttributedTo relation from an prov:Entity to some prov:Agent that had some responsible for it. For example, :cake prov:wasAttributedTo :baker; prov:qualifiedAttribution [ a prov:Attribution; prov:entity :baker; :foo :bar ].
Bundle: URIRef # Note that there are kinds of bundles (e.g. handwritten letters, audio recordings, etc.) that are not expressed in PROV-O, but can be still be described by PROV-O.
Collection: URIRef # Collection
@@ -207,7 +207,7 @@ class PROV(DefinedNamespace):
influencer: URIRef # Subproperties of prov:influencer are used to cite the object of an unqualified PROV-O triple whose predicate is a subproperty of prov:wasInfluencedBy (e.g. prov:used, prov:wasGeneratedBy). prov:influencer is used much like rdf:object is used.
insertedKeyEntityPair: URIRef # insertedKeyEntityPair
invalidated: URIRef # invalidated
- mentionOf: URIRef # prov:mentionOf is used to specialize an entity as described in another bundle. It is to be used in conjuction with prov:asInBundle. prov:asInBundle is used to cite the Bundle in which the generalization was mentioned.
+ mentionOf: URIRef # prov:mentionOf is used to specialize an entity as described in another bundle. It is to be used in conjunction with prov:asInBundle. prov:asInBundle is used to cite the Bundle in which the generalization was mentioned.
pingback: URIRef # Relates a resource to a provenance pingback service that may receive additional provenance links about the resource.
qualifiedAssociation: URIRef # If this Activity prov:wasAssociatedWith Agent :ag, then it can qualify the Association using prov:qualifiedAssociation [ a prov:Association; prov:agent :ag; :foo :bar ].
qualifiedAttribution: URIRef # If this Entity prov:wasAttributedTo Agent :ag, then it can qualify how it was influenced using prov:qualifiedAttribution [ a prov:Attribution; prov:agent :ag; :foo :bar ].
diff --git a/rdflib/namespace/_QB.py b/rdflib/namespace/_QB.py
index bbae575f..ee47fe81 100644
--- a/rdflib/namespace/_QB.py
+++ b/rdflib/namespace/_QB.py
@@ -49,7 +49,7 @@ class QB(DefinedNamespace):
DataSet: URIRef # Represents a collection of observations, possibly organized into various slices, conforming to some common dimensional structure.
DataStructureDefinition: URIRef # Defines the structure of a DataSet or slice
DimensionProperty: URIRef # The class of components which represent the dimensions of the cube
- HierarchicalCodeList: URIRef # Represents a generalized hierarchy of concepts which can be used for coding. The hierarchy is defined by one or more roots together with a property which relates concepts in the hierarchy to thier child concept . The same concepts may be members of multiple hierarchies provided that different qb:parentChildProperty values are used for each hierarchy.
+ HierarchicalCodeList: URIRef # Represents a generalized hierarchy of concepts which can be used for coding. The hierarchy is defined by one or more roots together with a property which relates concepts in the hierarchy to their child concept . The same concepts may be members of multiple hierarchies provided that different qb:parentChildProperty values are used for each hierarchy.
MeasureProperty: URIRef # The class of components which represent the measured value of the phenomenon being observed
Observation: URIRef # A single observation in the cube, may have one or more associated measured values
ObservationGroup: URIRef # A, possibly arbitrary, group of observations.
diff --git a/rdflib/namespace/_RDFS.py b/rdflib/namespace/_RDFS.py
index 0a052235..3b3a688b 100644
--- a/rdflib/namespace/_RDFS.py
+++ b/rdflib/namespace/_RDFS.py
@@ -16,7 +16,7 @@ class RDFS(DefinedNamespace):
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
comment: URIRef # A description of the subject resource.
domain: URIRef # A domain of the subject property.
- isDefinedBy: URIRef # The defininition of the subject resource.
+ isDefinedBy: URIRef # The definition of the subject resource.
label: URIRef # A human-readable name for the subject.
member: URIRef # A member of the subject resource.
range: URIRef # A range of the subject property.
diff --git a/rdflib/namespace/_SDO.py b/rdflib/namespace/_SDO.py
index 4752dee1..7d7a8844 100644
--- a/rdflib/namespace/_SDO.py
+++ b/rdflib/namespace/_SDO.py
@@ -196,7 +196,7 @@ class SDO(DefinedNamespace):
accountId: URIRef # The identifier for the account the payment will be applied to.
accountablePerson: URIRef # Specifies the Person that is legally accountable for the CreativeWork.
acquiredFrom: URIRef # The organization or person from which the product was acquired.
- actionAccessibilityRequirement: URIRef # A set of requirements that a must be fulfilled in order to perform an Action. If more than one value is specied, fulfilling one set of requirements will allow the Action to be performed.
+ actionAccessibilityRequirement: URIRef # A set of requirements that a must be fulfilled in order to perform an Action. If more than one value is specified, fulfilling one set of requirements will allow the Action to be performed.
actionApplication: URIRef # An application that can complete the request.
actionOption: URIRef # A sub property of object. The options subject to this action.
actionPlatform: URIRef # The high level platform(s) where the Action can be performed for the given URL. To specify a specific application or operating system instance, use actionApplication.
@@ -206,7 +206,7 @@ class SDO(DefinedNamespace):
addOn: URIRef # An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge).
additionalName: URIRef # An additional name for a Person, can be used for a middle name.
additionalNumberOfGuests: URIRef # If responding yes, the number of guests who will attend in addition to the invitee.
- additionalProperty: URIRef # A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.<br/><br/> Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
+ additionalProperty: URIRef # A property-value pair representing an additional characteristics of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.<br/><br/> Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
additionalType: URIRef # An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.
address: URIRef # Physical address of the item.
addressCountry: URIRef # The country. For example, USA. You can also provide the two-letter <a href="http://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1 alpha-2 country code</a>.
@@ -308,7 +308,7 @@ class SDO(DefinedNamespace):
broadcastAffiliateOf: URIRef # The media network(s) whose content is broadcast on this station.
broadcastChannelId: URIRef # The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number.
broadcastDisplayName: URIRef # The name displayed in the channel guide. For many US affiliates, it is the network name.
- broadcastFrequency: URIRef # The frequency used for over-the-air broadcasts. Numeric values or simple ranges e.g. 87-99. In addition a shortcut idiom is supported for frequences of AM and FM radio channels, e.g. "87 FM".
+ broadcastFrequency: URIRef # The frequency used for over-the-air broadcasts. Numeric values or simple ranges e.g. 87-99. In addition a shortcut idiom is supported for frequencies of AM and FM radio channels, e.g. "87 FM".
broadcastFrequencyValue: URIRef # The frequency in MHz for a particular broadcast.
broadcastOfEvent: URIRef # The event being broadcast such as a sporting event or awards ceremony.
broadcastServiceTier: URIRef # The type of service required to have access to the channel (e.g. Standard or Premium).
@@ -548,7 +548,7 @@ class SDO(DefinedNamespace):
greater: URIRef # This ordering relation for qualitative values indicates that the subject is greater than the object.
greaterOrEqual: URIRef # This ordering relation for qualitative values indicates that the subject is greater than or equal to the object.
gtin12: URIRef # The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See <a href="http://www.gs1.org/barcodes/technical/idkeys/gtin">GS1 GTIN Summary</a> for more details.
- gtin13: URIRef # The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See <a href="http://www.gs1.org/barcodes/technical/idkeys/gtin">GS1 GTIN Summary</a> for more details.
+ gtin13: URIRef # The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero. See <a href="http://www.gs1.org/barcodes/technical/idkeys/gtin">GS1 GTIN Summary</a> for more details.
gtin14: URIRef # The GTIN-14 code of the product, or the product to which the offer refers. See <a href="http://www.gs1.org/barcodes/technical/idkeys/gtin">GS1 GTIN Summary</a> for more details.
gtin8: URIRef # The <a href="http://apps.gs1.org/GDD/glossary/Pages/GTIN-8.aspx">GTIN-8</a> code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See <a href="http://www.gs1.org/barcodes/technical/idkeys/gtin">GS1 GTIN Summary</a> for more details.
hasBroadcastChannel: URIRef # A broadcast channel of a broadcast service.
@@ -565,7 +565,7 @@ class SDO(DefinedNamespace):
hasPart: URIRef # Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).
headline: URIRef # Headline of the article.
height: URIRef # The height of the item.
- highPrice: URIRef # The highest price of all offers available.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ highPrice: URIRef # The highest price of all offers available.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
hiringOrganization: URIRef # Organization offering the job position.
homeLocation: URIRef # A contact location for a person's residence.
homeTeam: URIRef # The home team in a sports event.
@@ -654,7 +654,7 @@ class SDO(DefinedNamespace):
logo: URIRef # An associated logo.
longitude: URIRef # The longitude of a location. For example <code>-122.08585</code> (<a href="https://en.wikipedia.org/wiki/World_Geodetic_System">WGS 84</a>).
loser: URIRef # A sub property of participant. The loser of the action.
- lowPrice: URIRef # The lowest price of all offers available.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ lowPrice: URIRef # The lowest price of all offers available.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
lyricist: URIRef # The person who wrote the words.
lyrics: URIRef # The words in the song.
mainContentOfPage: URIRef # Indicates if this web page element is the main subject of the page.
@@ -797,9 +797,9 @@ class SDO(DefinedNamespace):
potentialAction: URIRef # Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
predecessorOf: URIRef # A pointer from a previous, often discontinued variant of the product to its newer variant.
prepTime: URIRef # The length of time it takes to prepare the items to be used in instructions or a direction, in <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601 duration format</a>.
- previousItem: URIRef # A link to the ListItem that preceeds the current one.
+ previousItem: URIRef # A link to the ListItem that precedes the current one.
previousStartDate: URIRef # Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated.
- price: URIRef # The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use the <a class="localLink" href="http://schema.org/priceCurrency">priceCurrency</a> property (with standard formats: <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217 currency format</a> e.g. "USD"; <a href="https://en.wikipedia.org/wiki/List_of_cryptocurrencies">Ticker symbol</a> for cryptocurrencies e.g. "BTC"; well known names for <a href="https://en.wikipedia.org/wiki/Local_exchange_trading_system">Local Exchange Tradings Systems</a> (LETS) and other currency types e.g. "Ithaca HOUR") instead of including <a href="http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign">ambiguous symbols</a> such as '$' in the value.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> <li>Note that both <a href="http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute">RDFa</a> and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.</li> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> </ul>
+ price: URIRef # The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use the <a class="localLink" href="http://schema.org/priceCurrency">priceCurrency</a> property (with standard formats: <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217 currency format</a> e.g. "USD"; <a href="https://en.wikipedia.org/wiki/List_of_cryptocurrencies">Ticker symbol</a> for cryptocurrencies e.g. "BTC"; well known names for <a href="https://en.wikipedia.org/wiki/Local_exchange_trading_system">Local Exchange Tradings Systems</a> (LETS) and other currency types e.g. "Ithaca HOUR") instead of including <a href="http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign">ambiguous symbols</a> such as '$' in the value.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> <li>Note that both <a href="http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute">RDFa</a> and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.</li> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> </ul>
priceComponent: URIRef # This property links to all <a class="localLink" href="http://schema.org/UnitPriceSpecification">UnitPriceSpecification</a> nodes that apply in parallel for the <a class="localLink" href="http://schema.org/CompoundPriceSpecification">CompoundPriceSpecification</a> node.
priceCurrency: URIRef # The currency of the price, or a price component when attached to <a class="localLink" href="http://schema.org/PriceSpecification">PriceSpecification</a> and its subtypes.<br/><br/> Use standard formats: <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217 currency format</a> e.g. "USD"; <a href="https://en.wikipedia.org/wiki/List_of_cryptocurrencies">Ticker symbol</a> for cryptocurrencies e.g. "BTC"; well known names for <a href="https://en.wikipedia.org/wiki/Local_exchange_trading_system">Local Exchange Tradings Systems</a> (LETS) and other currency types e.g. "Ithaca HOUR".
priceRange: URIRef # The price range of the business, for example <code>$$$</code>.
@@ -840,7 +840,7 @@ class SDO(DefinedNamespace):
quest: URIRef # The task that a player-controlled character, or group of characters may complete in order to gain a reward.
question: URIRef # A sub property of object. A question.
ratingCount: URIRef # The count of total number of ratings.
- ratingValue: URIRef # The rating for the content.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ ratingValue: URIRef # The rating for the content.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
readonlyValue: URIRef # Whether or not a property is mutable. Default is false. Specifying this for a property that also has a value makes it act similar to a "hidden" input in an HTML form.
realEstateAgent: URIRef # A sub property of participant. The real estate agent involved in the action.
recipe: URIRef # A sub property of instrument. The recipe/instructions used to perform the action.
@@ -1006,7 +1006,7 @@ class SDO(DefinedNamespace):
toRecipient: URIRef # A sub property of recipient. The recipient who was directly sent the message.
tool: URIRef # A sub property of instrument. An object used (but not consumed) when performing instructions or a direction.
totalPaymentDue: URIRef # The total amount due.
- totalPrice: URIRef # The total price for the reservation or ticket, including applicable taxes, shipping, etc.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ totalPrice: URIRef # The total price for the reservation or ticket, including applicable taxes, shipping, etc.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
totalTime: URIRef # The total time required to perform instructions or a direction (including time to prepare the supplies), in <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601 duration format</a>.
touristType: URIRef # Attraction suitable for type(s) of tourist. eg. Children, visitors from a particular country, etc.
track: URIRef # A music recording (track)&#x2014;usually a single song. If an ItemList is given, the list should contain items of type MusicRecording.
@@ -1036,7 +1036,7 @@ class SDO(DefinedNamespace):
validIn: URIRef # The geographic area where a permit or similar thing is valid.
validThrough: URIRef # The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
validUntil: URIRef # The date when the item is no longer valid.
- value: URIRef # The value of the quantitative value or property value node.<br/><br/> <ul> <li>For <a class="localLink" href="http://schema.org/QuantitativeValue">QuantitativeValue</a> and <a class="localLink" href="http://schema.org/MonetaryAmount">MonetaryAmount</a>, the recommended type for values is 'Number'.</li> <li>For <a class="localLink" href="http://schema.org/PropertyValue">PropertyValue</a>, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.</li> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ value: URIRef # The value of the quantitative value or property value node.<br/><br/> <ul> <li>For <a class="localLink" href="http://schema.org/QuantitativeValue">QuantitativeValue</a> and <a class="localLink" href="http://schema.org/MonetaryAmount">MonetaryAmount</a>, the recommended type for values is 'Number'.</li> <li>For <a class="localLink" href="http://schema.org/PropertyValue">PropertyValue</a>, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.</li> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
valueAddedTaxIncluded: URIRef # Specifies whether the applicable value-added tax (VAT) is included in the price specification or not.
valueMaxLength: URIRef # Specifies the allowed range for number of characters in a literal value.
valueMinLength: URIRef # Specifies the minimum allowed range for number of characters in a literal value.
@@ -1456,7 +1456,7 @@ class SDO(DefinedNamespace):
NightClub: URIRef # A nightclub or discotheque.
Notary: URIRef # A notary.
NoteDigitalDocument: URIRef # A file containing a note, primarily for the author.
- Number: URIRef # Data type: Number.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
+ Number: URIRef # Data type: Number.<br/><br/> Usage guidelines:<br/><br/> <ul> <li>Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.</li> <li>Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.</li> </ul>
NutritionInformation: URIRef # Nutritional information about the recipe.
Occupation: URIRef # A profession, may involve prolonged training and/or a formal qualification.
OceanBodyOfWater: URIRef # An ocean (for example, the Pacific).
@@ -1528,7 +1528,7 @@ class SDO(DefinedNamespace):
PublicationEvent: URIRef # A PublicationEvent corresponds indifferently to the event of publication for a CreativeWork of any type e.g. a broadcast event, an on-demand event, a book/journal publication via a variety of delivery media.
PublicationIssue: URIRef # A part of a successively published publication such as a periodical or publication volume, often numbered, usually containing a grouping of works such as articles.<br/><br/> See also <a href="http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html">blog post</a>.
PublicationVolume: URIRef # A part of a successively published publication such as a periodical or multi-volume work, often numbered. It may represent a time span, such as a year.<br/><br/> See also <a href="http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html">blog post</a>.
- QAPage: URIRef # A QAPage is a WebPage focussed on a specific Question and its Answer(s), e.g. in a question answering site or documenting Frequently Asked Questions (FAQs).
+ QAPage: URIRef # A QAPage is a WebPage focused on a specific Question and its Answer(s), e.g. in a question answering site or documenting Frequently Asked Questions (FAQs).
QualitativeValue: URIRef # A predefined value for a product characteristic, e.g. the power cord plug type 'US' or the garment sizes 'S', 'M', 'L', and 'XL'.
QuantitativeValue: URIRef # A point value or interval for product characteristics and other purposes.
QuantitativeValueDistribution: URIRef # A statistical distribution of values.
@@ -1546,7 +1546,7 @@ class SDO(DefinedNamespace):
ReactAction: URIRef # The act of responding instinctively and emotionally to an object, expressing a sentiment.
ReadAction: URIRef # The act of consuming written content.
RealEstateAgent: URIRef # A real-estate agent.
- ReceiveAction: URIRef # The act of physically/electronically taking delivery of an object thathas been transferred from an origin to a destination. Reciprocal of SendAction.<br/><br/> Related actions:<br/><br/> <ul> <li><a class="localLink" href="http://schema.org/SendAction">SendAction</a>: The reciprocal of ReceiveAction.</li> <li><a class="localLink" href="http://schema.org/TakeAction">TakeAction</a>: Unlike TakeAction, ReceiveAction does not imply that the ownership has been transfered (e.g. I can receive a package, but it does not mean the package is now mine).</li> </ul>
+ ReceiveAction: URIRef # The act of physically/electronically taking delivery of an object thathas been transferred from an origin to a destination. Reciprocal of SendAction.<br/><br/> Related actions:<br/><br/> <ul> <li><a class="localLink" href="http://schema.org/SendAction">SendAction</a>: The reciprocal of ReceiveAction.</li> <li><a class="localLink" href="http://schema.org/TakeAction">TakeAction</a>: Unlike TakeAction, ReceiveAction does not imply that the ownership has been transferred (e.g. I can receive a package, but it does not mean the package is now mine).</li> </ul>
Recipe: URIRef # A recipe. For dietary restrictions covered by the recipe, a few common restrictions are enumerated via <a class="localLink" href="http://schema.org/suitableForDiet">suitableForDiet</a>. The <a class="localLink" href="http://schema.org/keywords">keywords</a> property can also be used to add more detail.
RecyclingCenter: URIRef # A recycling center.
RegisterAction: URIRef # The act of registering to be a user of a service, product or web page.<br/><br/> Related actions:<br/><br/> <ul> <li><a class="localLink" href="http://schema.org/JoinAction">JoinAction</a>: Unlike JoinAction, RegisterAction implies you are registering to be a user of a service, <em>not</em> a group/team of people.</li> <li>[FollowAction]]: Unlike FollowAction, RegisterAction doesn't imply that the agent is expecting to poll for updates from the object.</li> <li><a class="localLink" href="http://schema.org/SubscribeAction">SubscribeAction</a>: Unlike SubscribeAction, RegisterAction doesn't imply that the agent is expecting updates from the object.</li> </ul>
@@ -1627,7 +1627,7 @@ class SDO(DefinedNamespace):
TVSeason: URIRef # Season dedicated to TV broadcast and associated online delivery.
TVSeries: URIRef # CreativeWorkSeries dedicated to TV broadcast and associated online delivery.
Table: URIRef # A table on a Web page.
- TakeAction: URIRef # The act of gaining ownership of an object from an origin. Reciprocal of GiveAction.<br/><br/> Related actions:<br/><br/> <ul> <li><a class="localLink" href="http://schema.org/GiveAction">GiveAction</a>: The reciprocal of TakeAction.</li> <li><a class="localLink" href="http://schema.org/ReceiveAction">ReceiveAction</a>: Unlike ReceiveAction, TakeAction implies that ownership has been transfered.</li> </ul>
+ TakeAction: URIRef # The act of gaining ownership of an object from an origin. Reciprocal of GiveAction.<br/><br/> Related actions:<br/><br/> <ul> <li><a class="localLink" href="http://schema.org/GiveAction">GiveAction</a>: The reciprocal of TakeAction.</li> <li><a class="localLink" href="http://schema.org/ReceiveAction">ReceiveAction</a>: Unlike ReceiveAction, TakeAction implies that ownership has been transferred.</li> </ul>
TattooParlor: URIRef # A tattoo parlor.
Taxi: URIRef # A taxi.
TaxiReservation: URIRef # A reservation for a taxi.<br/><br/> Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use <a class="localLink" href="http://schema.org/Offer">Offer</a>.
diff --git a/rdflib/namespace/_VOID.py b/rdflib/namespace/_VOID.py
index 78a28f89..af3b4088 100644
--- a/rdflib/namespace/_VOID.py
+++ b/rdflib/namespace/_VOID.py
@@ -21,7 +21,7 @@ class VOID(DefinedNamespace):
# http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
classPartition: URIRef # A subset of a void:Dataset that contains only the entities of a certain rdfs:Class.
- classes: URIRef # The total number of distinct classes in a void:Dataset. In other words, the number of distinct resources occuring as objects of rdf:type triples in the dataset.
+ classes: URIRef # The total number of distinct classes in a void:Dataset. In other words, the number of distinct resources occurring as objects of rdf:type triples in the dataset.
dataDump: URIRef # An RDF dump, partial or complete, of a void:Dataset.
distinctObjects: URIRef # The total number of distinct objects in a void:Dataset. In other words, the number of distinct resources that occur in the object position of triples in the dataset. Literals are included in this count.
distinctSubjects: URIRef # The total number of distinct subjects in a void:Dataset. In other words, the number of distinct resources that occur in the subject position of triples in the dataset.
diff --git a/rdflib/namespace/__init__.py b/rdflib/namespace/__init__.py
index 686aed6a..0487a55d 100644
--- a/rdflib/namespace/__init__.py
+++ b/rdflib/namespace/__init__.py
@@ -49,8 +49,8 @@ The following namespaces are available by directly importing from rdflib:
* BRICK
* CSVW
* DC
-* DCMITYPE
* DCAT
+* DCMITYPE
* DCTERMS
* DCAM
* DOAP
@@ -69,9 +69,9 @@ The following namespaces are available by directly importing from rdflib:
* SOSA
* SSN
* TIME
+* VANN
* VOID
* XSD
-* VANN
.. code-block:: pycon
>>> from rdflib.namespace import RDFS
@@ -701,6 +701,7 @@ from rdflib.namespace._BRICK import BRICK
from rdflib.namespace._CSVW import CSVW
from rdflib.namespace._DC import DC
from rdflib.namespace._DCAT import DCAT
+from rdflib.namespace._DCMITYPE import DCMITYPE
from rdflib.namespace._DCTERMS import DCTERMS
from rdflib.namespace._DOAP import DOAP
from rdflib.namespace._FOAF import FOAF
@@ -718,5 +719,6 @@ from rdflib.namespace._SKOS import SKOS
from rdflib.namespace._SOSA import SOSA
from rdflib.namespace._SSN import SSN
from rdflib.namespace._TIME import TIME
+from rdflib.namespace._VANN import VANN
from rdflib.namespace._VOID import VOID
from rdflib.namespace._XSD import XSD
diff --git a/rdflib/parser.py b/rdflib/parser.py
index 51e06fbb..f0014150 100644
--- a/rdflib/parser.py
+++ b/rdflib/parser.py
@@ -307,10 +307,13 @@ def create_input_source(
def _create_input_source_from_location(file, format, input_source, location):
- # Fix for Windows problem https://github.com/RDFLib/rdflib/issues/145
- path = pathlib.Path(location)
- if path.exists():
- location = path.absolute().as_uri()
+ # Fix for Windows problem https://github.com/RDFLib/rdflib/issues/145 and
+ # https://github.com/RDFLib/rdflib/issues/1430
+ # NOTE: using pathlib.Path.exists on a URL fails on windows as it is not a
+ # valid path. However os.path.exists() returns false for a URL on windows
+ # which is why it is being used instead.
+ if os.path.exists(location):
+ location = pathlib.Path(location).absolute().as_uri()
base = pathlib.Path.cwd().as_uri()
diff --git a/rdflib/paths.py b/rdflib/paths.py
index 48cb2e7c..75c0e1c4 100644
--- a/rdflib/paths.py
+++ b/rdflib/paths.py
@@ -372,7 +372,7 @@ class MulPath(Path):
# (even literals)
# we cannot do this without going through ALL triples
# unless we keep an index of all terms somehow
- # but lets just hope this query doesnt happen very often...
+ # but let's just hope this query doesn't happen very often...
for s, o in graph.subject_objects(None):
if s not in seen1:
seen1.add(s)
diff --git a/rdflib/plugins/parsers/notation3.py b/rdflib/plugins/parsers/notation3.py
index 3f8fdbac..deca4e9f 100755
--- a/rdflib/plugins/parsers/notation3.py
+++ b/rdflib/plugins/parsers/notation3.py
@@ -183,7 +183,7 @@ def join(here, there):
def base():
"""The base URI for this process - the Web equiv of cwd
- Relative or abolute unix-standard filenames parsed relative to
+ Relative or absolute unix-standard filenames parsed relative to
this yield the URI of the file.
If we had a reliable way of getting a computer name,
we should put it in the hostname just to prevent ambiguity
@@ -301,7 +301,7 @@ option_noregen = 0 # If set, do not regenerate genids on output
# @@ I18n - the notname chars need extending for well known unicode non-text
# characters. The XML spec switched to assuming unknown things were name
-# characaters.
+# characters.
# _namechars = string.lowercase + string.uppercase + string.digits + '_-'
_notQNameChars = set("\t\r\n !\"#$&'()*,+/;<=>?@[\\]^`{|}~") # else valid qname :-/
_notKeywordsChars = _notQNameChars | {"."}
@@ -325,7 +325,7 @@ unicodeEscape4 = re.compile(r"\\u([0-9a-fA-F]{4})")
unicodeEscape8 = re.compile(r"\\U([0-9a-fA-F]{8})")
-N3CommentCharacter = "#" # For unix script # ! compatabilty
+N3CommentCharacter = "#" # For unix script # ! compatibility
########################################## Parse string to sink
#
@@ -372,7 +372,7 @@ class SinkParser:
self.startOfLine = 0 # For calculating character number
self._genPrefix = genPrefix
self.keywords = ["a", "this", "bind", "has", "is", "of", "true", "false"]
- self.keywordsSet = 0 # Then only can others be considerd qnames
+ self.keywordsSet = 0 # Then only can others be considered qnames
self._anonymousNodes = {}
# Dict of anon nodes already declared ln: Term
self._variables = {}
@@ -421,7 +421,7 @@ class SinkParser:
def here(self, i):
"""String generated from position in file
- This is for repeatability when refering people to bnodes in a document.
+ This is for repeatability when referring people to bnodes in a document.
This has diagnostic uses less formally, as it should point one to which
bnode the arbitrary identifier actually is. It gives the
line and character number of the '[' charcacter or path character
@@ -445,7 +445,7 @@ class SinkParser:
return self.endDoc() # self._formula
def feed(self, octets):
- """Feed an octet stream tothe parser
+ """Feed an octet stream to the parser
if BadSyntax is raised, the string
passed in the exception object is the
@@ -524,7 +524,7 @@ class SinkParser:
def sparqlTok(self, tok, argstr, i):
"""Check for SPARQL keyword. Space must have been stripped on entry
and we must not be at end of file.
- Case insensitive and not preceeded by @
+ Case insensitive and not preceded by @
"""
assert tok[0] not in _notNameChars # not for punctuation
@@ -874,7 +874,7 @@ class SinkParser:
def node(self, argstr, i, res, subjectAlready=None):
"""Parse the <node> production.
Space is now skipped once at the beginning
- instead of in multipe calls to self.skipSpace().
+ instead of in multiple calls to self.skipSpace().
"""
subj = subjectAlready
@@ -1191,7 +1191,7 @@ class SinkParser:
if argstr[i] == "?":
v = []
j = self.variable(argstr, i, v)
- if j > 0: # Forget varibles as a class, only in context.
+ if j > 0: # Forget variables as a class, only in context.
res.append(v[0])
return j
return -1
@@ -1223,7 +1223,7 @@ class SinkParser:
v = []
j = self.bareWord(argstr, i, v)
if j < 0:
- return -1 # Forget varibles as a class, only in context.
+ return -1 # Forget variables as a class, only in context.
if v[0] in self.keywords:
self.BadSyntax(argstr, i, 'Keyword "%s" not allowed here.' % v[0])
res.append(self._store.newSymbol(self._bindings[""] + v[0]))
@@ -1272,7 +1272,7 @@ class SinkParser:
j += 1
i = j
if argstr[j] in numberChars:
- self.BadSyntax(argstr, j, "Varible name can't start with '%s'" % argstr[j])
+ self.BadSyntax(argstr, j, "Variable name can't start with '%s'" % argstr[j])
len_argstr = len(argstr)
while i < len_argstr and argstr[i] not in _notKeywordsChars:
i += 1
diff --git a/rdflib/plugins/parsers/ntriples.py b/rdflib/plugins/parsers/ntriples.py
index 2acf8b99..9a66df7f 100644
--- a/rdflib/plugins/parsers/ntriples.py
+++ b/rdflib/plugins/parsers/ntriples.py
@@ -263,7 +263,7 @@ class W3CNTriplesParser(object):
bnode_id = self.eat(r_nodeid).group(1)
new_id = bnode_context.get(bnode_id, None)
if new_id is not None:
- # Re-map to id specfic to this doc
+ # Re-map to id specific to this doc
return bNode(new_id)
else:
# Replace with freshly-generated document-specific BNode id
diff --git a/rdflib/plugins/sparql/aggregates.py b/rdflib/plugins/sparql/aggregates.py
index ec68ad91..20f0a10a 100644
--- a/rdflib/plugins/sparql/aggregates.py
+++ b/rdflib/plugins/sparql/aggregates.py
@@ -177,7 +177,7 @@ class Maximum(Extremum):
class Sample(Accumulator):
- """takes the first eligable value"""
+ """takes the first eligible value"""
def __init__(self, aggregation):
super(Sample, self).__init__(aggregation)
@@ -201,7 +201,7 @@ class Sample(Accumulator):
class GroupConcat(Accumulator):
def __init__(self, aggregation):
super(GroupConcat, self).__init__(aggregation)
- # only GROUPCONCAT needs to have a list as accumlator
+ # only GROUPCONCAT needs to have a list as accumulator
self.value = []
self.separator = aggregation.separator or " "
diff --git a/rdflib/plugins/sparql/parser.py b/rdflib/plugins/sparql/parser.py
index bcf9ed38..fb3854c0 100644
--- a/rdflib/plugins/sparql/parser.py
+++ b/rdflib/plugins/sparql/parser.py
@@ -585,10 +585,10 @@ TriplesSameSubject = VarOrTerm + PropertyListNotEmpty | TriplesNode + PropertyLi
TriplesSameSubject.setParseAction(expandTriples)
# [52] TriplesTemplate ::= TriplesSameSubject ( '.' TriplesTemplate? )?
-# NOTE: pyparsing.py handling of recursive rules is limited by python's recusion
+# NOTE: pyparsing.py handling of recursive rules is limited by python's recursion
# limit.
# (https://docs.python.org/3/library/sys.html#sys.setrecursionlimit)
-# To accomodate aribtrary amounts of triples this rule is rewritten to not be
+# To accommodate arbitrary amounts of triples this rule is rewritten to not be
# recursive:
# [52*] TriplesTemplate ::= TriplesSameSubject ( '.' TriplesSameSubject? )*
TriplesTemplate = ParamList("triples", TriplesSameSubject) + ZeroOrMore(
@@ -1443,7 +1443,7 @@ SelectQuery = Comp(
)
# [10] ConstructQuery ::= 'CONSTRUCT' ( ConstructTemplate DatasetClause* WhereClause SolutionModifier | DatasetClause* 'WHERE' '{' TriplesTemplate? '}' SolutionModifier )
-# NOTE: The CONSTRUCT WHERE alternative has unnescessarily many Comp/Param pairs
+# NOTE: The CONSTRUCT WHERE alternative has unnecessarily many Comp/Param pairs
# to allow it to through the same algebra translation process
ConstructQuery = Comp(
"ConstructQuery",
@@ -1503,7 +1503,7 @@ Update <<= ParamList("prologue", Prologue) + Optional(
# [2] Query ::= Prologue
# ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery )
# ValuesClause
-# NOTE: ValuesClause was moved to invidual queries
+# NOTE: ValuesClause was moved to individual queries
Query = Prologue + (SelectQuery | ConstructQuery | DescribeQuery | AskQuery)
# [3] UpdateUnit ::= Update
diff --git a/rdflib/plugins/sparql/parserutils.py b/rdflib/plugins/sparql/parserutils.py
index fdbc6976..62ad2ecc 100644
--- a/rdflib/plugins/sparql/parserutils.py
+++ b/rdflib/plugins/sparql/parserutils.py
@@ -22,7 +22,7 @@ For example:
BaseDecl = Comp('Base', Keyword('BASE') + Param('iri',IRIREF))
After parsing, this gives you back an CompValue object,
-which is a dict/object with the paramters specified.
+which is a dict/object with the parameters specified.
So you can access the parameters are attributes or as keys:
baseDecl.iri
@@ -134,7 +134,7 @@ class CompValue(OrderedDict):
"""
The result of parsing a Comp
- Any included Params are avaiable as Dict keys
+ Any included Params are available as Dict keys
or as attributes
"""
diff --git a/rdflib/plugins/stores/auditable.py b/rdflib/plugins/stores/auditable.py
index ff21716b..39046eef 100644
--- a/rdflib/plugins/stores/auditable.py
+++ b/rdflib/plugins/stores/auditable.py
@@ -145,7 +145,7 @@ class AuditableStore(Store):
self.reverseOps = []
def rollback(self):
- # Aquire Rollback lock and apply reverse operations in the forward
+ # Acquire Rollback lock and apply reverse operations in the forward
# order
with self.rollbackLock:
for subject, predicate, obj, context, op in self.reverseOps:
diff --git a/rdflib/plugins/stores/sparqlstore.py b/rdflib/plugins/stores/sparqlstore.py
index 903ce671..aed43088 100644
--- a/rdflib/plugins/stores/sparqlstore.py
+++ b/rdflib/plugins/stores/sparqlstore.py
@@ -793,7 +793,7 @@ class SPARQLUpdateStore(SPARQLStore):
):
# In this case, adding graph_block_start and
# graph_block_end results in an empty GRAPH block. Some
- # enpoints (e.g. TDB) can not handle this. Therefore
+ # endpoints (e.g. TDB) can not handle this. Therefore
# remove the previously added block_start.
modified_query.pop()
modified_query.append(since_previous_pos)
diff --git a/rdflib/store.py b/rdflib/store.py
index 915ca57a..14594d21 100644
--- a/rdflib/store.py
+++ b/rdflib/store.py
@@ -138,7 +138,7 @@ class Store(object):
def __init__(self, configuration=None, identifier=None):
"""
identifier: URIRef of the Store. Defaults to CWD
- configuration: string containing infomation open can use to
+ configuration: string containing information open can use to
connect to datastore.
"""
self.__node_pickler = None
@@ -364,6 +364,11 @@ class Store(object):
def namespaces(self):
""" """
+ # This is here so that the function becomes an empty generator.
+ # See https://stackoverflow.com/q/13243766 and
+ # https://www.python.org/dev/peps/pep-0255/#why-a-new-keyword-for-yield-why-not-a-builtin-function-instead
+ if False:
+ yield None # type: ignore[unreachable]
# Optional Transactional methods
@@ -385,7 +390,7 @@ class Store(object):
def remove_graph(self, graph):
"""
- Remove a graph from the store, this shoud also remove all
+ Remove a graph from the store, this should also remove all
triples in the graph
:param graphid: a Graph instance
diff --git a/rdflib/term.py b/rdflib/term.py
index eb1f2cb6..55007691 100644
--- a/rdflib/term.py
+++ b/rdflib/term.py
@@ -364,7 +364,7 @@ class RDFLibGenid(Genid):
def _unique_id():
# Used to read: """Create a (hopefully) unique prefix"""
- # now retained merely to leave interal API unchanged.
+ # now retained merely to leave internal API unchanged.
# From BNode.__new__() below ...
#
# acceptable bnode value range for RDF/XML needs to be
diff --git a/rdflib/tools/csv2rdf.py b/rdflib/tools/csv2rdf.py
index f1acf9e0..a8aefba2 100644
--- a/rdflib/tools/csv2rdf.py
+++ b/rdflib/tools/csv2rdf.py
@@ -94,7 +94,7 @@ uris = {}
def toProperty(label):
"""
- CamelCase + lowercase inital a string
+ CamelCase + lowercase initial a string
FIRST_NM => firstNm
diff --git a/rdflib/tools/rdfpipe.py b/rdflib/tools/rdfpipe.py
index 98749487..d0673f72 100644
--- a/rdflib/tools/rdfpipe.py
+++ b/rdflib/tools/rdfpipe.py
@@ -187,8 +187,8 @@ def main():
logging.basicConfig(level=loglevel)
ns_bindings = {}
- if opts.LOVE:
- for ns_kw in opts.LOVE:
+ if opts.ns:
+ for ns_kw in opts.ns:
pfx, uri = ns_kw.split("=")
ns_bindings[pfx] = uri
diff --git a/requirements.dev.txt b/requirements.dev.txt
index fda1b49e..27181725 100644
--- a/requirements.dev.txt
+++ b/requirements.dev.txt
@@ -6,7 +6,7 @@ coverage
flake8
doctest-ignore-unicode==0.1.2
berkeleydb
-black==21.6b0
+black==21.9b0
flake8-black
mypy
types-setuptools
diff --git a/setup.py b/setup.py
index 475242f9..fc36718f 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ kwargs["tests_require"] = [
"nose==1.3.7",
"nose-timer",
"coverage",
- "black==21.6b0",
+ "black==21.9b0",
"flake8",
"doctest-ignore-unicode==0.1.2",
]
diff --git a/test/test_graph.py b/test/test_graph.py
index 08c112a5..8143eff9 100644
--- a/test/test_graph.py
+++ b/test/test_graph.py
@@ -9,9 +9,14 @@ from urllib.error import URLError, HTTPError
from rdflib import URIRef, Graph, plugin
from rdflib.exceptions import ParserError
from rdflib.plugin import PluginException
+from rdflib.namespace import Namespace
from nose.exc import SkipTest
+from pathlib import Path
+
+from test.testutils import GraphHelper
+
class GraphTestCase(unittest.TestCase):
store = "default"
@@ -326,6 +331,20 @@ class GraphTestCase(unittest.TestCase):
# this endpoint is currently not available, ignore this test.
pass
+ def test_parse_file_uri(self):
+ EG = Namespace("http://example.org/#")
+ g = Graph()
+ g.parse(Path("./test/nt/simple-04.nt").absolute().as_uri())
+ triple_set = GraphHelper.triple_set(g)
+ self.assertEqual(
+ triple_set,
+ {
+ (EG["Subject"], EG["predicate"], EG["ObjectP"]),
+ (EG["Subject"], EG["predicate"], EG["ObjectQ"]),
+ (EG["Subject"], EG["predicate"], EG["ObjectR"]),
+ },
+ )
+
def testTransitive(self):
person = URIRef("ex:person")
dad = URIRef("ex:dad")
diff --git a/test/test_graph_http.py b/test/test_graph_http.py
index 1ee8292e..927fdc2e 100644
--- a/test/test_graph_http.py
+++ b/test/test_graph_http.py
@@ -63,7 +63,7 @@ class ContentNegotiationHandler(BaseHTTPRequestHandler):
class TestGraphHTTP(unittest.TestCase):
- def content_negotiation(self) -> None:
+ def test_content_negotiation(self) -> None:
EG = Namespace("http://example.org/")
expected = Graph()
expected.add((EG["a"], EG["b"], EG["c"]))
@@ -77,6 +77,29 @@ class TestGraphHTTP(unittest.TestCase):
graph.parse(url, format=format)
self.assertEqual(expected_triples, GraphHelper.triple_set(graph))
+ def test_source(self) -> None:
+ EG = Namespace("http://example.org/")
+ expected = Graph()
+ expected.add((EG["a"], EG["b"], EG["c"]))
+ expected_triples = GraphHelper.triple_set(expected)
+
+ httpmock = SimpleHTTPMock()
+ with ctx_http_server(httpmock.Handler) as server:
+ (host, port) = server.server_address
+ url = f"http://{host}:{port}/"
+
+ httpmock.do_get_responses.append(
+ MockHTTPResponse(
+ 200,
+ "OK",
+ f"<{EG['a']}> <{EG['b']}> <{EG['c']}>.".encode(),
+ {"Content-Type": ["text/turtle"]},
+ )
+ )
+ graph = Graph()
+ graph.parse(source=url)
+ self.assertEqual(expected_triples, GraphHelper.triple_set(graph))
+
def test_3xx(self) -> None:
EG = Namespace("http://example.com/")
expected = Graph()
diff --git a/test/test_namespace.py b/test/test_namespace.py
index 76f5bbf1..e6473c8b 100644
--- a/test/test_namespace.py
+++ b/test/test_namespace.py
@@ -7,6 +7,7 @@ from rdflib import DCTERMS
from rdflib.graph import Graph
from rdflib.namespace import (
FOAF,
+ OWL,
RDF,
RDFS,
SH,
@@ -41,7 +42,7 @@ class NamespaceTest(unittest.TestCase):
prefix = "http://jörn.loves.encoding.problems/"
ns = Namespace(prefix)
self.assertEqual(ns, str(prefix))
- self.assert_(ns["jörn"].startswith(ns))
+ self.assertTrue(ns["jörn"].startswith(ns))
class ClosedNamespaceTest(unittest.TestCase):
@@ -245,3 +246,9 @@ class NamespacePrefixTest(unittest.TestCase):
ref = URIRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#_1")
self.assertTrue(ref in RDF, "RDF does not include rdf:_1")
+
+ ref = URIRef("http://www.w3.org/2002/07/owl#rational")
+ self.assertTrue(ref in OWL, "OWL does not include owl:rational")
+
+ ref = URIRef("http://www.w3.org/2002/07/owl#real")
+ self.assertTrue(ref in OWL, "OWL does not include owl:real")
diff --git a/test/test_rules.py b/test/test_rules.py
index c2496760..e020193d 100644
--- a/test/test_rules.py
+++ b/test/test_rules.py
@@ -55,7 +55,7 @@ try:
def tearDown(self):
self.g.close()
- shutil.rmtree(tmppath)
+ shutil.rmtree(self.tmppath)
def testPychinko(self):
rules = []
diff --git a/test/test_store.py b/test/test_store.py
new file mode 100644
index 00000000..d4d8d0a8
--- /dev/null
+++ b/test/test_store.py
@@ -0,0 +1,25 @@
+import unittest
+from rdflib import Graph
+from rdflib.store import Store
+from rdflib.namespace import NamespaceManager
+
+
+class TestAbstractStore(unittest.TestCase):
+ def test_namespaces(self):
+ """
+ This tests that Store.namespaces is an empty generator.
+ """
+ store = Store()
+ self.assertEqual(list(store.namespaces()), [])
+
+ def test_namespaces_via_manager(self):
+ """
+ This tests that NamespaceManager.namespaces works correctly with an
+ abstract Store.
+ """
+ namespace_manager = NamespaceManager(Graph(store=Store()))
+ self.assertEqual(list(namespace_manager.namespaces()), [])
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tox.ini b/tox.ini
index 0615a0b3..01173dcb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py36,py37,py38,py39
+ py37,py38,py39
[testenv]
setenv =