pyLodStorage 0.3.5__tar.gz → 0.3.7__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.
Files changed (40) hide show
  1. {pylodstorage-0.3.5/pylodstorage.egg-info → pylodstorage-0.3.7}/PKG-INFO +1 -1
  2. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/trulytabular.py +9 -6
  3. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/version.py +2 -2
  4. {pylodstorage-0.3.5 → pylodstorage-0.3.7/pylodstorage.egg-info}/PKG-INFO +1 -1
  5. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/LICENSE +0 -0
  6. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/README.md +0 -0
  7. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/__init__.py +0 -0
  8. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/csv.py +0 -0
  9. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/entity.py +0 -0
  10. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/jsonable.py +0 -0
  11. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/jsonpicklemixin.py +0 -0
  12. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/lod.py +0 -0
  13. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/mwTable.py +0 -0
  14. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/plot.py +0 -0
  15. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/query.py +0 -0
  16. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/querymain.py +0 -0
  17. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/sample.py +0 -0
  18. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/schema.py +0 -0
  19. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/sparql.py +0 -0
  20. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/sql.py +0 -0
  21. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/storageconfig.py +0 -0
  22. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/tabulateCounter.py +0 -0
  23. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/uml.py +0 -0
  24. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/xml.py +0 -0
  25. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/lodstorage/yamlablemixin.py +0 -0
  26. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/pylodstorage.egg-info/SOURCES.txt +0 -0
  27. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/pylodstorage.egg-info/dependency_links.txt +0 -0
  28. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/pylodstorage.egg-info/entry_points.txt +0 -0
  29. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/pylodstorage.egg-info/requires.txt +0 -0
  30. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/pylodstorage.egg-info/top_level.txt +0 -0
  31. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/__init__.py +0 -0
  32. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/endpoints.yaml +0 -0
  33. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/formats.yaml +0 -0
  34. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/queries.yaml +0 -0
  35. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/scholia.yaml +0 -0
  36. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/trulytabular.yaml +0 -0
  37. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/wf.yaml +0 -0
  38. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/sampledata/wikidata.yaml +0 -0
  39. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/setup.cfg +0 -0
  40. {pylodstorage-0.3.5 → pylodstorage-0.3.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -333,6 +333,8 @@ WHERE
333
333
  }}"""
334
334
  try:
335
335
  count=self.sparql.getValue(query, "count")
336
+ # workaround https://github.com/ad-freiburg/qlever/issues/717
337
+ count=int(count)
336
338
  except Exception as ex:
337
339
  self.error=ex
338
340
  count=None
@@ -535,19 +537,16 @@ ORDER BY DESC (?count)
535
537
  # work around https://github.com/RDFLib/sparqlwrapper/issues/211
536
538
  if "described at" in propertyLabel:
537
539
  propertyLabel=propertyLabel.replace("described at","describ'd at")
538
- sparql=f"""
539
- # Count all {self.asText(long=True)} items
540
- # with the given {propertyLabel}({propertyId}) https://www.wikidata.org/wiki/Property:{propertyId}
541
- SELECT ?item ?itemLabel (COUNT (?value) AS ?count)
540
+ sparql=f"""SELECT ?item ?itemLabel (COUNT (?value) AS ?count)
542
541
  WHERE
543
542
  {{
544
543
  # instance of {self.item.qlabel}
545
544
  ?item wdt:P31 wd:{self.itemQid}.{self.where}
546
545
  ?item rdfs:label ?itemLabel.
547
- filter (lang(?itemLabel) = "en").
546
+ FILTER (LANG(?itemLabel) = "{self.lang}").
548
547
  # {propertyLabel}
549
548
  ?item {wdProperty.getPredicate()} ?value.
550
- }} GROUP by ?item ?itemLabel
549
+ }} GROUP BY ?item ?itemLabel
551
550
  """
552
551
  if asFrequency:
553
552
  freqDesc="frequencies"
@@ -561,6 +560,10 @@ ORDER BY DESC (?frequency)"""
561
560
  sparql=f"""{sparql}
562
561
  HAVING (COUNT (?value) > 1)
563
562
  ORDER BY DESC(?count)"""
563
+ sparql=f"""# Count all {self.asText(long=True)} items
564
+ # with the given {propertyLabel}({propertyId}) https://www.wikidata.org/wiki/Property:{propertyId}
565
+ {WikidataItem.getPrefixes()}
566
+ """+sparql
564
567
  title=f"non tabular entries for {self.item.qlabel}/{propertyLabel}:{freqDesc}"
565
568
  name=f"NonTabular {self.item.qlabel}/{propertyLabel}:{freqDesc}"
566
569
  query=Query(query=sparql,name=name,title=title)
@@ -9,7 +9,7 @@ class Version(object):
9
9
  Version handling for pyLoDStorage
10
10
  '''
11
11
  name="pylodstorage"
12
- version='0.3.5'
12
+ version='0.3.7'
13
13
  date = '2020-09-10'
14
- updated = '2022-07-30'
14
+ updated = '2022-07-31'
15
15
  description='python List of Dict (Table) Storage library'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
File without changes
File without changes
File without changes
File without changes