Skip to content

Commit bbf9608

Browse files
authored
Merge pull request Arelle#172 from Arelle/edgr22.1.h2
EDGAR release 22.1.h2
2 parents 0e6c295 + f17f222 commit bbf9608

8 files changed

Lines changed: 3260 additions & 3218 deletions

File tree

arelle/plugin/validate/EFM/Filing.py

Lines changed: 3212 additions & 3208 deletions
Large diffs are not rendered by default.

arelle/plugin/validate/EFM/Util.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def compileSubTypeSet(forms, formSet=None, visitedClasses=None):
186186
if "*" in subTypeSet:
187187
subTypeSet = "all" # change to string for faster testing in Filing.py
188188
sev["subTypeSet"] = subTypeSet
189+
if "sub-types-pattern" in sev:
190+
sev["subTypesPattern"] = re.compile(sev["sub-types-pattern"])
189191
sev["formTypeSet"] = compileSubTypeSet(sev.get("form-types", (sev.get("form-type",()),)))
190192

191193
for axisKey, axisValidation in validations["axis-validations"].items():
@@ -590,10 +592,13 @@ def loadDqcRules(modelXbrl): # returns match expression, standard patterns
590592
return dqcRules
591593
return {}
592594

593-
def factBindings(modelXbrl, localNames, nils=False):
595+
def factBindings(modelXbrl, localNames, nils=False, noAdditionalDims=False):
594596
bindings = defaultdict(dict)
595597
def addMostAccurateFactToBinding(f):
596-
if f.xValid >= VALID and (nils or not f.isNil) and f.context is not None:
598+
if (f.xValid >= VALID
599+
and (nils or not f.isNil)
600+
and f.context is not None
601+
and (not noAdditionalDims or not f.context.qnameDims)):
597602
binding = bindings[f.context.contextDimAwareHash, f.unit.hash if f.unit is not None else None]
598603
ln = f.qname.localName
599604
if ln not in binding or inferredDecimals(f) > inferredDecimals(binding[ln]):

arelle/plugin/validate/EFM/resources/dei-validations.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"Each validation object contains the following entries:",
2424
" sub-types: arrayed submissionType or submissionType references or single submissionType or submissionType reference,",
2525
" where specific to a form type, section-sign § separates sub and form types, e.g. 'POS EX§N-2' ",
26+
" sub-types-pattern: a regex to match submissionTypes instead of the sub-types array of submissionType values",
2627
" xbrl-names, elo-names, and severities may be array (plural) or individual",
2728
" xbrl-names: arrayed dei local names or prefixed non-dei nmes of XBRL elements,",
2829
" elo-names: optional corresponding arrayed ELO schema names of XML elements,",
@@ -86,7 +87,7 @@
8687
"N-6": ["N-6", "N-6/A", "485POS§N-6", "485APOS§N-6", "485BPOS§N-6", "485BXT§N-6", "497§N-6"],
8788
"N-346": ["@N-3", "@N-4", "@N-6"],
8889
"POS": ["POS AM", "POS EX"],
89-
"RR": ["485APOS", "485BPOS", "485BXT", "497", "N-1A"],
90+
"RR": ["485APOS", "485BPOS", "485BXT", "497", "N-1A", "N-1A/A"],
9091
"SP 15D2": ["SP 15D2", "SP 15D2/A"],
9192
"S-n": ["S-1", "S-1/A", "S-3", "S-3/A", "S-4", "S-4/A", "S-11", "S-11/A"],
9293
"S-nX": ["S-1MEF", "S-3D", "S-3DPOS", "S-3MEF", "S-4EF", "S-4MEF", "S-4 POS", "S-11MEF"],
@@ -338,7 +339,12 @@
338339
"dei/cover": "dei"
339340
},
340341
{
341-
"sub-types": ["@all"],
342+
"sub-types": [
343+
"@all-FAST",
344+
"@POS", "N-CSR", "N-CSR/A", "N-CSRS", "N-CSRS/A",
345+
"@6-K", "@SP 15D2", "@RR", "@N-346", "@SDR",
346+
"@N", "N-3", "N-4", "N-6"
347+
],
342348
"xbrl-names": "DocumentPeriodEndDate",
343349
"store-db-name": "periodOfReport",
344350
"store-db-object": "eloValuesFromFacts",
@@ -805,6 +811,15 @@
805811
"source": "both",
806812
"dei/cover": "dei"
807813
},
814+
{
815+
"sub-types-pattern": "^(N-.*|(485(A|B)(POS|BXT))|486.*|497.*|POS(ASR|462[BC]| 8C| AMI))$",
816+
"xbrl-names": "EntityInvCompanyType",
817+
"elo-name": "invCompanyType",
818+
"efm": "6.5.40",
819+
"validation": "o",
820+
"source": "both",
821+
"dei/cover": "dei"
822+
},
808823
{
809824
"sub-types": ["@10-K+Q", "@8-K", "@20+40-F"],
810825
"xbrl-names": ["Security12bTitle", "Security12gTitle"],
@@ -2631,4 +2646,4 @@
26312646
"Security12gTitle"
26322647
]
26332648

2634-
}
2649+
}

arelle/plugin/validate/EFM/resources/dqc-us-rules.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"DQC.US rule 0043 is implemented below (new for 2022)",
2020
"DQC.US rule 0044 is implemented below (new for 2022)",
2121
"DQC.US rule 0048 is implemented below",
22+
"DQC.US rule 0060 is implemented below (new for 2022)",
23+
"DQC.US rule 0079 is implemented below (new for 2022)",
2224
"",
2325
"Each below rule contains a description of syntax used herein, message and rules. ",
2426
"",

buildVersion.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
build process to indicate the time that this version was built.
99
1010
'''
11-
import datetime, sys
11+
import datetime, sys, subprocess, os
1212
arelleMajorVersion = 1 # major verison = 1 (python), 2 (cython)
1313

1414
if __name__ == "__main__":
@@ -30,12 +30,28 @@
3030
"version = '{3}' # string version of date compiled\n"
3131
"copyrightLatestYear = '{0}' # string version of year compiled\n"
3232
).format(dateYr, arelleMajorVersion, dateDotYmd, dateDashYmdHmUtc)
33+
34+
versionTxt = dateDashYmdHmUtc
35+
36+
try:
37+
arelleCommit = subprocess.check_output(["git", "show", "--format='%h'", "--no-patch"]).decode("utf-8").strip()
38+
os.chdir("arelle/plugin/EdgarRenderer")
39+
edgarRendererCommit = subprocess.check_output(["git", "show", "--format='%h'", "--no-patch"]).decode("utf-8").strip()
40+
os.chdir("../../..")
41+
versionPy += ("arelleCommit = {0} # git Arelle commit \n"
42+
"edgarRendererCommit = {1} # git EdgarRenderer commit \n"
43+
).format(arelleCommit, edgarRendererCommit)
44+
versionTxt += ("\narelleCommit {0} "
45+
"\nedgarRendererCommit {1}"
46+
).format(arelleCommit[1:-1], edgarRendererCommit[1:-1])
47+
except Exception:
48+
pass
3349

3450
with open("arelle/Version.py", "w") as fh:
3551
fh.write(versionPy)
3652

3753
with open("version.txt", "w") as fh:
38-
fh.write(dateDashYmdHmUtc)
54+
fh.write(versionTxt)
3955

4056

4157
# add name suffix, like ER3 or TKTABLE

installWin64.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
;--------------------------------
4444
;Pages
4545

46-
!insertmacro MUI_PAGE_LICENSE "License.txt"
46+
!insertmacro MUI_PAGE_LICENSE "LICENSE.md"
4747
; !insertmacro MUI_PAGE_COMPONENTS
4848
!insertmacro MUI_PAGE_DIRECTORY
4949

installWin86.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
;--------------------------------
4040
;Pages
4141

42-
!insertmacro MUI_PAGE_LICENSE "License.txt"
42+
!insertmacro MUI_PAGE_LICENSE "LICENSE.md"
4343
; !insertmacro MUI_PAGE_COMPONENTS
4444
!insertmacro MUI_PAGE_DIRECTORY
4545

scripts/runEFMtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
TESTCASESINDEXFILE=/Users/hermf/Documents/mvsl/projects/SEC/efm/conf/testcases.xml
66
PLUGINS=EdgarRenderer
7-
DISCLOSURE_SYSTEM=efm-pragmatic-preview
7+
DISCLOSURE_SYSTEM=efm-pragmatic
88

99
LOG_DIR=/users/hermf/temp
1010
rm -f $LOG_DIR/EFM-conf-*

0 commit comments

Comments
 (0)