arelle-release 2.36.32__py3-none-any.whl → 2.36.34__py3-none-any.whl

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.

Potentially problematic release.


This version of arelle-release might be problematic. Click here for more details.

arelle/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.36.32'
21
- __version_tuple__ = version_tuple = (2, 36, 32)
20
+ __version__ = version = '2.36.34'
21
+ __version_tuple__ = version_tuple = (2, 36, 34)
@@ -68,15 +68,23 @@ class LogHandlerWithXml(logging.Handler):
68
68
  entityEncode(msg),
69
69
  refs))
70
70
  def recordToJson(self, logRec: logging.LogRecord) -> dict[str, Any]:
71
- message = { "text": self.format(logRec) }
72
- if logRec.args and isinstance(logRec.args, Mapping):
73
- for n, v in logRec.args.items():
74
- message[n] = str(v)
71
+ message = {
72
+ "text": self.format(logRec),
73
+ "args": self._buildJsonMessageArgs(logRec),
74
+ }
75
75
  return {"code": getattr(logRec, "messageCode", ""),
76
76
  "level": logRec.levelname.lower(),
77
77
  "refs": getattr(logRec, "refs", []),
78
78
  "message": message}
79
79
 
80
+ def _buildJsonMessageArgs(self, logRec: logging.LogRecord) -> dict[str, Any]:
81
+ if logRec.args and isinstance(logRec.args, Mapping):
82
+ return {
83
+ n: str(v)
84
+ for n, v in logRec.args.items()
85
+ }
86
+ return {}
87
+
80
88
  def recordToHtml(self, logRec: logging.LogRecord) -> str:
81
89
  record = ["<tr>"]
82
90
  record.append(f"<td>{getattr(logRec, 'messageCode', '')}</td>")
arelle/oim/Load.py CHANGED
@@ -318,7 +318,7 @@ CsvMemberTypes = {
318
318
  "/documentInfo/baseURL": URIType,
319
319
  "/documentInfo/documentType": str,
320
320
  "/documentInfo/features": dict,
321
- "/documentInfo/features/*:*": (int,float,bool,str,type(None)),
321
+ "/documentInfo/features/*:*": (int,float,bool,str,dict,list,type(None),NoRecursionCheck),
322
322
  "/documentInfo/final": dict,
323
323
  "/documentInfo/namespaces": dict,
324
324
  "/documentInfo/namespaces/*": URIType,
@@ -377,6 +377,7 @@ CsvMemberTypes = {
377
377
  "/tableTemplates/*/columns/*/propertiesFrom/": str,
378
378
  "/tableTemplates/*/columns/*/propertyGroups": dict,
379
379
  "/tableTemplates/*/columns/*/propertyGroups/*": dict,
380
+ "/tableTemplates/*/columns/*/propertyGroups/*/*:*": (int,float,bool,str,dict,list,type(None),NoRecursionCheck,CheckPrefix), # custom extensions
380
381
  "/tableTemplates/*/columns/*/propertyGroups/*/decimals": (int,str),
381
382
  "/tableTemplates/*/columns/*/propertyGroups/*/dimensions": dict,
382
383
  "/tableTemplates/*/columns/*/propertyGroups/*/dimensions/concept": str,
@@ -1316,8 +1317,8 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1316
1317
  # check table parameters
1317
1318
  tableParameterReferenceNames = set()
1318
1319
  def checkParamRef(paramValue, factColName=None, dimName=None):
1319
- if isinstance(paramValue, str) and paramValue.startswith("$") and not paramValue.startswith("$$"):
1320
- paramName = paramValue[1:].partition("@")[0]
1320
+ if _isParamRef(paramValue):
1321
+ paramName = _getParamRefName(paramValue)
1321
1322
  tableParameterReferenceNames.add(paramName)
1322
1323
  unitDims = set()
1323
1324
  for factColName, colDims in factDimensions.items():
@@ -1540,16 +1541,21 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1540
1541
  for propFromColName in propFromColNames:
1541
1542
  if propFromColName in rowPropGroups:
1542
1543
  for prop, val in rowPropGroups[propFromColName].items():
1544
+ if ":" in prop:
1545
+ # Extension property
1546
+ continue
1543
1547
  if isinstance(val, dict):
1544
1548
  _valDict = cellPropGroup.setdefault(prop, {})
1545
1549
  for dim, _val in val.items():
1546
1550
  _valDict[dim] = _val
1547
1551
  propGroupDimSource[dim] = propFromColName
1548
- if _val.startswith("$") and not _val.startswith("$$"):
1549
- rowPropGrpParamRefs.add(_val.partition("@")[0][1:])
1552
+ if _isParamRef(_val):
1553
+ rowPropGrpParamRefs.add(_getParamRefName(_val))
1550
1554
  else:
1551
1555
  cellPropGroup[prop] = val
1552
1556
  propGroupDimSource[prop] = propFromColName
1557
+ if _isParamRef(val):
1558
+ rowPropGrpParamRefs.add(_getParamRefName(val))
1553
1559
  if factDimensions[colName] is None:
1554
1560
  if colName in paramRefColNames:
1555
1561
  value = _cellValue(row[colNameIndex[colName]])
@@ -1560,8 +1566,14 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1560
1566
  if not cellPropGroup:
1561
1567
  continue # not a fact column
1562
1568
  for rowPropGrpParamRef in rowPropGrpParamRefs:
1563
- value = _cellValue(row[colNameIndex[rowPropGrpParamRef]])
1564
- if value is EMPTY_CELL or value is NONE_CELL:
1569
+ value = None
1570
+ if rowPropGrpParamRef in colNameIndex:
1571
+ value = _cellValue(row[colNameIndex[rowPropGrpParamRef]])
1572
+ elif rowPropGrpParamRef in tableParameters:
1573
+ value = tableParameters.get(rowPropGrpParamRef)
1574
+ elif rowPropGrpParamRef in reportParameters:
1575
+ value = reportParameters.get(rowPropGrpParamRef)
1576
+ if value in (None, EMPTY_CELL, NONE_CELL):
1565
1577
  emptyCols.add(rowPropGrpParamRef)
1566
1578
  # assemble row and fact Ids
1567
1579
  if idColIndex is not None and not rowId:
@@ -1628,8 +1640,10 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1628
1640
  factDimensionSourceCol[dimName] = paramName
1629
1641
  elif paramName in tableParameters:
1630
1642
  dimValue = tableParameters[paramName]
1643
+ factDimensionSourceCol[dimName] = paramName
1631
1644
  elif paramName in reportParameters:
1632
1645
  dimValue = reportParameters[paramName]
1646
+ factDimensionSourceCol[dimName] = paramName
1633
1647
  elif paramName in unreportedFactDimensionColumns:
1634
1648
  dimValue = NONE_CELL
1635
1649
  else:
@@ -1659,7 +1673,10 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1659
1673
  elif "decimals" in cellPropGroup:
1660
1674
  dimValue = cellPropGroup["decimals"]
1661
1675
  dimSource = "propertyGroup " + propFromColName
1662
- factDimensionPropGrpCol["decimals"] = propGroupDimSource[dimName]
1676
+ if _isParamRef(dimValue):
1677
+ factDimensionPropGrpCol["decimals"] = _getParamRefName(dimValue)
1678
+ else:
1679
+ factDimensionPropGrpCol["decimals"] = dimValue
1663
1680
  elif tableDecimals is not None:
1664
1681
  dimValue = tableDecimals
1665
1682
  dimSource = "table decimals"
@@ -1840,7 +1857,7 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
1840
1857
  error("xbrlce:invalidJSONStructure",
1841
1858
  _("Invalid value: %(value)s at %(path)s"),
1842
1859
  modelObject=modelXbrl, value=dimValue, path="/".join(pathSegs+(dimName,)))
1843
- elif isinstance(dimValue,str) and dimValue.startswith("$") and not dimValue.startswith("$$"):
1860
+ elif _isParamRef(dimValue):
1844
1861
  paramName, _sep, periodSpecifier = dimValue[1:].partition("@")
1845
1862
  if _sep and periodSpecifier not in ("start", "end"):
1846
1863
  error("xbrlce:invalidPeriodSpecifier",
@@ -2800,6 +2817,18 @@ def _loadFromOIM(cntlr, error, warning, modelXbrl, oimFile, mappedUri):
2800
2817
 
2801
2818
  return _return
2802
2819
 
2820
+ def _isParamRef(value):
2821
+ if not isinstance(value, str):
2822
+ return False
2823
+ if not value.startswith("$"):
2824
+ return False
2825
+ return not value.startswith("$$")
2826
+
2827
+ def _getParamRefName(paramRef):
2828
+ prefixStripped = paramRef.removeprefix("$")
2829
+ periodSpecifierRemoved = prefixStripped.partition("@")[0]
2830
+ return periodSpecifierRemoved
2831
+
2803
2832
  def isOimLoadable(normalizedUri, filepath):
2804
2833
  _ext = os.path.splitext(filepath)[1]
2805
2834
  if _ext in (".csv", ".json", ".xlsx", ".xls"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arelle-release
3
- Version: 2.36.32
3
+ Version: 2.36.34
4
4
  Summary: An open source XBRL platform.
5
5
  Author-email: "arelle.org" <support@arelle.org>
6
6
  License: Apache-2.0
@@ -123,7 +123,7 @@ arelle/XmlValidateConst.py,sha256=U_wN0Q-nWKwf6dKJtcu_83FXPn9c6P8JjzGA5b0w7P0,33
123
123
  arelle/XmlValidateParticles.py,sha256=Mn6vhFl0ZKC_vag1mBwn1rH_x2jmlusJYqOOuxFPO2k,9231
124
124
  arelle/XmlValidateSchema.py,sha256=6frtZOc1Yrx_5yYF6V6oHbScnglWrVbWr6xW4EHtLQI,7428
125
125
  arelle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
- arelle/_version.py,sha256=iwoXreKktlkWUpfNhCPwNKEJNDoBIKVqadGZyyWfqy4,515
126
+ arelle/_version.py,sha256=_NQ8HtGEDBuX4im1vWe-8yde6sdcL-ZsYvgarLirhvU,515
127
127
  arelle/typing.py,sha256=Ct5lrNKRow_o9CraMEXNza8nFsJ_iGIKoUeGfPs2dxI,1084
128
128
  arelle/api/Session.py,sha256=Vd09RAutWX7mxHSsrW7Bl8CsE1UzXpQpAJsZb55mqng,6188
129
129
  arelle/archive/CustomLogger.py,sha256=v_JXOCQLDZcfaFWzxC9FRcEf9tQi4rCI4Sx7jCuAVQI,1231
@@ -285,7 +285,7 @@ arelle/locale/fr/LC_MESSAGES/fr.po,sha256=D2WHLI9NktcxgmGx91fRLNLoVjvO3Z0jjS9AJl
285
285
  arelle/locale/ru/LC_MESSAGES/arelle.mo,sha256=i004xdiJMpXus5DnSz2y708H5vPt78Pu5ApkrdC9Fqw,375378
286
286
  arelle/locale/ru/LC_MESSAGES/ru.po,sha256=pPACN6dXlimkr2KJ5l-B0fv4PhlijWAz3fVYJ5h3SaM,449579
287
287
  arelle/logging/formatters/LogFormatter.py,sha256=bKZjW-HGhN6vaNvqyEHFaLIQjlnDgo1cBSZgl13H2c0,1876
288
- arelle/logging/handlers/LogHandlerWithXml.py,sha256=megpUxKqlIRxhUoCyVnZJeL_3RJ8lQJaubk0oiAt794,4112
288
+ arelle/logging/handlers/LogHandlerWithXml.py,sha256=xj-m6aNh4gksxP9AjN0xkECxVdx9m7ElCC0lXkhFcUQ,4318
289
289
  arelle/logging/handlers/LogToBufferHandler.py,sha256=tTzHRw9tn1Osrpc5rcKxk2iTEE3uIq5wb792z5RVYAs,612
290
290
  arelle/logging/handlers/LogToPrintHandler.py,sha256=iT5eTZx5MXJRhI-vZjlenNOSDRgiNXSQhh398Njbje0,1299
291
291
  arelle/logging/handlers/LogToXmlHandler.py,sha256=eQGI_AQ6XrfIN_wl4TKnbLw_5D1bZz1UaWvegV2qpQA,10489
@@ -294,7 +294,7 @@ arelle/model/CommentBase.py,sha256=NtC2lFd9Mt1y7kzWwrpvexwqBdfSe1nvGFiIJeio3rU,1
294
294
  arelle/model/ElementBase.py,sha256=pZX836d4-s-OvzPMUusvEDezI9D_6YKO7_j6iDcUXm4,404
295
295
  arelle/model/PIBase.py,sha256=easZ3pKXJ5wq3NFB2pDtBeXNDcjwMAXylpXz6mnumOg,257
296
296
  arelle/model/__init__.py,sha256=RLmC1rTus3T_2Vvnu3yHtdw1r0wrZCHZoqxe8BLg_wE,595
297
- arelle/oim/Load.py,sha256=3oQj7t9qkIqPkufN-M6Vri0tr_sVERGJl14OT6PQzww,180214
297
+ arelle/oim/Load.py,sha256=rrNaf38d5aRbd-Pm5xNf3uqBtI5cOxjCIKSwn0-kH6E,181837
298
298
  arelle/oim/Validate.py,sha256=IaBClr2KYMiVC_GKYy4_A9gF7hcnm-lxXpQrDCqIWGs,9012
299
299
  arelle/oim/xml/Save.py,sha256=MdaJiGcEo4nbQCX9sRgWfVIoxp6fd2N-wuLiDAS9D-I,607
300
300
  arelle/packages/PackageConst.py,sha256=iIIF-Ic8zlMPiiCq3PcV57aWci6ispBtilSG4W7ZW4U,121
@@ -706,7 +706,7 @@ arelle/utils/validate/ValidationPlugin.py,sha256=_WeRPXZUTCcSN3FLbFwiAe_2pAUTxZZ
706
706
  arelle/utils/validate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
707
707
  arelle/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
708
708
  arelle/webserver/bottle.py,sha256=676nP8SOB42QscV0WIbXoSV9MwdgvbrzeIApxr6mlUI,171255
709
- arelle_release-2.36.32.dist-info/licenses/LICENSE.md,sha256=rMbWwFLGzPgLoEjEu8LCmkpWDTqsvfOI-wzLSfeJsis,4107
709
+ arelle_release-2.36.34.dist-info/licenses/LICENSE.md,sha256=rMbWwFLGzPgLoEjEu8LCmkpWDTqsvfOI-wzLSfeJsis,4107
710
710
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
711
711
  tests/integration_tests/download_cache.py,sha256=jVMIVICsZjcVc9DCPPu3fCjF9_cWSS3tqSynhFs3oAM,4097
712
712
  tests/integration_tests/integration_test_util.py,sha256=H7mncbv0T9ZeVyrtk9Hohe3k6jgcYykHkt-LGE-Q9aQ,10270
@@ -1554,8 +1554,8 @@ tests/unit_tests/arelle/oim/test_load.py,sha256=NxiUauQwJVfWAHbbpsMHGSU2d3Br8Pki
1554
1554
  tests/unit_tests/arelle/plugin/test_plugin_imports.py,sha256=bdhIs9frAnFsdGU113yBk09_jis-z43dwUItMFYuSYM,1064
1555
1555
  tests/unit_tests/arelle/plugin/validate/ESEF/ESEF_Current/test_validate_css_url.py,sha256=XHABmejQt7RlZ0udh7v42f2Xb2STGk_fSaIaJ9i2xo0,878
1556
1556
  tests/unit_tests/arelle/utils/validate/test_decorator.py,sha256=ZS8FqIY1g-2FCbjF4UYm609dwViax6qBMRJSi0vfuhY,2482
1557
- arelle_release-2.36.32.dist-info/METADATA,sha256=0CF-CdsIfl1M_wkQNqIbOoEw7r3hEeCEqWh8rctCqW0,9032
1558
- arelle_release-2.36.32.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
1559
- arelle_release-2.36.32.dist-info/entry_points.txt,sha256=Uj5niwfwVsx3vaQ3fYj8hrZ1xpfCJyTUA09tYKWbzpo,111
1560
- arelle_release-2.36.32.dist-info/top_level.txt,sha256=ZYmYGmhW5Jvo3vJ4iXBZPUI29LvYhntom04w90esJvU,13
1561
- arelle_release-2.36.32.dist-info/RECORD,,
1557
+ arelle_release-2.36.34.dist-info/METADATA,sha256=PH1cAzolvFB5aC7NdFvqe4x9sQSd1wGLIo0d8cBX_44,9032
1558
+ arelle_release-2.36.34.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
1559
+ arelle_release-2.36.34.dist-info/entry_points.txt,sha256=Uj5niwfwVsx3vaQ3fYj8hrZ1xpfCJyTUA09tYKWbzpo,111
1560
+ arelle_release-2.36.34.dist-info/top_level.txt,sha256=ZYmYGmhW5Jvo3vJ4iXBZPUI29LvYhntom04w90esJvU,13
1561
+ arelle_release-2.36.34.dist-info/RECORD,,