kgrid-sdk 2.0.0__tar.gz → 2.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kgrid_sdk
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: SDK for KGrid 2.0 Knowledge objects
5
5
  Author: KGrid Developers
6
6
  Author-email: kgrid-developers@umich.edu
@@ -1252,11 +1252,13 @@ def information_page(
1252
1252
  {% set sources = [sources] if sources is mapping else sources %}
1253
1253
  <ul>
1254
1254
  {% for source in sources %}
1255
- <li>
1256
- <a href="{{ source["@id"] }}" target='_blank' rel='noopener noreferrer'>
1257
- {{ source["http://purl.org/dc/elements/1.1/bibliographicCitation"][0]["@value"] }}
1258
- </a>
1259
- </li>
1255
+ {% if source.get("@id") and source.get("http://purl.org/dc/elements/1.1/bibliographicCitation") %}
1256
+ <li>
1257
+ <a href="{{ source["@id"] }}" target='_blank' rel='noopener noreferrer'>
1258
+ {{ source["http://purl.org/dc/elements/1.1/bibliographicCitation"][0]["@value"] }}
1259
+ </a>
1260
+ </li>
1261
+ {% endif %}
1260
1262
  {% endfor %}
1261
1263
  </ul>
1262
1264
  {% endif %}
@@ -1267,11 +1269,13 @@ def information_page(
1267
1269
  {% set isReferencedBys = [isReferencedBys] if isReferencedBys is mapping else isReferencedBys %}
1268
1270
  <ul>
1269
1271
  {% for isReferencedBy in isReferencedBys %}
1270
- <li>
1271
- <a href="{{ isReferencedBy["@id"] }}" target='_blank' rel='noopener noreferrer'>
1272
- {{ isReferencedBy["http://purl.org/dc/elements/1.1/bibliographicCitation"][0]["@value"] }}
1273
- </a>
1274
- </li>
1272
+ {% if isReferencedBy.get("@id") and isReferencedBy.get("http://purl.org/dc/elements/1.1/bibliographicCitation") %}
1273
+ <li>
1274
+ <a href="{{ isReferencedBy["@id"] }}" target='_blank' rel='noopener noreferrer'>
1275
+ {{ isReferencedBy["http://purl.org/dc/elements/1.1/bibliographicCitation"][0]["@value"] }}
1276
+ </a>
1277
+ </li>
1278
+ {% endif %}
1275
1279
  {% endfor %}
1276
1280
  </ul>
1277
1281
  {% endif %}
@@ -2050,6 +2054,11 @@ def init(name: str):
2050
2054
  # "C:/dev/FAIR-DO-Workshop/HBOT3-KA/index.html",
2051
2055
  # False
2052
2056
  # )
2057
+ # information_page(
2058
+ # "C:/dev/metadata.json",
2059
+ # "C:/dev/index.html",
2060
+ # False
2061
+ # )
2053
2062
 
2054
2063
  # init("test")
2055
2064
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kgrid_sdk"
3
- version = "2.0.0"
3
+ version = "2.0.2"
4
4
  description = "SDK for KGrid 2.0 Knowledge objects"
5
5
  authors = ["KGrid Developers <kgrid-developers@umich.edu>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes