edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Remaining standardization mapping fixes: merge order for gaap_mappings.json

Open dgunning opened this issue 1 month ago • 0 comments

gaap_mappings.json is generated outside this repo, and PRs that edit it conflict on it. #1537 had to land the last batch with a key-level merge. This issue lists what is still wrong on main (f2fc72e7, 2026-10-21) and proposes an order, so that one PR at a time edits the file.

Everything below was re-measured on main with ReverseIndex.lookup().

Already landed since the issues were filed

  • #1445: 11 face-statement tags removed from exclusions.py (#1635); the other 44 stay excluded on purpose.
  • #1446, the srt: prefix: SRT elements now reach their mapping (#1637).
  • #1436 and #1438: the rows in the issue tables, via #1457, #1462, #1464, #1466 and #1467.

Order

1. #1443: equity, dividends and share counts. 28 of its 39 rows still differ.

  • CommonStockValue (7,620 companies) is CommonEquity, displayed as "Total Stockholders' Equity", with is_total: true (gaap_mappings.json:5786). On Coca-Cola's FY2023 10-K the $1.76B par-value row carries the equity-total concept.
  • The dividends-declared tags map to CommonDividendsPaid, a cash-flow concept.
  • The treasury share counts map to TreasuryShares, which is a value concept.

It goes first because it is the most widely used wrong mapping, and #1444's guard cannot catch it while the row says is_total: true.

2. #1441: bank, insurer, BDC, REIT and utility lines. 0 of 45 rows match.

  • The largest is InterestAndDividendIncomeOperating (527), which maps to NetInterestIncome.
  • Six rows return None because the total guard hides them.
  • test_gnx5_total_mappings.py pins two of the old values and changes in the same PR.

3. The #1436 and #1438 follow-ups.

  • #1436 has 16 entries, among them Investments (395), that still lead with CashAndMarketableSecurities. It also has the duplicate "Cash and Cash Equivalents" label in display_names.json.
  • #1438 has 19 leftover elements, among them RestrictedCashAndCashEquivalents (429) and WarrantsAndRightsOutstanding (316).
  • Both issues already invite a follow-up PR from their reporter.

4. #1446, data rows.

  • ifrs-full_EffectOfExchangeRateChangesOnCashAndCashEquivalents and its bare twin (683) map to NetChangeInCash. They should map to ForeignExchangeEffectOnCash.
  • The ASC 842 lease maturity tags have no mapping.
  • Also in this step: IncreaseDecreaseInOtherReceivables maps to ChangeInReceivables. Since #1635, that puts a second receivables row on Apple's cash flow.

5. #1444: the total guard. This step is code and a test; it edits no data.

  • The industry-override half no longer reproduces: main has 0 industry_overrides after #1537.
  • What remains is a fixed list of members for each total concept, held in a test. That way a regenerated gaap_mappings.json that maps a part to a total fails CI instead of shipping. The list has to include the ifrs-full_ spellings.
  • It goes last so that the list is written against corrected data.

Rules for each PR

  • Edit only the concepts in its issue.
  • Assert the corrected entries with explicit lookup() checks, as in #839.
  • Include one statement-level value from a real filing.
  • Check gh pr list for another open PR on the file before opening.

The #1446 clean-up items with no user-visible effect are not scheduled here:

  • the overridden legacy concept_mappings.json;
  • the stale _metadata;
  • hierarchy_rules, which nothing reads.

dgunning avatar Oct 21 '26 18:10 dgunning