arelle-release 2.37.65__py3-none-any.whl → 2.37.66__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/ViewFile.py CHANGED
@@ -18,6 +18,7 @@ XLSX = 2
18
18
  HTML = 3
19
19
  XML = 4
20
20
  JSON = 5
21
+ TABULAR_VIEW_TYPES = {CSV, XLSX, HTML}
21
22
  TYPENAMES = ["NOOUT", "CSV", "XLSX", "HTML", "XML", "JSON"] # null means no output
22
23
  nonNameCharPattern = re.compile(r"[^\w\-\.:]")
23
24
 
@@ -3,7 +3,7 @@ See COPYRIGHT.md for copyright information.
3
3
  '''
4
4
  from arelle import ViewFile, ModelDtsObject, XbrlConst, XmlUtil
5
5
  from arelle.XbrlConst import conceptNameLabelRole, standardLabel, terseLabel, documentationLabel
6
- from arelle.ViewFile import CSV, XLSX, HTML, XML, JSON
6
+ from arelle.ViewFile import CSV, XLSX, HTML, XML, JSON, TABULAR_VIEW_TYPES
7
7
  import datetime
8
8
  import regex as re
9
9
  from collections import defaultdict
@@ -324,7 +324,7 @@ class ViewFacts(ViewFile.View):
324
324
  try:
325
325
  colId = self.contextColId[fact.context.objectId()]
326
326
  # special case of start date, pick column corresponding
327
- if preferredLabel == XbrlConst.periodStartLabel:
327
+ if self.type in TABULAR_VIEW_TYPES and preferredLabel == XbrlConst.periodStartLabel:
328
328
  date = fact.context.instantDatetime
329
329
  if date:
330
330
  if date in self.startdatetimeColId:
arelle/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '2.37.65'
32
- __version_tuple__ = version_tuple = (2, 37, 65)
31
+ __version__ = version = '2.37.66'
32
+ __version_tuple__ = version_tuple = (2, 37, 66)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -3,14 +3,17 @@ See COPYRIGHT.md for copyright information.
3
3
  """
4
4
  from __future__ import annotations
5
5
 
6
- from pathlib import Path
6
+ from collections import defaultdict
7
7
  from typing import Any, Iterable
8
8
 
9
9
  import regex
10
10
  from jaconv import jaconv
11
11
 
12
12
  from arelle import XbrlConst, ValidateDuplicateFacts
13
+ from arelle.Cntlr import Cntlr
14
+ from arelle.FileSource import FileSource
13
15
  from arelle.LinkbaseType import LinkbaseType
16
+ from arelle.ModelDtsObject import ModelResource, ModelConcept
14
17
  from arelle.ModelValue import QName
15
18
  from arelle.ValidateDuplicateFacts import DuplicateType
16
19
  from arelle.ValidateXbrl import ValidateXbrl
@@ -19,6 +22,7 @@ from arelle.utils.PluginHooks import ValidationHook
19
22
  from arelle.utils.validate.Decorator import validation
20
23
  from arelle.utils.validate.Validation import Validation
21
24
  from ..Constants import AccountingStandard
25
+ from ..ControllerPluginData import ControllerPluginData
22
26
  from ..DeiRequirements import DeiItemStatus
23
27
  from ..DisclosureSystems import (DISCLOSURE_SYSTEM_EDINET)
24
28
  from ..PluginValidationDataExtension import PluginValidationDataExtension
@@ -548,6 +552,103 @@ def rule_EC8027W(
548
552
  )
549
553
 
550
554
 
555
+ @validation(
556
+ hook=ValidationHook.XBRL_FINALLY,
557
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
558
+ )
559
+ def rule_EC8028W(
560
+ pluginData: PluginValidationDataExtension,
561
+ val: ValidateXbrl,
562
+ *args: Any,
563
+ **kwargs: Any,
564
+ ) -> Iterable[Validation]:
565
+ """
566
+ EDINET.EC8028W: The priority attribute must not be duplicated for the same
567
+ element and label role within the submitter's taxonomy.
568
+
569
+ Note: Not mentioned in documentation, but inferring from sample filings that
570
+ label language should also be considered.
571
+ """
572
+ labelsRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
573
+ if labelsRelationshipSet is None:
574
+ return
575
+ for concept, rels in labelsRelationshipSet.fromModelObjects().items():
576
+ groups = defaultdict(list)
577
+ for rel in rels:
578
+ if not isinstance(rel.toModelObject, ModelResource):
579
+ continue
580
+ if not pluginData.isExtensionUri(rel.modelDocument.uri, val.modelXbrl):
581
+ continue
582
+ groups[(rel.toModelObject.xmlLang, rel.toModelObject.role, rel.priority)].append(rel)
583
+ for (lang, role, priority), group in groups.items():
584
+ if len(group) > 1:
585
+ yield Validation.warning(
586
+ codes='EDINET.EC8028W',
587
+ msg=_("The priority attribute must not be duplicated for the same "
588
+ "element and label role in the same submitter taxonomy. "
589
+ "File name: '%(path)s'. Concept: '%(concept)s'. "
590
+ "Role: '%(role)s'. Priority: %(priority)s. "
591
+ "Please check the element and label name of the corresponding "
592
+ "file. Please set the priority attribute so that the same "
593
+ "element and the same label role in the submitter's taxonomy "
594
+ "are not duplicated."),
595
+ path=rels[0].document.basename,
596
+ concept=concept.qname,
597
+ role=role,
598
+ priority=priority,
599
+ modelObject=group,
600
+ )
601
+
602
+
603
+ @validation(
604
+ hook=ValidationHook.COMPLETE,
605
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
606
+ )
607
+ def rule_EC8029W(
608
+ pluginData: ControllerPluginData,
609
+ cntlr: Cntlr,
610
+ fileSource: FileSource,
611
+ *args: Any,
612
+ **kwargs: Any,
613
+ ) -> Iterable[Validation]:
614
+ """
615
+ EDINET.EC8029W: Any non-abstract element referenced in the definition or presentation linkbase must
616
+ be present in an instance.
617
+ """
618
+ linkbaseTypes = (LinkbaseType.DEFINITION, LinkbaseType.PRESENTATION)
619
+ arcroles = tuple(
620
+ arcrole
621
+ for linkbaseType in linkbaseTypes
622
+ for arcrole in linkbaseType.getArcroles()
623
+ )
624
+ referencedConcepts: set[ModelConcept] = set()
625
+ usedConcepts: set[ModelConcept] = set()
626
+ for modelXbrl in pluginData.loadedModelXbrls:
627
+ usedConcepts.update(fact.concept for fact in modelXbrl.facts)
628
+ relSet = modelXbrl.relationshipSet(arcroles)
629
+ if relSet is None:
630
+ continue
631
+ concepts = list(relSet.fromModelObjects().keys()) + list(relSet.toModelObjects().keys())
632
+ for concept in concepts:
633
+ if not isinstance(concept, ModelConcept):
634
+ continue
635
+ if concept.isAbstract:
636
+ continue
637
+ referencedConcepts.add(concept)
638
+ unusedConcepts = referencedConcepts - usedConcepts
639
+ for concept in unusedConcepts:
640
+ yield Validation.warning(
641
+ codes='EDINET.EC8029W',
642
+ msg=_("The non-abstract element present in the presentation link or definition "
643
+ "link is not set in an inline XBRL file. "
644
+ "Element: '%(concept)s'. "
645
+ "Please use the element in the inline XBRL file. If it is an unnecessary "
646
+ "element, please delete it from the presentation link and definition link."),
647
+ concept=concept.qname.localName,
648
+ modelObject=concept,
649
+ )
650
+
651
+
551
652
  @validation(
552
653
  hook=ValidationHook.XBRL_FINALLY,
553
654
  disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
@@ -1117,6 +1117,9 @@ def rule_EC8023W(
1117
1117
  * Tagging using Japanese GAAP notes or IFRS financial statement filer-specific additional elements
1118
1118
  may be identified as an exception and a warning displayed, even if the data content is correct.
1119
1119
  """
1120
+ nsmap = {
1121
+ 'ix': XbrlConst.ixbrl
1122
+ }
1120
1123
  negativeFactXpath = """
1121
1124
  //ix:nonFraction[@sign="-"][
1122
1125
  (preceding-sibling::text()[1] and normalize-space(preceding-sibling::text()[1]) != '△')
@@ -1138,9 +1141,6 @@ def rule_EC8023W(
1138
1141
  continue
1139
1142
  if not pluginData.isExtensionUri(doc.uri, val.modelXbrl):
1140
1143
  continue
1141
- nsmap = {
1142
- 'ix': XbrlConst.ixbrl
1143
- }
1144
1144
  for elt in doc.xmlRootElement.xpath(negativeFactXpath, namespaces=nsmap):
1145
1145
  if elt.qname.namespaceURI == pluginData.jpigpNamespace:
1146
1146
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arelle-release
3
- Version: 2.37.65
3
+ Version: 2.37.66
4
4
  Summary: An open source XBRL platform.
5
5
  Author-email: "arelle.org" <support@arelle.org>
6
6
  License-Expression: Apache-2.0
@@ -78,11 +78,11 @@ arelle/ValidateXbrlCalcs.py,sha256=6OMjIef6ixJGkxH-hgIRbMRJ46e52KEo-8vDyM97krc,4
78
78
  arelle/ValidateXbrlDTS.py,sha256=souKOWM_i52g0mNu9TMhqqdEwXm1tDO7R2n396r_7gs,103992
79
79
  arelle/ValidateXbrlDimensions.py,sha256=Qv7_CI65SiUcpgsnEc86XuMjKz81-170wE5dmZqnvHc,38373
80
80
  arelle/Version.py,sha256=RjbPSSiH57VzZFhhUmEmvLsL8uSb5VwEIj2zq-krhsY,934
81
- arelle/ViewFile.py,sha256=Bvh50RAHDEauAmF0KPHWAZocMyA0UCduJ46e0wbSnPE,19286
81
+ arelle/ViewFile.py,sha256=e68U1PnD10dw0PSKvqZkJ6ueLLZBPPGOa75xMfGifUA,19325
82
82
  arelle/ViewFileConcepts.py,sha256=ecIGNPhFelkpHSPzbV19w7ts8RZZsD657oYLQHtAzhk,4370
83
83
  arelle/ViewFileDTS.py,sha256=IlbBTKFT8grC4N4cWdam8UsUaVFeiy7MfL5PdyEefvA,2029
84
84
  arelle/ViewFileFactList.py,sha256=AVYoDJnhUoIkX7fT2D-bOrKP5g1JAwVnmSr4FYhT4iI,7194
85
- arelle/ViewFileFactTable.py,sha256=I3U6XomCHE5bnbUN_WMq80LyYnPz0GRgYdRDm8Pu3tg,17013
85
+ arelle/ViewFileFactTable.py,sha256=vgUFnImoEQTztO4m6B6mCLN1LWfGct24qSQKl36ZlXM,17069
86
86
  arelle/ViewFileFormulae.py,sha256=753p3pAZsoxx6-3b_xR_CDFReeMBgBZOCV_TIO0FuJE,4740
87
87
  arelle/ViewFileRelationshipSet.py,sha256=beQ6vGHJgpVwB3upofuPG0Rys2yt7GxsO4BcT96_nL8,16814
88
88
  arelle/ViewFileRenderedGrid.py,sha256=I0Q6tyhbu1vcZvWiigAGrPK2bHv_ixsZvLr3merYPJo,14112
@@ -125,7 +125,7 @@ arelle/XmlValidateConst.py,sha256=U_wN0Q-nWKwf6dKJtcu_83FXPn9c6P8JjzGA5b0w7P0,33
125
125
  arelle/XmlValidateParticles.py,sha256=Mn6vhFl0ZKC_vag1mBwn1rH_x2jmlusJYqOOuxFPO2k,9231
126
126
  arelle/XmlValidateSchema.py,sha256=6frtZOc1Yrx_5yYF6V6oHbScnglWrVbWr6xW4EHtLQI,7428
127
127
  arelle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
- arelle/_version.py,sha256=ZuR2k0xha7THQ2bqrzNVBj__6Yw-TJ7U8vP_KjsG1Z4,708
128
+ arelle/_version.py,sha256=7mP6Dryl-C9zKK-ALa3HCZHkwF-7BbhH__zd8ouxGn0,708
129
129
  arelle/typing.py,sha256=PRe-Fxwr2SBqYYUVPCJ3E7ddDX0_oOISNdT5Q97EbRM,1246
130
130
  arelle/api/Session.py,sha256=a71ML4FOkWxeqxQBRu6WUqkUoI4C5R6znzAQcbGR5jg,7902
131
131
  arelle/config/creationSoftwareNames.json,sha256=5MK7XUjfDJ9OpRCCHXeOErJ1SlTBZji4WEcEOdOacx0,3128
@@ -334,11 +334,11 @@ arelle/plugin/validate/EDINET/resources/dei-requirements.csv,sha256=8ILKNn8bXbcg
334
334
  arelle/plugin/validate/EDINET/resources/edinet-taxonomies.xml,sha256=YXaPu-60CI2s0S-vXcLDEXCrrukEAAHyCEk0QRhrYR8,16772
335
335
  arelle/plugin/validate/EDINET/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
336
336
  arelle/plugin/validate/EDINET/rules/contexts.py,sha256=fSYIZOWg3Q3cDos17hNAvw1HUVdcZx7IlUFfBJnwjHo,19604
337
- arelle/plugin/validate/EDINET/rules/edinet.py,sha256=UhvTPfHxDuUitIAPY_4fgirAsjJG5Xfd-gH_4pMd3qI,25449
337
+ arelle/plugin/validate/EDINET/rules/edinet.py,sha256=mGqPXCJgy1SXb5Qhn3OpZZKbU7Rq3OeW-pDODFPvR4s,29714
338
338
  arelle/plugin/validate/EDINET/rules/frta.py,sha256=wpX5zK0IfVVYZR9ELy2g_Z_F1Jzhwd9gh_KZC5ALkLg,12756
339
339
  arelle/plugin/validate/EDINET/rules/gfm.py,sha256=l5XHOBqyorub0LaQ7lA6oISy4oSynNFz4ilW9-Br89A,92060
340
340
  arelle/plugin/validate/EDINET/rules/manifests.py,sha256=MoT9R_a4BzuYdQVbF7RC5wz134Ve68svSdJ3NlpO_AU,4026
341
- arelle/plugin/validate/EDINET/rules/upload.py,sha256=_MskyvWNvVYia_-KJMZQn-PPI9yN8IMhqpRzqiyzlt4,52887
341
+ arelle/plugin/validate/EDINET/rules/upload.py,sha256=kG-zihz16ow_B6lGOYEqyH84Mx9sIqSX1_m0sSQfV3Q,52875
342
342
  arelle/plugin/validate/ESEF/Const.py,sha256=JujF_XV-_TNsxjGbF-8SQS4OOZIcJ8zhCMnr-C1O5Ho,22660
343
343
  arelle/plugin/validate/ESEF/Dimensions.py,sha256=MOJM7vwNPEmV5cu-ZzPrhx3347ZvxgD6643OB2HRnIk,10597
344
344
  arelle/plugin/validate/ESEF/Util.py,sha256=QH3btcGqBpr42M7WSKZLSdNXygZaZLfEiEjlxoG21jE,7950
@@ -688,9 +688,9 @@ arelle/utils/validate/ValidationUtil.py,sha256=hghMQoNuC3ocs6kkNtIQPhh8QwzubwHGt
688
688
  arelle/utils/validate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
689
689
  arelle/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
690
690
  arelle/webserver/bottle.py,sha256=P-JECd9MCTNcxCnKoDUvGcoi03ezYVOgoWgv2_uH-6M,362
691
- arelle_release-2.37.65.dist-info/licenses/LICENSE.md,sha256=Q0tn6q0VUbr-NM8916513NCIG8MNzo24Ev-sxMUBRZc,3959
692
- arelle_release-2.37.65.dist-info/METADATA,sha256=mzOF2EBs8Qc8HWaljQqI650UvHDftMw3JUL83k7QwCs,9355
693
- arelle_release-2.37.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
694
- arelle_release-2.37.65.dist-info/entry_points.txt,sha256=Uj5niwfwVsx3vaQ3fYj8hrZ1xpfCJyTUA09tYKWbzpo,111
695
- arelle_release-2.37.65.dist-info/top_level.txt,sha256=fwU7SYawL4_r-sUMRg7r1nYVGjFMSDvRWx8VGAXEw7w,7
696
- arelle_release-2.37.65.dist-info/RECORD,,
691
+ arelle_release-2.37.66.dist-info/licenses/LICENSE.md,sha256=Q0tn6q0VUbr-NM8916513NCIG8MNzo24Ev-sxMUBRZc,3959
692
+ arelle_release-2.37.66.dist-info/METADATA,sha256=_ztovOi_5js6O0w_nldk5c99k8B_ZpFp2TDTj4jKits,9355
693
+ arelle_release-2.37.66.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
694
+ arelle_release-2.37.66.dist-info/entry_points.txt,sha256=Uj5niwfwVsx3vaQ3fYj8hrZ1xpfCJyTUA09tYKWbzpo,111
695
+ arelle_release-2.37.66.dist-info/top_level.txt,sha256=fwU7SYawL4_r-sUMRg7r1nYVGjFMSDvRWx8VGAXEw7w,7
696
+ arelle_release-2.37.66.dist-info/RECORD,,