Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update v19 for public review #663

Merged
merged 20 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ env:
- PR_BR=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}

matrix:
- INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/901832/000110465919041809/azn-20190630.xml", "xule_run_only":"DQC.IFRS.0093.9525"},{"file":"https://www.sec.gov/Archives/edgar/data/932782/000119312521348640/d231607d6k.htm", "xule_run_only":"DQC.IFRS.0115.9565"},{"file":"https://www.sec.gov/Archives/edgar/data/1579026/000106299320004827/towtf-20191231.xml", "xule_run_only":"DQC.IFRS.0115.9565"}]' EXFILES=$EXPECTED/DQC.IFRS.0093.9525_azn-2018.xml,$EXPECTED/DQC.IFRS.0115.9565_mex-ifrs-2021.xml,$EXPECTED/DQC.IFRS.0115.9565_towtf-ifrs-2019.xml
- INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/1411685/000165495419007632/vtgn-20190331.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/102109/000114420419034727/uuu-20190331.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/723603/000115752319001520/culp-20190429.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/1348362/000164033419001297/lxrp-20190531.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/914025/000091402521000019/plt-20210403.htm", "xule_run_only":"DQC.US.0118.9575"}]' EXFILES=$EXPECTED/DQC.US.0084.9298_vtgn-2018.xml,$EXPECTED/DQC.US.0084.9298_uuu-2018.xml,$EXPECTED/DQC.US.0084.9298_culp-2018.xml,$EXPECTED/DQC.US.0084.9298_lxrp-2018.xml,$EXPECTED/DQC.US.0118.9575_plt-us-2020.xml
- INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/6845/000000684521000003/apog-20201128_htm.xml", "xule_run_only":"DQC.US.0108.9564"},{"file":"http://www.sec.gov/Archives/edgar/data/1069308/000156459022029495/acer-10q_20220630.htm", "xule_run_only":"DQC.US.0131.9729"},{"file":"http://www.sec.gov/Archives/edgar/data/763901/000119312522216145/d278557d10q.htm", "xule_run_only":"DQC.US.0131.9729"}]' EXFILES=$EXPECTED/DQC.US.0108.9564_apog-us-2020.xml,$EXPECTED/DQC.US.0131.9729_acer-us-2022.xml,$EXPECTED/DQC.US.0131.9729_bpop-us-2021.xml
- INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/50292/000117494719000338/iehc-20181229.xml", "xule_run_only":"DQC.US.0081.9277"},{"file":"https://www.sec.gov/Archives/edgar/data/1175535/000117553519000012/wsr-20181231.xml", "xule_run_only":"DQC.US.0081.9277"},{"file":"https://www.sec.gov/Archives/edgar/data/752642/000149315219002992/umh-20181231.xml", "xule_run_only":"DQC.US.0081.9277"},{"file":"https://www.sec.gov/Archives/edgar/data/931059/000149315220013561/rnva-20200331.xml", "xule_run_only":"DQC.US.0081.9277"},{"file":"https://www.sec.gov/Archives/edgar/data/1446687/000144668719000009/fil-20181231.htm", "xule_run_only":"DQC.US.0081.9277"},{"file":"https://www.sec.gov/Archives/edgar/data/1518720/000164033420001843/fpvd-20190430.xml", "xule_run_only":"DQC.US.0081.9278"},{"file":"https://www.sec.gov/Archives/edgar/data/1514056/000149315220013825/tce-20200331.xml", "xule_run_only":"DQC.US.0081.9278"},{"file":"https://www.sec.gov/Archives/edgar/data/750004/000075000420000123/sgms-20200630.htm", "xule_run_only":"DQC.US.0081.9278"},{"file":"https://www.sec.gov/Archives/edgar/data/1096938/000147793220004083/ueec-20200331.xml", "xule_run_only":"DQC.US.0081.9278"}]' EXFILES=$EXPECTED/DQC.US.0081.9277_iehc-2018.xml,$EXPECTED/DQC.US.0081.9277_wsr-2018.xml,$EXPECTED/DQC.US.0081.9277_umh-2018.xml,$EXPECTED/DQC.US.0081.9277_rnva-us-2020.xml,$EXPECTED/DQC.US.0081.9277_fil-2018.xml,$EXPECTED/DQC.US.0081.9278_fpvd-us-2019.xml,$EXPECTED/DQC.US.0081.9278_tce-us-2020.xml,$EXPECTED/DQC.US.0081.9278_sgms-us-2019.xml,$EXPECTED/DQC.US.0081.9278_ueec-us-2019.xml
# - INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/901832/000110465919041809/azn-20190630.xml", "xule_run_only":"DQC.IFRS.0093.9525"},{"file":"https://www.sec.gov/Archives/edgar/data/932782/000119312521348640/d231607d6k.htm", "xule_run_only":"DQC.IFRS.0115.9565"},{"file":"https://www.sec.gov/Archives/edgar/data/1579026/000106299320004827/towtf-20191231.xml", "xule_run_only":"DQC.IFRS.0115.9565"}]' EXFILES=$EXPECTED/DQC.IFRS.0093.9525_azn-2018.xml,$EXPECTED/DQC.IFRS.0115.9565_mex-ifrs-2021.xml,$EXPECTED/DQC.IFRS.0115.9565_towtf-ifrs-2019.xml
# - INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/1411685/000165495419007632/vtgn-20190331.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/102109/000114420419034727/uuu-20190331.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/723603/000115752319001520/culp-20190429.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/1348362/000164033419001297/lxrp-20190531.xml", "xule_run_only":"DQC.US.0084.9298"},{"file":"https://www.sec.gov/Archives/edgar/data/914025/000091402521000019/plt-20210403.htm", "xule_run_only":"DQC.US.0118.9575"}]' EXFILES=$EXPECTED/DQC.US.0084.9298_vtgn-2018.xml,$EXPECTED/DQC.US.0084.9298_uuu-2018.xml,$EXPECTED/DQC.US.0084.9298_culp-2018.xml,$EXPECTED/DQC.US.0084.9298_lxrp-2018.xml,$EXPECTED/DQC.US.0118.9575_plt-us-2020.xml
# - INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/6845/000000684521000003/apog-20201128_htm.xml", "xule_run_only":"DQC.US.0108.9564"},{"file":"http://www.sec.gov/Archives/edgar/data/1069308/000156459022029495/acer-10q_20220630.htm", "xule_run_only":"DQC.US.0131.9729"},{"file":"http://www.sec.gov/Archives/edgar/data/763901/000119312522216145/d278557d10q.htm", "xule_run_only":"DQC.US.0131.9729"}]' EXFILES=$EXPECTED/DQC.US.0108.9564_apog-us-2020.xml,$EXPECTED/DQC.US.0131.9729_acer-us-2022.xml,$EXPECTED/DQC.US.0131.9729_bpop-us-2021.xml
# - INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/4281/000000428120000185/arnc-20200930.htm", "xule_run_only":"DQC.US.0055.9842"},{"file":"https://www.sec.gov/Archives/edgar/data/1320461/000132046120000025/cps-q12020x10q.htm", "xule_run_only":"DQC.US.0055.7493"},{"file":"https://www.sec.gov/Archives/edgar/data/101829/000010182920000034/utx-20200331.htm", "xule_run_only":"DQC.US.0055.7493"}]' EXFILES=$EXPECTED/DQC.US.0055.9842_arnc-us-2020.xml,$EXPECTED/DQC.US.0055.7493_cps-us-2019.xml,$EXPECTED/DQC.US.0055.7493_utx-us-2019.xml
# - INFILES='[{"file":"http://www.sec.gov/Archives/edgar/data/1130144/000155837022003269/bsrr-20211231x10k.htm", "xule_run_only":"DQC.US.0139.9855"},{"file":"http://www.sec.gov/Archives/edgar/data/1118004/000111800422000015/banc-20211231.htm", "xule_run_only":"DQC.US.0139.9858"},{"file":"http://www.sec.gov/Archives/edgar/data/1053352/000155837022002901/htbk-20211231x10k.htm", "xule_run_only":"DQC.US.0139.9859"},{"file":"http://www.sec.gov/Archives/edgar/data/101382/000156459022006546/umbf-10k_20211231.htm", "xule_run_only":"DQC.US.0139.9860"}]' EXFILES=$EXPECTED/DQC.US.0139.9855_bsrr-us-2021.xml,$EXPECTED/DQC.US.0139.9858_banc-us-2021.xml,$EXPECTED/DQC.US.0139.9859_bhtbk-us-2021.xml,$EXPECTED/DQC.US.0139.9860_umbf-us-2021.xml
# - INFILES='[{"file":"http://www.sec.gov/Archives/edgar/data/1331520/000133152022000015/homb-20211231.htm", "xule_run_only":"DQC.US.0140.9861"},{"file":"http://www.sec.gov/Archives/edgar/data/1039828/000103982822000022/ael-20211231.htm", "xule_run_only":"DQC.US.0140.9862"}]' EXFILES=$EXPECTED/DQC.US.0140.9861_homb-us-2021.xml,$EXPECTED/DQC.US.0140.9862_ael-us-2021.xml
Expand Down
2 changes: 1 addition & 1 deletion dqc_us_rules/source/lib/version.xule
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DQC Rules

/** Define the rule version **/

constant $ruleVersion = '19.0.0RC3'
constant $ruleVersion = '19.0.0RC4'

/** Define Additional Attribute types that can be associated with a rule **/

Expand Down
4 changes: 2 additions & 2 deletions dqc_us_rules/source/us/2018/DQC_0081.xule
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ assert US.0081.9278 satisfied
$rule_id = (rule-name().split('.'))[rule-name().split('.').length];
/** Get all the calculations defined in the Instance document. **/

$fact_values = list([nonils covered]);
$fact_concepts = set([nonils covered @concept in $STATEMENT_CONCEPTS where $fact.is-monetary].concept.name);

/** Exludes NetIncomeLoss, ProfitLoss as these are are used in the CF for addbacks **/
$value-concepts = (filter $fact_values returns $item.concept.name).to-set - $income_items;
$value-concepts = $fact_concepts - $income_items;
for ($value-con in $value-concepts)
$extCalcRelationship1 = navigate summation-item siblings from $value-con returns by network set (relationship);

Expand Down
4 changes: 4 additions & 0 deletions dqc_us_rules/source/us/2018/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,8 @@ constant $income_items = set(ProfitLoss,
constant $MONETARY_NON_NEGS = filter $non_neg_items.keys where taxonomy().concept($item).is-monetary returns taxonomy().concept($item)

constant $BANKING_MEASURES_BETWEEN_ZERO_AND_ONE = navigate parent-child descendants from list(RiskBasedRatiosAbstract, LeverageRatiosAbstract) taxonomy $us-gaap where $relationship.target.data-type.name == xbrli:pureItemType returns set (target-name)

constant $STATEMENT_NETWORK_CONCEPTS = filter taxonomy().networks(summation-item) where $item.role.description.contains('- Statement -') returns $item.concepts

constant $STATEMENT_CONCEPTS = sum(filter $STATEMENT_NETWORK_CONCEPTS returns $item.name)

4 changes: 2 additions & 2 deletions dqc_us_rules/source/us/2019/DQC_0081.xule
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ assert US.0081.9278 satisfied
$rule_id = (rule-name().split('.'))[rule-name().split('.').length];
/** Get all the calculations defined in the Instance document. **/

$fact_values = list([nonils covered]);
$fact_concepts = set([nonils covered @concept in $STATEMENT_CONCEPTS where $fact.is-monetary].concept.name);

/** Exludes NetIncomeLoss, ProfitLoss as these are are used in the CF for addbacks **/
$value-concepts = (filter $fact_values returns $item.concept.name).to-set - $income_items;
$value-concepts = $fact_concepts - $income_items;
for ($value-con in $value-concepts)
$extCalcRelationship1 = navigate summation-item siblings from $value-con returns by network set (relationship);

Expand Down
6 changes: 5 additions & 1 deletion dqc_us_rules/source/us/2019/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ constant $income_items = set(ProfitLoss,

constant $MONETARY_NON_NEGS = filter $non_neg_items.keys where taxonomy().concept($item).is-monetary returns taxonomy().concept($item)

constant $BANKING_MEASURES_BETWEEN_ZERO_AND_ONE = navigate parent-child descendants from list(RiskBasedRatiosAbstract, LeverageRatiosAbstract) taxonomy $us-gaap where $relationship.target.data-type.name == xbrli:pureItemType returns set (target-name)
constant $BANKING_MEASURES_BETWEEN_ZERO_AND_ONE = navigate parent-child descendants from list(RiskBasedRatiosAbstract, LeverageRatiosAbstract) taxonomy $us-gaap where $relationship.target.data-type.name == xbrli:pureItemType returns set (target-name)

constant $STATEMENT_NETWORK_CONCEPTS = filter taxonomy().networks(summation-item) where $item.role.description.contains('- Statement -') returns $item.concepts

constant $STATEMENT_CONCEPTS = sum(filter $STATEMENT_NETWORK_CONCEPTS returns $item.name)
4 changes: 2 additions & 2 deletions dqc_us_rules/source/us/2020/DQC_0081.xule
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ assert US.0081.9278 satisfied
$rule_id = (rule-name().split('.'))[rule-name().split('.').length];
/** Get all the calculations defined in the Instance document. **/

$fact_values = list([nonils covered]);
$fact_concepts = set([nonils covered @concept in $STATEMENT_CONCEPTS where $fact.is-monetary].concept.name);

/** Exludes NetIncomeLoss, ProfitLoss as these are are used in the CF for addbacks **/
$value-concepts = (filter $fact_values returns $item.concept.name).to-set - $income_items;
$value-concepts = $fact_concepts - $income_items;
for ($value-con in $value-concepts)
$extCalcRelationship1 = navigate summation-item siblings from $value-con returns by network set (relationship);

Expand Down
6 changes: 5 additions & 1 deletion dqc_us_rules/source/us/2020/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,8 @@ and (not $item.drs-role.uri.lower-case.contains('redeemable'))
and (not $item.drs-role.uri.lower-case.contains('netproceedsfromallsources'))
and (not $item.drs-role.uri.lower-case.contains('membersinterest'))
and (not $item.drs-role.description.lower-case.contains('schedule iii'))
and (not $item.drs-role.description.lower-case.contains('schedule iv'))
and (not $item.drs-role.description.lower-case.contains('schedule iv'))

constant $STATEMENT_NETWORK_CONCEPTS = filter taxonomy().networks(summation-item) where $item.role.description.contains('- Statement -') returns $item.concepts

constant $STATEMENT_CONCEPTS = sum(filter $STATEMENT_NETWORK_CONCEPTS returns $item.name)
8 changes: 4 additions & 4 deletions dqc_us_rules/source/us/2021/DQC_0081.xule
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ assert US.0081.9278 satisfied
$rule_id = (rule-name().split('.'))[rule-name().split('.').length];
/** Get all the calculations defined in the Instance document. **/

$fact_values = list([nonils covered]);
$fact_concepts = set([nonils covered @concept in $STATEMENT_CONCEPTS where $fact.is-monetary].concept.name);

/** Exludes NetIncomeLoss, ProfitLoss as these are are used in the CF for addbacks **/
$value-concepts = (filter $fact_values returns $item.concept.name).to-set - $INCOME_ITEMS;
$value-concepts = $fact_concepts - $INCOME_ITEMS;

for ($value-con in $value-concepts)
$extCalcRelationship1 = navigate summation-item siblings from $value-con returns by network set (relationship);



for ($network in $extCalcRelationship1.keys)
for ($extCalcRelationship in (filter $extCalcRelationship1[$network] where $item.role.description.contains('- Statement ')))
$extCalcNetwork = $network.role.description;
Expand Down
8 changes: 7 additions & 1 deletion dqc_us_rules/source/us/2021/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ constant $DEFINED_BENEFIT_COST_EXT_ENUM = navigate parent-child descendants incl

constant $BANKING_MEASURES_BETWEEN_ZERO_AND_ONE = navigate parent-child descendants from list(RiskBasedRatiosAbstract, LeverageRatiosAbstract, BankingRegulationTangibleEquityRatioAbstract, BankingRegulationCapitalConservationBufferAbstract, BankingRegulationLeverageBufferAbstract, BankingRegulationMaximumPayoutRatioAndAmountAbstract, BankingRegulationMaximumLeveragePayoutRatioAndAmountAbstract) taxonomy $US-GAAP where $relationship.target.data-type.name == xbrli:pureItemType returns set (target-name)

/** STUFF RELATED TO STATEMENTS **/
constant $STATEMENT_CUBES = FILTER taxonomy().cubes where $item.drs-role.description.contains('- Statement -')
and (not $item.drs-role.uri.lower-case.contains('parenthetical'))
and (not $item.drs-role.uri.lower-case.contains('equity'))
Expand All @@ -233,6 +234,10 @@ and (not $item.drs-role.uri.lower-case.contains('membersinterest'))
and (not $item.drs-role.description.lower-case.contains('schedule iii'))
and (not $item.drs-role.description.lower-case.contains('schedule iv'))

constant $STATEMENT_NETWORK_CONCEPTS = filter taxonomy().networks(summation-item) where $item.role.description.contains('- Statement -') returns $item.concepts

constant $STATEMENT_CONCEPTS = sum(filter $STATEMENT_NETWORK_CONCEPTS returns $item.name)

constant $EXCLUDING_ACCRUED_INTEREST = list(AccountsReceivableExcludingAccruedInterestAfterAllowanceForCreditLossNoncurrent,
AccountsReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossNoncurrent,
AccountsReceivableAllowanceForCreditLossExcludingAccruedInterestNoncurrent,
Expand Down Expand Up @@ -381,4 +386,5 @@ SalesTypeLeaseNetInvestmentInLeaseBeforeAllowanceForCreditLossCurrent,
SalesTypeLeaseNetInvestmentInLeaseAllowanceForCreditLossCurrent,
SalesTypeLeaseNetInvestmentInLeaseAfterAllowanceForCreditLossNoncurrent,
SalesTypeLeaseNetInvestmentInLeaseBeforeAllowanceForCreditLossNoncurrent,
SalesTypeLeaseNetInvestmentInLeaseAllowanceForCreditLossNoncurrent)
SalesTypeLeaseNetInvestmentInLeaseAllowanceForCreditLossNoncurrent)

4 changes: 2 additions & 2 deletions dqc_us_rules/source/us/2022/DQC_0081.xule
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ assert US.0081.9278 satisfied
$rule_id = (rule-name().split('.'))[rule-name().split('.').length];
/** Get all the calculations defined in the Instance document. **/

$fact_values = list([nonils covered]);
$fact_concepts = set([nonils covered @concept in $STATEMENT_CONCEPTS where $fact.is-monetary].concept.name);

/** Exludes NetIncomeLoss, ProfitLoss as these are are used in the CF for addbacks **/
$value-concepts = (filter $fact_values returns $item.concept.name).to-set - $INCOME_ITEMS;
$value-concepts = $fact_concepts - $INCOME_ITEMS;
for ($value-con in $value-concepts)
$extCalcRelationship1 = navigate summation-item siblings from $value-con returns by network set (relationship);

Expand Down
4 changes: 4 additions & 0 deletions dqc_us_rules/source/us/2022/constant.xule
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ and (not $item.drs-role.uri.lower-case.contains('membersinterest'))
and (not $item.drs-role.description.lower-case.contains('schedule iii'))
and (not $item.drs-role.description.lower-case.contains('schedule iv'))

constant $STATEMENT_NETWORK_CONCEPTS = filter taxonomy().networks(summation-item) where $item.role.description.contains('- Statement -') returns $item.concepts

constant $STATEMENT_CONCEPTS = sum(filter $STATEMENT_NETWORK_CONCEPTS returns $item.name)


constant $EXCLUDING_ACCRUED_INTEREST = list(AccountsReceivableExcludingAccruedInterestAfterAllowanceForCreditLossNoncurrent,
AccountsReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossNoncurrent,
Expand Down