arelle-release 2.37.47__py3-none-any.whl → 2.37.48__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/CntlrCmdLine.py +5 -1
- arelle/ModelObjectFactory.py +18 -2
- arelle/_version.py +2 -2
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/METADATA +1 -1
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/RECORD +9 -94
- arelle/archive/CustomLogger.py +0 -43
- arelle/archive/LoadEFMvalidate.py +0 -32
- arelle/archive/LoadSavePreLbCsv.py +0 -26
- arelle/archive/LoadValidate.cs +0 -31
- arelle/archive/LoadValidate.py +0 -36
- arelle/archive/LoadValidateCmdLine.java +0 -69
- arelle/archive/LoadValidatePostedZip.java +0 -57
- arelle/archive/LoadValidateWebService.java +0 -34
- arelle/archive/SaveTableToExelle.py +0 -140
- arelle/archive/TR3toTR4.py +0 -88
- arelle/archive/plugin/ESEF_2022/__init__.py +0 -47
- arelle/archive/plugin/bigInstance.py +0 -394
- arelle/archive/plugin/cmdWebServerExtension.py +0 -43
- arelle/archive/plugin/crashTest.py +0 -38
- arelle/archive/plugin/functionsXmlCreation.py +0 -106
- arelle/archive/plugin/hello_i18n.pot +0 -26
- arelle/archive/plugin/hello_i18n.py +0 -32
- arelle/archive/plugin/importTestChild1.py +0 -21
- arelle/archive/plugin/importTestChild2.py +0 -22
- arelle/archive/plugin/importTestGrandchild1.py +0 -21
- arelle/archive/plugin/importTestGrandchild2.py +0 -21
- arelle/archive/plugin/importTestImported1.py +0 -23
- arelle/archive/plugin/importTestImported11.py +0 -22
- arelle/archive/plugin/importTestParent.py +0 -48
- arelle/archive/plugin/instanceInfo.py +0 -306
- arelle/archive/plugin/loadFromOIM-2018.py +0 -1282
- arelle/archive/plugin/locale/fr/LC_MESSAGES/hello_i18n.po +0 -25
- arelle/archive/plugin/objectmaker.py +0 -285
- arelle/archive/plugin/packagedImportTest/__init__.py +0 -47
- arelle/archive/plugin/packagedImportTest/importTestChild1.py +0 -21
- arelle/archive/plugin/packagedImportTest/importTestChild2.py +0 -22
- arelle/archive/plugin/packagedImportTest/importTestGrandchild1.py +0 -21
- arelle/archive/plugin/packagedImportTest/importTestGrandchild2.py +0 -21
- arelle/archive/plugin/packagedImportTest/importTestImported1.py +0 -24
- arelle/archive/plugin/packagedImportTest/importTestImported11.py +0 -21
- arelle/archive/plugin/packagedImportTest/subdir/importTestImported111.py +0 -21
- arelle/archive/plugin/packagedImportTest/subdir/subsubdir/importTestImported1111.py +0 -21
- arelle/archive/plugin/sakaCalendar.py +0 -215
- arelle/archive/plugin/saveInstanceInfoset.py +0 -121
- arelle/archive/plugin/sphinx/FormulaGenerator.py +0 -823
- arelle/archive/plugin/sphinx/SphinxContext.py +0 -404
- arelle/archive/plugin/sphinx/SphinxEvaluator.py +0 -783
- arelle/archive/plugin/sphinx/SphinxMethods.py +0 -1287
- arelle/archive/plugin/sphinx/SphinxParser.py +0 -1093
- arelle/archive/plugin/sphinx/SphinxValidator.py +0 -163
- arelle/archive/plugin/sphinx/US-GAAP Ratios Example.xsr +0 -52
- arelle/archive/plugin/sphinx/__init__.py +0 -285
- arelle/archive/plugin/streamingExtensions.py +0 -335
- arelle/archive/plugin/updateTableLB.py +0 -242
- arelle/archive/plugin/validate/SBRnl/CustomLoader.py +0 -19
- arelle/archive/plugin/validate/SBRnl/DTS.py +0 -305
- arelle/archive/plugin/validate/SBRnl/Dimensions.py +0 -357
- arelle/archive/plugin/validate/SBRnl/Document.py +0 -799
- arelle/archive/plugin/validate/SBRnl/Filing.py +0 -467
- arelle/archive/plugin/validate/SBRnl/__init__.py +0 -75
- arelle/archive/plugin/validate/SBRnl/config.xml +0 -26
- arelle/archive/plugin/validate/SBRnl/sbr-nl-taxonomies.xml +0 -754
- arelle/archive/plugin/validate/USBestPractices.py +0 -570
- arelle/archive/plugin/validate/USCorpAction.py +0 -557
- arelle/archive/plugin/validate/USSecTagging.py +0 -337
- arelle/archive/plugin/validate/XDC/__init__.py +0 -77
- arelle/archive/plugin/validate/XDC/config.xml +0 -20
- arelle/archive/plugin/validate/XFsyntax/__init__.py +0 -64
- arelle/archive/plugin/validate/XFsyntax/xf.py +0 -2227
- arelle/archive/plugin/validate/calc2.py +0 -536
- arelle/archive/plugin/validateSchemaLxml.py +0 -156
- arelle/archive/plugin/validateTableInfoset.py +0 -52
- arelle/archive/us-gaap-dei-docType-extraction-frm.xml +0 -90
- arelle/archive/us-gaap-dei-ratio-cash-frm.xml +0 -150
- arelle/examples/plugin/formulaSuiteConverter.py +0 -212
- arelle/examples/plugin/functionsCustom.py +0 -59
- arelle/examples/plugin/hello_dolly.py +0 -64
- arelle/examples/plugin/multi.py +0 -58
- arelle/examples/plugin/rssSaveOim.py +0 -96
- arelle/examples/plugin/validate/XYZ/DisclosureSystems.py +0 -2
- arelle/examples/plugin/validate/XYZ/PluginValidationDataExtension.py +0 -10
- arelle/examples/plugin/validate/XYZ/ValidationPluginExtension.py +0 -50
- arelle/examples/plugin/validate/XYZ/__init__.py +0 -75
- arelle/examples/plugin/validate/XYZ/resources/config.xml +0 -16
- arelle/examples/plugin/validate/XYZ/rules/__init__.py +0 -0
- arelle/examples/plugin/validate/XYZ/rules/rules01.py +0 -110
- arelle/examples/plugin/validate/XYZ/rules/rules02.py +0 -59
- arelle/scripts-macOS/startWebServer.command +0 -3
- arelle/scripts-unix/startWebServer.sh +0 -1
- arelle/scripts-windows/startWebServer.bat +0 -5
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/WHEEL +0 -0
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/entry_points.txt +0 -0
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/licenses/LICENSE.md +0 -0
- {arelle_release-2.37.47.dist-info → arelle_release-2.37.48.dist-info}/top_level.txt +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Arelle
|
|
2
|
-
# Copyright (C) 2011 MarkV System
|
|
3
|
-
# This file is distributed under the same license as the Arelle package.
|
|
4
|
-
# R�gis D�camps <regis.decamps@acp.banque-france.fr>, 2012.
|
|
5
|
-
#
|
|
6
|
-
#, fuzzy
|
|
7
|
-
msgid ""
|
|
8
|
-
msgstr ""
|
|
9
|
-
"Project-Id-Version: 0.1\n"
|
|
10
|
-
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2012-01-04 18:04+0100\n"
|
|
12
|
-
"PO-Revision-Date: 2012-01-04 18:04+0100\n"
|
|
13
|
-
"Last-Translator: Regis Decamps <regis.decamps@acp.banque-france.fr>\n"
|
|
14
|
-
"MIME-Version: 1.0\n"
|
|
15
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
16
|
-
"Content-Transfer-Encoding: 8bit\n"
|
|
17
|
-
|
|
18
|
-
#: hello.py:11 hello.py:16
|
|
19
|
-
msgid "Hello World"
|
|
20
|
-
msgstr "Bonjour tout le monde"
|
|
21
|
-
|
|
22
|
-
#: hello.py:28
|
|
23
|
-
msgid "Prints 'Hello world'"
|
|
24
|
-
msgstr "Affiche 'Bonjour tout le monde'"
|
|
25
|
-
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
'''
|
|
3
|
-
objectmaker.py is a plug-in that will draw diagrams from linkbases
|
|
4
|
-
|
|
5
|
-
ObjectMaker(r) is a registered trademark of Workiva, Inc.
|
|
6
|
-
|
|
7
|
-
This product uses graphviz, which must be installed separately on the platform.
|
|
8
|
-
|
|
9
|
-
See COPYRIGHT.md for copyright information.
|
|
10
|
-
'''
|
|
11
|
-
import os, io, time
|
|
12
|
-
from tkinter import Menu
|
|
13
|
-
from arelle import ModelDocument, XmlUtil, XbrlConst
|
|
14
|
-
from arelle.ModelDtsObject import ModelConcept
|
|
15
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
16
|
-
|
|
17
|
-
diagramNetworks = {
|
|
18
|
-
"uml": ("http://xbrl.us/arcrole/Aggregation", "http://xbrl.us/arcrole/Composition", "http://xbrl.us/arcrole/Inheritance"),
|
|
19
|
-
"dts": (),
|
|
20
|
-
"pre": (XbrlConst.parentChild,),
|
|
21
|
-
"cal": (XbrlConst.summationItem,),
|
|
22
|
-
"def": (XbrlConst.essenceAlias, XbrlConst.similarTuples, XbrlConst.requiresElement, XbrlConst.generalSpecial,
|
|
23
|
-
XbrlConst.all, XbrlConst.notAll, XbrlConst.hypercubeDimension, XbrlConst.dimensionDomain,
|
|
24
|
-
XbrlConst.domainMember, XbrlConst.dimensionDefault),
|
|
25
|
-
"anc": (XbrlConst.widerNarrower,)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
# graphviz attributes: http://www.graphviz.org/doc/info/attrs.html
|
|
29
|
-
|
|
30
|
-
networkEdgeTypes = {
|
|
31
|
-
"uml": {
|
|
32
|
-
"inheritance": {"dir": "back", "arrowtail": "empty"},
|
|
33
|
-
"aggregation": {"dir": "back", "arrowtail": "odiamond"},
|
|
34
|
-
"composition": {"dir": "back", "arrowtail": "diamond"}
|
|
35
|
-
},
|
|
36
|
-
"dts": {
|
|
37
|
-
"all-types": {"dir": "forward", "arrowhead": "normal"}
|
|
38
|
-
},
|
|
39
|
-
"pre": {
|
|
40
|
-
"parent-child": {"dir": "forward", "arrowhead": "normal"}
|
|
41
|
-
},
|
|
42
|
-
"cal": {
|
|
43
|
-
"summation-item": {"dir": "forward", "arrowhead": "normal"}
|
|
44
|
-
},
|
|
45
|
-
"def": {
|
|
46
|
-
"essence-alias": {"dir": "forward", "arrowhead": "normal"},
|
|
47
|
-
"similar-tuples": {"dir": "forward", "arrowhead": "normal"},
|
|
48
|
-
"requires-element": {"dir": "forward", "arrowhead": "normal"},
|
|
49
|
-
"general-special": {"dir": "forward", "arrowhead": "normal"},
|
|
50
|
-
"all": {"dir": "forward", "arrowhead": "normal"},
|
|
51
|
-
"notall": {"dir": "forward", "arrowhead": "normal"}, # arc roles are lower-cased here
|
|
52
|
-
"hypercube-dimension": {"dir": "forward", "arrowhead": "normal"},
|
|
53
|
-
"dimension-domain": {"dir": "forward", "arrowhead": "normal"},
|
|
54
|
-
"domain-member": {"dir": "forward", "arrowhead": "normal"},
|
|
55
|
-
"dimension-default": {"dir": "forward", "arrowhead": "normal"}
|
|
56
|
-
},
|
|
57
|
-
"anc": {
|
|
58
|
-
"wider-narrower": {"dir": "forward", "arrowhead": "normal"}
|
|
59
|
-
},
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
def drawDiagram(modelXbrl, diagramFile, diagramNetwork=None, viewDiagram=False):
|
|
63
|
-
if diagramNetwork not in diagramNetworks:
|
|
64
|
-
modelXbrl.error("objectmaker:diagramNetwork",
|
|
65
|
-
"Diagram network %(diagramNetwork)s not recognized, please specify one of %(recognizedDiagramNetworks)s",
|
|
66
|
-
modelXbrl=modelXbrl, diagramNetwork=diagramNetwork, recognizedDiagramNetworks=", ".join(diagramNetworks))
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
try:
|
|
70
|
-
from graphviz import Digraph, backend
|
|
71
|
-
except ImportError:
|
|
72
|
-
modelXbrl.error("objectmaker:missingLibrary",
|
|
73
|
-
"Missing library, please install graphviz for python importing",
|
|
74
|
-
modelXbrl=modelXbrl)
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
isUML = diagramNetwork == "uml"
|
|
78
|
-
isBaseSpec = diagramNetwork in ("pre", "cal", "def", "anch")
|
|
79
|
-
graphName = os.path.splitext(modelXbrl.modelDocument.basename)[0]
|
|
80
|
-
mdl = Digraph(comment=graphName)
|
|
81
|
-
mdl.attr("graph")
|
|
82
|
-
mdl.node('node_title', graphName, shape="none", fontname="Bitstream Vera Sans")
|
|
83
|
-
mdl.attr('node', shape="record")
|
|
84
|
-
mdl.attr('node', fontname="Bitstream Vera Sans")
|
|
85
|
-
mdl.attr('node', fontsize="8")
|
|
86
|
-
|
|
87
|
-
if isUML:
|
|
88
|
-
arcroleName = "http://xbrl.us/arcrole/Property"
|
|
89
|
-
propertiesRelationshipSet = modelXbrl.relationshipSet(arcroleName)
|
|
90
|
-
if not propertiesRelationshipSet:
|
|
91
|
-
modelXbrl.modelManager.addToLog(_("no relationships for {0}").format(arcroleName))
|
|
92
|
-
return False
|
|
93
|
-
|
|
94
|
-
def node(mdl, id, modelObject):
|
|
95
|
-
if modelObject is not None:
|
|
96
|
-
mdl.attr("node", style="") # white classes
|
|
97
|
-
if isUML:
|
|
98
|
-
_properties = "".join(r"+{} {}\l".format(rel.toModelObject.qname.localName, rel.toModelObject.niceType)
|
|
99
|
-
for rel in propertiesRelationshipSet.fromModelObject(modelObject)
|
|
100
|
-
if rel.toModelObject is not None)
|
|
101
|
-
mdl.node(id, "{{{}|{}}}".format(modelObject.qname.localName, _properties))
|
|
102
|
-
elif isBaseSpec and isinstance(modelObject, ModelConcept):
|
|
103
|
-
concept = modelObject
|
|
104
|
-
if concept.isHypercubeItem:
|
|
105
|
-
_properties = "Hypercube"
|
|
106
|
-
elif concept.isExplicitDimension:
|
|
107
|
-
_properties = "Dimension, Explicit"
|
|
108
|
-
elif concept.isExplicitDimension:
|
|
109
|
-
_properties = "Dimension, Typed ({} {})".format(typedDomainElement.qname, typedDomainElement.niceType)
|
|
110
|
-
elif concept.isEnumeration:
|
|
111
|
-
_properties = "Enumeration ({})".format(concept.enumDomain.qname)
|
|
112
|
-
else:
|
|
113
|
-
_properties = "{}{}".format("Abstract " if modelObject.isAbstract else "",
|
|
114
|
-
modelObject.niceType)
|
|
115
|
-
mdl.node(id, "{{{}|{}}}".format(modelObject.qname.localName, _properties))
|
|
116
|
-
elif isinstance(modelObject, ModelDocument.ModelDocument):
|
|
117
|
-
mdl.node(id, "{{{}|{}}}".format(modelObject.basename, modelObject.gettype()))
|
|
118
|
-
elif isinstance(modelObject, str): # linkrole definition
|
|
119
|
-
mdl.node(id, "{{{}}}".format(modelObject))
|
|
120
|
-
else:
|
|
121
|
-
mdl.node(id, "{{{}}}".format(modelObject.qname.localName))
|
|
122
|
-
|
|
123
|
-
nodes = set()
|
|
124
|
-
edges = set()
|
|
125
|
-
arcroles = diagramNetworks[diagramNetwork]
|
|
126
|
-
|
|
127
|
-
lang = None # from parameter for override
|
|
128
|
-
|
|
129
|
-
# sort URIs by definition
|
|
130
|
-
linkroleUris = set()
|
|
131
|
-
if isBaseSpec:
|
|
132
|
-
for arcrole in arcroles:
|
|
133
|
-
graphRelationshipSet = modelXbrl.relationshipSet(arcrole)
|
|
134
|
-
for linkroleUri in graphRelationshipSet.linkRoleUris:
|
|
135
|
-
modelRoleTypes = modelXbrl.roleTypes.get(linkroleUri)
|
|
136
|
-
if modelRoleTypes:
|
|
137
|
-
roledefinition = (modelRoleTypes[0].genLabel(lang=lang, strip=True) or modelRoleTypes[0].definition or linkroleUri)
|
|
138
|
-
else:
|
|
139
|
-
roledefinition = linkroleUri
|
|
140
|
-
linkroleUris.add((roledefinition, linkroleUri))
|
|
141
|
-
else:
|
|
142
|
-
linkroleUris.add((None, None))
|
|
143
|
-
|
|
144
|
-
for roledefinition, linkroleUri in sorted(linkroleUris):
|
|
145
|
-
for arcrole in arcroles:
|
|
146
|
-
relationshipType = arcrole.rpartition("/")[2].lower()
|
|
147
|
-
edgeType = networkEdgeTypes[diagramNetwork].get(relationshipType)
|
|
148
|
-
if edgeType is None:
|
|
149
|
-
modelXbrl.warning("objectmaker:unrecognizedArcrole",
|
|
150
|
-
"Arcrole missing from networkEdgeTypes: %(arcrole)s:",
|
|
151
|
-
modelXbrl=modelXbrl, arcrole=arcrole)
|
|
152
|
-
continue
|
|
153
|
-
graphRelationshipSet = modelXbrl.relationshipSet(arcrole, linkroleUri)
|
|
154
|
-
roleprefix = (linkroleUri.replace("/","_").replace(":","_") + "_") if linkroleUri else ""
|
|
155
|
-
if not graphRelationshipSet:
|
|
156
|
-
continue
|
|
157
|
-
if linkroleUri is not None:
|
|
158
|
-
node(mdl, roleprefix, roledefinition or roleUri)
|
|
159
|
-
for rootConcept in graphRelationshipSet.rootConcepts:
|
|
160
|
-
childName = roleprefix + rootConcept.qname.localName
|
|
161
|
-
node(mdl, childName, rootConcept)
|
|
162
|
-
nodes.add(childName)
|
|
163
|
-
mdl.edge(roleprefix, childName,
|
|
164
|
-
dir=edgeType.get("dir"), arrowhead=edgeType.get("arrowhead"), arrowtail=edgeType.get("arrowtail"))
|
|
165
|
-
for rel in graphRelationshipSet.modelRelationships:
|
|
166
|
-
parent = rel.fromModelObject
|
|
167
|
-
child = rel.toModelObject
|
|
168
|
-
if parent is None or child is None:
|
|
169
|
-
continue
|
|
170
|
-
parentName = roleprefix + parent.qname.localName
|
|
171
|
-
childName = roleprefix + child.qname.localName
|
|
172
|
-
if parentName not in nodes:
|
|
173
|
-
node(mdl, parentName, parent)
|
|
174
|
-
nodes.add(parentName)
|
|
175
|
-
if childName not in nodes:
|
|
176
|
-
node(mdl, childName, child)
|
|
177
|
-
nodes.add(childName)
|
|
178
|
-
edgeKey = (relationshipType, parentName, childName)
|
|
179
|
-
if edgeKey not in edges:
|
|
180
|
-
edges.add(edgeKey)
|
|
181
|
-
mdl.edge(parentName, childName,
|
|
182
|
-
dir=edgeType.get("dir"), arrowhead=edgeType.get("arrowhead"), arrowtail=edgeType.get("arrowtail"))
|
|
183
|
-
|
|
184
|
-
if diagramNetwork == "dts":
|
|
185
|
-
def viewDtsDoc(modelDoc, parentDocName, grandparentDocName):
|
|
186
|
-
docName = modelDoc.basename
|
|
187
|
-
docType = modelDoc.gettype()
|
|
188
|
-
if docName not in nodes:
|
|
189
|
-
node(mdl, docName, modelDoc)
|
|
190
|
-
if parentDocName:
|
|
191
|
-
edgeKey = (parentDocName, docType, docName)
|
|
192
|
-
if edgeKey in edges:
|
|
193
|
-
return
|
|
194
|
-
edges.add(edgeKey)
|
|
195
|
-
edgeType = networkEdgeTypes[diagramNetwork]["all-types"]
|
|
196
|
-
mdl.edge(parentDocName, docName,
|
|
197
|
-
dir=edgeType.get("dir"), arrowhead=edgeType.get("arrowhead"), arrowtail=edgeType.get("arrowtail"))
|
|
198
|
-
for referencedDoc in modelDoc.referencesDocument.keys():
|
|
199
|
-
if referencedDoc.basename != parentDocName: # skip reverse linkbase ref
|
|
200
|
-
viewDtsDoc(referencedDoc, docName, parentDocName)
|
|
201
|
-
|
|
202
|
-
viewDtsDoc(modelXbrl.modelDocument, None, None)
|
|
203
|
-
|
|
204
|
-
mdl.format = "pdf"
|
|
205
|
-
try:
|
|
206
|
-
mdl.render(diagramFile.replace(".pdf", ".gv"), view=viewDiagram)
|
|
207
|
-
except backend.ExecutableNotFound as ex:
|
|
208
|
-
modelXbrl.warning("objectmaker:graphvizExecutable",
|
|
209
|
-
"Diagram saving requires installation of graphviz, error: %(error)s:",
|
|
210
|
-
modelXbrl=modelXbrl, error=ex)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
def objectmakerMenuEntender(cntlr, menu, *args, **kwargs):
|
|
214
|
-
# Extend menu with an item for the savedts plugin
|
|
215
|
-
drawDiagMenu = Menu(cntlr.menubar, tearoff=0)
|
|
216
|
-
menu.add_cascade(label="Draw Diagram", underline=0, menu=drawDiagMenu)
|
|
217
|
-
drawDiagMenu.add_command(label=_("DTS"), underline=0, command=lambda: objectmakerMenuCommand(cntlr, "dts") )
|
|
218
|
-
drawDiagMenu.add_command(label=_("Presentation"), underline=0, command=lambda: objectmakerMenuCommand(cntlr, "pre") )
|
|
219
|
-
drawDiagMenu.add_command(label=_("Calculation"), underline=0, command=lambda: objectmakerMenuCommand(cntlr, "cal") )
|
|
220
|
-
drawDiagMenu.add_command(label=_("Definition"), underline=0, command=lambda: objectmakerMenuCommand(cntlr, "def") )
|
|
221
|
-
drawDiagMenu.add_command(label=_("UML"), underline=0, command=lambda: objectmakerMenuCommand(cntlr, "uml") )
|
|
222
|
-
|
|
223
|
-
def objectmakerMenuCommand(cntlr, diagramNetwork):
|
|
224
|
-
# save DTS menu item has been invoked
|
|
225
|
-
if cntlr.modelManager is None or cntlr.modelManager.modelXbrl is None:
|
|
226
|
-
cntlr.addToLog("No taxonomy loaded.")
|
|
227
|
-
return
|
|
228
|
-
# get file name into which to save log file while in foreground thread
|
|
229
|
-
diagramFile = cntlr.uiFileDialog("save",
|
|
230
|
-
title=_("objectmaker - Save {} diagram").format(diagramNetwork),
|
|
231
|
-
initialdir=cntlr.config.setdefault("diagramFileDir","."),
|
|
232
|
-
filetypes=[(_("Diagram file .pdf"), "*.pdf")],
|
|
233
|
-
defaultextension=".pdf")
|
|
234
|
-
if not diagramFile:
|
|
235
|
-
return False
|
|
236
|
-
import os
|
|
237
|
-
cntlr.config["diagramFileDir"] = os.path.dirname(diagramFile)
|
|
238
|
-
cntlr.saveConfig()
|
|
239
|
-
|
|
240
|
-
import threading
|
|
241
|
-
thread = threading.Thread(target=lambda
|
|
242
|
-
_modelXbrl=cntlr.modelManager.modelXbrl,
|
|
243
|
-
_diagramFile=diagramFile:
|
|
244
|
-
drawDiagram(_modelXbrl, _diagramFile, diagramNetwork, True))
|
|
245
|
-
thread.daemon = True
|
|
246
|
-
thread.start()
|
|
247
|
-
|
|
248
|
-
def objectmakerCommandLineOptionExtender(parser, *args, **kwargs):
|
|
249
|
-
# extend command line options with a save DTS option
|
|
250
|
-
parser.add_option("--save-diagram",
|
|
251
|
-
action="store",
|
|
252
|
-
dest="saveDiagram",
|
|
253
|
-
help=_("Save Diagram file"))
|
|
254
|
-
parser.add_option("--diagram-network",
|
|
255
|
-
action="store",
|
|
256
|
-
dest="diagramNetwork",
|
|
257
|
-
help=_("Network to diagram: dts, pre, cal, def, uml"))
|
|
258
|
-
parser.add_option("--view-diagram",
|
|
259
|
-
action="store_true",
|
|
260
|
-
dest="viewDiagram",
|
|
261
|
-
help=_("Show diagram in GUI viewer"))
|
|
262
|
-
|
|
263
|
-
def objectmakerCommandLineXbrlRun(cntlr, options, modelXbrl, *args, **kwargs):
|
|
264
|
-
# extend XBRL-loaded run processing for this option
|
|
265
|
-
diagramFile = getattr(options, "saveDiagram", None)
|
|
266
|
-
if diagramFile:
|
|
267
|
-
if cntlr.modelManager is None or cntlr.modelManager.modelXbrl is None:
|
|
268
|
-
cntlr.addToLog("No taxonomy loaded.")
|
|
269
|
-
return
|
|
270
|
-
diagramNetwork = getattr(options, "diagramNetwork")
|
|
271
|
-
viewDiagram = getattr(options, "viewDiagram", False)
|
|
272
|
-
drawDiagram(cntlr.modelManager.modelXbrl, diagramFile, diagramNetwork, viewDiagram)
|
|
273
|
-
|
|
274
|
-
__pluginInfo__ = {
|
|
275
|
-
'name': 'ObjectMaker',
|
|
276
|
-
'version': '1.0',
|
|
277
|
-
'description': "ObjectMaker(r) diagrams XBRL relationship graphs.",
|
|
278
|
-
'license': 'Apache-2 (ObjectMaker), Eclipse (Graphviz)',
|
|
279
|
-
'author': authorLabel,
|
|
280
|
-
'copyright': copyrightLabel + ' Graphviz (c) 2011 AT&T',
|
|
281
|
-
# classes of mount points (required)
|
|
282
|
-
'CntlrWinMain.Menu.Tools': objectmakerMenuEntender,
|
|
283
|
-
'CntlrCmdLine.Options': objectmakerCommandLineOptionExtender,
|
|
284
|
-
'CntlrCmdLine.Xbrl.Run': objectmakerCommandLineXbrlRun,
|
|
285
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from os import path
|
|
7
|
-
from arelle.PluginManager import pluginClassMethods
|
|
8
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
9
|
-
from . import importTestImported1
|
|
10
|
-
from .importTestImported1 import foo
|
|
11
|
-
|
|
12
|
-
def parentMenuEntender(cntlr, menu):
|
|
13
|
-
menu.add_command(label="Packaged Parent exercise descendants", underline=0, command=lambda: parentMenuCommand(cntlr) )
|
|
14
|
-
|
|
15
|
-
def parentMenuCommand(cntl):
|
|
16
|
-
for i in range(1,100):
|
|
17
|
-
for pluginMethod in pluginClassMethods("Import.Packaged.Entry{}".format(i)):
|
|
18
|
-
pluginMethod()
|
|
19
|
-
|
|
20
|
-
def parentCommandLineOptionExtender(parser):
|
|
21
|
-
parser.add_option("--packagedParentImportExample",
|
|
22
|
-
action="store_true",
|
|
23
|
-
dest="packagedParentImportExample",
|
|
24
|
-
help=_('Test that imported plug-ins were actually loaded and activated"'))
|
|
25
|
-
|
|
26
|
-
def parentCommandLineUtilityRun(cntlr, options, **kwargs):
|
|
27
|
-
if options.packagedParentImportExample:
|
|
28
|
-
parentMenuCommand(cntlr)
|
|
29
|
-
|
|
30
|
-
def foo():
|
|
31
|
-
print ("parent (__init__) of imported packaged plug-ins")
|
|
32
|
-
|
|
33
|
-
__pluginInfo__ = {
|
|
34
|
-
'name': 'Import Test Package Parent',
|
|
35
|
-
'version': '0.9',
|
|
36
|
-
'description': "This is a imports-containing packaged (__init__) plugin.",
|
|
37
|
-
'license': 'Apache-2',
|
|
38
|
-
'author': authorLabel,
|
|
39
|
-
'copyright': copyrightLabel,
|
|
40
|
-
# classes of mount points (required)
|
|
41
|
-
'CntlrWinMain.Menu.Tools': parentMenuEntender,
|
|
42
|
-
'CntlrCmdLine.Options': parentCommandLineOptionExtender,
|
|
43
|
-
'CntlrCmdLine.Utility.Run': parentCommandLineUtilityRun,
|
|
44
|
-
'Import.Packaged.Entry1': foo,
|
|
45
|
-
# imported plugins
|
|
46
|
-
'import': ('importTestChild1.py', 'importTestChild2.py', "module_import_subtree")
|
|
47
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in child 1")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Listed Import Child 1',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged child plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry2': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in child 2")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Listed Import Child 2',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged child plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry3': foo,
|
|
20
|
-
# import plugins
|
|
21
|
-
'import': ('importTestGrandchild1.py', 'importTestGrandchild2.py')
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in grandchild 1")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Listed Import Grandchild 1.1',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged grandchild plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry4': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in grandchild 2")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Listed Import Grandchild 1.2',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged grandchild plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry5': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
from . import importTestImported11
|
|
8
|
-
from .subdir import importTestImported111
|
|
9
|
-
from .subdir.subsubdir import importTestImported1111
|
|
10
|
-
|
|
11
|
-
def foo():
|
|
12
|
-
print ("imported packaged plug-in relative imported 1")
|
|
13
|
-
|
|
14
|
-
__pluginInfo__ = {
|
|
15
|
-
'name': 'Package Relative Import 1',
|
|
16
|
-
'version': '0.9',
|
|
17
|
-
'description': "This is a packaged relative imported plugin.",
|
|
18
|
-
'license': 'Apache-2',
|
|
19
|
-
'author': authorLabel,
|
|
20
|
-
'copyright': copyrightLabel,
|
|
21
|
-
# classes of mount points (required)
|
|
22
|
-
'Import.Packaged.Entry6': foo,
|
|
23
|
-
# imported plugins
|
|
24
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in relative imported 1.1")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Relative Import 1.1',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged relative imported plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry7': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in relative subdir imported 1.1/1")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Relative Import 1.1/1',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged relative subdir imported plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry8': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
pluginPackages test case
|
|
3
|
-
|
|
4
|
-
See COPYRIGHT.md for copyright information.
|
|
5
|
-
'''
|
|
6
|
-
from arelle.Version import authorLabel, copyrightLabel
|
|
7
|
-
|
|
8
|
-
def foo():
|
|
9
|
-
print ("imported packaged plug-in relative subdir imported 1.1/1/1")
|
|
10
|
-
|
|
11
|
-
__pluginInfo__ = {
|
|
12
|
-
'name': 'Package Relative Import 1.1/1/1',
|
|
13
|
-
'version': '0.9',
|
|
14
|
-
'description': "This is a packaged relative subsubdir imported plugin.",
|
|
15
|
-
'license': 'Apache-2',
|
|
16
|
-
'author': authorLabel,
|
|
17
|
-
'copyright': copyrightLabel,
|
|
18
|
-
# classes of mount points (required)
|
|
19
|
-
'Import.Packaged.Entry8': foo,
|
|
20
|
-
# imported plugins
|
|
21
|
-
}
|