Skip to content

Commit

Permalink
Merge pull request Arelle#172 from Arelle/edgr22.1.h2
Browse files Browse the repository at this point in the history
EDGAR release 22.1.h2
  • Loading branch information
sagesmith-wf authored Apr 6, 2022
2 parents 0e6c295 + f17f222 commit bbf9608
Show file tree
Hide file tree
Showing 8 changed files with 3,260 additions and 3,218 deletions.
6,420 changes: 3,212 additions & 3,208 deletions arelle/plugin/validate/EFM/Filing.py

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions arelle/plugin/validate/EFM/Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def compileSubTypeSet(forms, formSet=None, visitedClasses=None):
if "*" in subTypeSet:
subTypeSet = "all" # change to string for faster testing in Filing.py
sev["subTypeSet"] = subTypeSet
if "sub-types-pattern" in sev:
sev["subTypesPattern"] = re.compile(sev["sub-types-pattern"])
sev["formTypeSet"] = compileSubTypeSet(sev.get("form-types", (sev.get("form-type",()),)))

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

def factBindings(modelXbrl, localNames, nils=False):
def factBindings(modelXbrl, localNames, nils=False, noAdditionalDims=False):
bindings = defaultdict(dict)
def addMostAccurateFactToBinding(f):
if f.xValid >= VALID and (nils or not f.isNil) and f.context is not None:
if (f.xValid >= VALID
and (nils or not f.isNil)
and f.context is not None
and (not noAdditionalDims or not f.context.qnameDims)):
binding = bindings[f.context.contextDimAwareHash, f.unit.hash if f.unit is not None else None]
ln = f.qname.localName
if ln not in binding or inferredDecimals(f) > inferredDecimals(binding[ln]):
Expand Down
21 changes: 18 additions & 3 deletions arelle/plugin/validate/EFM/resources/dei-validations.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"Each validation object contains the following entries:",
" sub-types: arrayed submissionType or submissionType references or single submissionType or submissionType reference,",
" where specific to a form type, section-sign § separates sub and form types, e.g. 'POS EX§N-2' ",
" sub-types-pattern: a regex to match submissionTypes instead of the sub-types array of submissionType values",
" xbrl-names, elo-names, and severities may be array (plural) or individual",
" xbrl-names: arrayed dei local names or prefixed non-dei nmes of XBRL elements,",
" elo-names: optional corresponding arrayed ELO schema names of XML elements,",
Expand Down Expand Up @@ -86,7 +87,7 @@
"N-6": ["N-6", "N-6/A", "485POS§N-6", "485APOS§N-6", "485BPOS§N-6", "485BXT§N-6", "497§N-6"],
"N-346": ["@N-3", "@N-4", "@N-6"],
"POS": ["POS AM", "POS EX"],
"RR": ["485APOS", "485BPOS", "485BXT", "497", "N-1A"],
"RR": ["485APOS", "485BPOS", "485BXT", "497", "N-1A", "N-1A/A"],
"SP 15D2": ["SP 15D2", "SP 15D2/A"],
"S-n": ["S-1", "S-1/A", "S-3", "S-3/A", "S-4", "S-4/A", "S-11", "S-11/A"],
"S-nX": ["S-1MEF", "S-3D", "S-3DPOS", "S-3MEF", "S-4EF", "S-4MEF", "S-4 POS", "S-11MEF"],
Expand Down Expand Up @@ -338,7 +339,12 @@
"dei/cover": "dei"
},
{
"sub-types": ["@all"],
"sub-types": [
"@all-FAST",
"@POS", "N-CSR", "N-CSR/A", "N-CSRS", "N-CSRS/A",
"@6-K", "@SP 15D2", "@RR", "@N-346", "@SDR",
"@N", "N-3", "N-4", "N-6"
],
"xbrl-names": "DocumentPeriodEndDate",
"store-db-name": "periodOfReport",
"store-db-object": "eloValuesFromFacts",
Expand Down Expand Up @@ -805,6 +811,15 @@
"source": "both",
"dei/cover": "dei"
},
{
"sub-types-pattern": "^(N-.*|(485(A|B)(POS|BXT))|486.*|497.*|POS(ASR|462[BC]| 8C| AMI))$",
"xbrl-names": "EntityInvCompanyType",
"elo-name": "invCompanyType",
"efm": "6.5.40",
"validation": "o",
"source": "both",
"dei/cover": "dei"
},
{
"sub-types": ["@10-K+Q", "@8-K", "@20+40-F"],
"xbrl-names": ["Security12bTitle", "Security12gTitle"],
Expand Down Expand Up @@ -2631,4 +2646,4 @@
"Security12gTitle"
]

}
}
2 changes: 2 additions & 0 deletions arelle/plugin/validate/EFM/resources/dqc-us-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"DQC.US rule 0043 is implemented below (new for 2022)",
"DQC.US rule 0044 is implemented below (new for 2022)",
"DQC.US rule 0048 is implemented below",
"DQC.US rule 0060 is implemented below (new for 2022)",
"DQC.US rule 0079 is implemented below (new for 2022)",
"",
"Each below rule contains a description of syntax used herein, message and rules. ",
"",
Expand Down
20 changes: 18 additions & 2 deletions buildVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
build process to indicate the time that this version was built.
'''
import datetime, sys
import datetime, sys, subprocess, os
arelleMajorVersion = 1 # major verison = 1 (python), 2 (cython)

if __name__ == "__main__":
Expand All @@ -30,12 +30,28 @@
"version = '{3}' # string version of date compiled\n"
"copyrightLatestYear = '{0}' # string version of year compiled\n"
).format(dateYr, arelleMajorVersion, dateDotYmd, dateDashYmdHmUtc)

versionTxt = dateDashYmdHmUtc

try:
arelleCommit = subprocess.check_output(["git", "show", "--format='%h'", "--no-patch"]).decode("utf-8").strip()
os.chdir("arelle/plugin/EdgarRenderer")
edgarRendererCommit = subprocess.check_output(["git", "show", "--format='%h'", "--no-patch"]).decode("utf-8").strip()
os.chdir("../../..")
versionPy += ("arelleCommit = {0} # git Arelle commit \n"
"edgarRendererCommit = {1} # git EdgarRenderer commit \n"
).format(arelleCommit, edgarRendererCommit)
versionTxt += ("\narelleCommit {0} "
"\nedgarRendererCommit {1}"
).format(arelleCommit[1:-1], edgarRendererCommit[1:-1])
except Exception:
pass

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

with open("version.txt", "w") as fh:
fh.write(dateDashYmdHmUtc)
fh.write(versionTxt)


# add name suffix, like ER3 or TKTABLE
Expand Down
2 changes: 1 addition & 1 deletion installWin64.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_LICENSE "LICENSE.md"
; !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY

Expand Down
2 changes: 1 addition & 1 deletion installWin86.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_LICENSE "LICENSE.md"
; !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY

Expand Down
2 changes: 1 addition & 1 deletion scripts/runEFMtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

LOG_DIR=/users/hermf/temp
rm -f $LOG_DIR/EFM-conf-*
Expand Down

0 comments on commit bbf9608

Please sign in to comment.